Scoreboard

I have this script,

var score = 0;
function OnTriggerEnter( other : Collider ) {
score += 1;

     GetComponent(BoxCollider).enabled = false;      

}
function OnGUI()
{
GUILayout.Label( "Hurdle = " + score );
}

and when I enter a trigger it makes a score point. But if I put the script on 2 things it duplicates the GUILayout and makes it look bad and dosent make the score 2. Can
I have some help please!

You will want a separate script say Score.js:

public var curScore : int = 0;
function OnGUI()
{
	GUILayout.Label("Hurtle: " + curScore);
}

then you can do this:

function OnTriggerEnter( other : Collider ) 
{
    GameObject.Find("The Name of the Object you have Score.js on").GetComponent("Score").curScore += 1;
    GetComponent(BoxCollider).enabled = false;      
}

you just need to put Score.js on an object in the scene.