How add score if correct answer?

So far, I’ve got this for a button:
var AcceptInput : boolean = true;
private static var score : int = 0;
var guiScore : GUIText;

function Start ()
{
guiScore.text = "Score: 0";
}


function OnMouseDown () {
if(AcceptInput)
{
AcceptInput = false;
}
GameObject.Find("Obejct").GetComponent(Script).enabled = true;
Debug.Log("Clicked");



score += 1;
guiScore.text = "Score: " + score;

}
function OnMouseUp () {
AcceptInput = true;
GameObject.Find("Object").GetComponent(Script).enabled = false;
}

And the script I want it to be activated:

var diamond : Sprite;
var circle : Sprite;
var triangle : Sprite;
var square : Sprite;
private var number : int;
private var spriteRenderer : SpriteRenderer;

function OnEnable() {

spriteRenderer = gameObject.GetComponent(SpriteRenderer);

number = Random.Range(1,5);

if(number == 1) {
spriteRenderer.sprite = diamond;
}

else if(number == 2) {
spriteRenderer.sprite = circle;
}

else if (number == 3) {
spriteRenderer.sprite = triangle;
}

else {
spriteRenderer.sprite = square;
}


}

How can i make it like if the sprite is diamond, add a score and play a sound and if not correct, start the score all over again?
Anyone have any ideas? Any help would be much appreciated! Thank You!

Not quite clear with what you want but as per I understand the below should do the trick:

In OnMouseDown() function of your first script:

GameObject.Find("Obejct").GetComponent(Script).enabled = true;

if(GameObject.Find("Obejct").GetComponent(Script).enabled.number == 1)
{ score += 1; }
else 
{ score = 0; }

In your second script make your number variable public so that it can be accessed from first script.

Note: Rather than using GameObject.Find() every time try to cache that result since GameObject.Find() is slow to use.