1- Make a sprite at the end of the maze.
2- set visibility to invisible
3- Make new global variable name it level1
Events and actions:-
when player collision with the "sprite ">> system add 1 to "level1"
when touched "second level"
and "level1" = 1 >> unlock your second level