Total Score- You min HELP

Hello,
i have this script which count every object that my player collect
i need to modify my script with if function maybe.
So when my player collect 10 object - to Shows on my screen “You Win”
Can anyone help me please?
Thank you

static var score:int=0; //store the score

var scoreTxt : GUIText;



function updateScore(val : int)

{

	score= score + val;

}



function Update () 

{

	scoreTxt.text="Score: " + score; 	

}

A simple guitext that has no text and is centered with the bold and size you want etc.

Then just a condition If(score >= 10) but in Javascript.

that then sets the guitext to “You Win” that easy. (Might have to link the object in editor. I have no idea how to do that in javscript.)