Player Turn before Moving

I've been looking for a script that makes the player turn the direction the direction key is pressed instead of moving right away, just as in Pokémon, Legend of Zelda, etc...

For example if the player is facing left and presses the up directional key, they would just turn that direction instead of moving one tile up immediately.

I've found some scripts but they're all for VXAce, these are some of what I've found and what I'm looking for:

http://forums.rpgmakerweb.com/index.php?/topic/13918-player-turn-move/

http://pastebin.com/jVMwss4S

http://forums.rpgmakerweb.com/index.php?/topic/22810-player-turning-in-place-before-moving/

I was hoping someone had a link to a similar script for VX or could convert one of those scripts for RGSS2. 

Thanks a lot in advance 🙂
Here I've converted it for you 🙂

http://pastebin.com/raw.php?i=rXrGHUP7
It works!! Thanks a lot 🙂
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/player-turn-before-moving.39697/