Help me with player

I wanna know how my code of player have to look like if i trade him to microscript object oriented

Link of my game: https://microstudio.io/rianstar/ghosthunt/

THANKS FOR THE HELP.