This is a simple script for playing a maze. The maze is on a sprite and I made it using http://mazegenerator.net/. This is just a simple demo, but you could modify it to include multiple levels, and to recognise when somebody completes the maze (perhaps by checking if the y position is low enough).
This is an example from the 2nd Edition of the book Scratch Programming in Easy Steps by Sean McManus. More info here: http://www.sean.co.uk/books/scratch-programming-in-easy-steps/index.shtm