Pokemon facing direction

In Pokemon, when you press Up the player turns to face up without moving up. When you press UP again, the player moves up. Is there a way to do this in RMMV?
https://www.google.com/amp/s/galvs-scripts.com/2016/07/01/mv-stationary-turn/amp/

Should be what your looking for

Thank you!
Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/pokemon-facing-direction.106054/