How to control OnGUI? (Please help I have no idea what is wrong)

I have no idea what is wrong with this I am trying to get a GUI to pop up giving the player a choice to either go back to the main menu or continue with the tutorial. So I put in the code for it and it gave me three errors that when I do what it says it adds even more errors. Please help because clearly I have no idea what I’m doing so if anyone does help could you please explain what I did wrong thoroughly. Thank you

//This script creates a lap counter that once it reaches 3 it will restart the level

var score:int;

function OnTriggerEnter(other : Collider){

    if (score <= 2){
        score = score + 1;
        print(score);
    }
    else
    {
        function OnGUI()
        {
            //(Application.LoadLevel("Tutorial Level"));
            // Make a group on the center of the screen
            GUI.BeginGroup (Rect (Screen.width / 2 - 50, Screen.height / 2 - 50, 100, 100));
            // All rectangles are now adjusted to the group. (0,0) is the topleft corner of the group.
            // We'll make a box so you can see where the group is on-screen.
            GUI.Box (Rect (0,0,100,100), "Do you want to continue with the Tutorial or move on to the real tracks?");
            if (GUI.Button (Rect (10,40,80,30), "Yes"))
            {
                Application.LoadLevel("Tutorial Level");
            }
            if (GUI.Button (Rect (30,60,100,50), "No"))
            {
                Application.LoadLevel("Title GUI");
            }
            // End the group we started above.

            GUI.EndGroup ();
         }
    }
}

As @GC83 said, you can’t redefine OnGUI inside anoher function. In order to control the GUI, you must have a boolean variable that enables / disables the code inside OnGUI:

var score:int;

private var guiEnable = false;

function OnTriggerEnter(other : Collider){

    if (score <= 2){
        score = score + 1;
        guiEnable = false; // no gui
        print(score);
    }
    else
    {
        guiEnable = true; // enable gui
    }
}

function OnGUI()
{
    if (guiEnable) // only execute the code below when gui enabled:
    {
        //(Application.LoadLevel("Tutorial Level"));
        // Make a group on the center of the screen
        GUI.BeginGroup (Rect (Screen.width / 2 - 50, Screen.height / 2 - 50, 100, 100));
        // All rectangles are now adjusted to the group. (0,0) is the topleft corner of the group.
        // We'll make a box so you can see where the group is on-screen.
        GUI.Box (Rect (0,0,100,100), "Do you want to continue with the Tutorial or move on to the real tracks?");
        if (GUI.Button (Rect (10,40,80,30), "Yes"))
        {
            Application.LoadLevel("Tutorial Level");
        }
        if (GUI.Button (Rect (30,60,100,50), "No"))
        {
            Application.LoadLevel("Title GUI");
        }
        // End the group we started above.
        GUI.EndGroup ();
    }
}