This project demonstrates simple acceleration in scratch. Use the left and right arrow keys to move the square, and press the space bar to toggle whether the sprite will decelerate or not. Check out http://scratch.mit.edu/projects/26349899/ to see a game which has made use of this mechanic. Fly, Kirby! is a game by person345, check out more of his awesome projects @person345 .
If you would like to see more scratch projects like this one go to my studio - http://scratch.mit.edu/studios/477650/ And also check out some of my different projects @theonlygusti In my projects I want to explain and utilise simple, helpful mechanics that would be useful for other scratchers in their projects. I also aim to make my projects as simple and easy to implement as possible, so I work on cutting down the number and lengths of scripts required for functionality (I add a few extra scripts in my demonstration projects).