Microsoft MakeCode

I need help optimising my code or another solution

I have made a menu with some games on it and a calculator but the calculator instead of displaying the number it flashes it at regular intervals. I think it might be to do with the amount of code but I don’t know how to fix it.
Please help

Ps, it is the third item in the menu (game_state 3 and 3.5)