Side scroller problem

hiya, im working on a sidescroller battle game. at the moment im tryging to use the kirupa tutorials version, but it dont seem to work for what i need. could anybody help me by giving me some new code that does the same job or even better an example, the change i need is so the speed is a number that can be a variable, instead of slowing down with the *.85 as provided in the tutorial, i need speeds that can be changed easyly.

thank you = ]