Use Left and Right Arrow Keys to see the character Walk. Press the X key while Walking to see the character Run. Press the Down Arrow Key to Crouch and Crawl.
This code depends on the names of the costumes in order to work. The animation frames are divided into sets for the various actions like walking, running, or crawling, and broken up into frames in order. The different parts of the costume name are accessed by different variables within the program.