Why does my game freeze?

I am making a spaceship fighter game, and at the end of a level, it’s SUPPOSED to put you in a screen where you can upgrade your spaceship, but instead, it just freezes. But when you press A when its frozen, it will make the shooting noise.

I am very confused on why it is doing this. Please help!

Game: https://makecode.com/_5P1PALRdFCyL

Hello I think and I’m not that good at code but its probably you don’t have time to choose anything before the next level starts when you’re on the menu screen.

From what I could see quickly, the only place where you do the upgrade screen is if player 2 dies.

you need to put the blocks from the story extension in a start cutscene block