Press up arrow key to go up, and the down arrow key to go down. Avoid the walls and eat the bananas ! You can also check out sonthegoat777's project, it's really popular! https://scratch.mit.edu/projects/982208776/
This took me about 3 hours, so please try to understand that this is my first game. If you have any questions, I'm happier to answer them! Thanks to sonthegoat777 for the credit of the walls Comment down your high score!