Murdock 743,
To edit the good method that Lost in Thought has shown you, and make it better. Try this:
if keystate(30) = 1 and speed < 100 then inc speed
if keystate(44) = 1 and speed > 20 then dec speed
Speed has to be
less than 100 for it to increase. Therefore, it will not increase when it is equal to 100. So, your limit set for speed is 100. Same goes for the value of 20, that the lowest number speed can be is 21, to be enabled to decrease by 1. So, if speed is equal to 20, it will not decrease. The above method saves you a couple of uneccessary extra lines of code.
+NanoBrain+