how to fix menu button "play"

var play = false;
var Developer = false;
var Quit = false;
var Camera1 : Camera;
var Camera2 : Camera;
var back = false;

function OnMouseEnter()
{

GetComponent.().material.color = Color.red;

}

function OnMouseExit()
{

GetComponent.().material.color = Color.white;

}
function OnMouseUp()
{

if (Quit)
{

Application.Quit();

}
else if (play)
{

Application.LoadScene (1);
}
else if (Developer)
{
Camera1.enabled = false;
Camera2.enabled = true;
}
else if (back)
{
Camera1.enabled = true;
Camera2.enabled = false;
}
Camera1.enabled = false;
Camera2.enabled = true;
}

// when i push the button “play game” on main menu happens nothing

// how to fix it?

You can achieve this much easier by using the built in Button UI
https://docs.unity3d.com/ScriptReference/UI.Button.html

Video: UI Events - Make buttons do something - Unity 4.6 Tutorial - YouTube