How to make a Function to check if the player is moveing too slow

Hi I’m making a game where you are a cube that is constantly moving forward where if you move too slow you die and level reset

Just run this on event tick, or on a timer, both work.