If timer reaches 50 changed to scene "Maze2"

var timer : float = 0;
// Use this for initialization
function Start () {
}

// Update is called once per frame
function Update () {
timer += Time.deltaTime;
if(timer == 50)
Application.LoadLevel("Maze2");
{
    }
    }
    function OnGUI ()
    {
    GUI.Box(new Rect(10,10,50, 20), "" + timer.ToString("0"));
    }

As you haven’t said anything I can only guess from your code that you can have 2 possible problems:

  1. You count float value via deltaTime addition. Problem is that you most likely won’t ever hit exactly 50 float in possible amount of times you’ll run your game at all, so you should instead check if 50 or more:

if (timer >= 50) Application.LoadLevel(“Maze2”);

  1. Unless this is the same scene, make sure that you’ve added scene with exact name “Maze2” to “File => Build setting => Scenes in build”.