Credit to @davidbarrette for part of the code and for helping me debug the game. Go check out his new games https://scratch.mit.edu/users/davidbarrette/.