Make something like this and fit it to your game. Make a variable called ‘current level’ set it to zero on start, then set it to change by one once you reach the end of the level. The create a function called ‘startLevel’ and add the if statement grid you see below.
The game over at the end will make it so that once you beat the final level you’ll actually win the game. Also ignore the status bar part if you’re not using the status bar extention.
I hope you find this useful.