The main problem was the 'Ground' sprite, having it clear and redraw the whole level over and over again increases lag. So I got rid of the forever block, making the sprite only draw the level once, and it worked. I don't think anything was wrong with your script. ¯\_(ツ)_/¯ btw nice character design