Scripting the player movement