Simple code not working


I’m trying to make a single player game similar to the plane mode in War Thunder. So i basically i added simple working code to start my new project but it worked for a little bit displaying like normal but the i added the controller functions, browser events, and the raycasting extensions but then when i added some more blocks it didnt work how i wanted it to so i deleted those new blocks and went back to my original code but then the display screen just went black i also tried reseting it but it just stayed as a black screen

here’s the link

raycasting doesnt work like that. i fixed it tho https://arcade.makecode.com/S70125-51517-62925-55073