Look at rocketpoop's project, but the arrow keys are to move.
All the credit goes to @rocketpoop, but I just made the final boss harder. I might continue to make modifications later on, but this is all based on @rocketpoop's project, "Cheez Puff Adventure."