Didn't downloaded the file however the bellow is my solution.
a simple way to achieve this, would be: having 2 instance_variables on the player one that detects if he is_moving, and one that keeps a value amount let's say timeWait=60.
(make sure to add the keyboard key is not pressed condition/s for each user keystroke that can be inputed)
(0 false 1 true - if user is pressing a key it means the player is moving then the value changes to 1, if there is no user input then value changes back to 0)
then you can reset the timewait by saying
that way it always resets when the user presses a button.
that should work, is not the most elegant but should give you and idea on how the mechanics should work, and then apply and tweak them based on already used behaviors, or code you have.