How to use functions between two scripts

OKAY OKAY, before you go getting mad and closing my question i have tried googleing this and none of them really helped me and just left me confused.
So i want to call the function on this script
#pragma strict

var Health = 100;

function Update () {
    if (Health <= 0) {
        Dead ();
        // call function here
    }
}
function ApplyTheDamage (theDamage : int) {
    yield WaitForSeconds (0.4); 
    Health -= theDamage;
}

function Dead () {
    Destroy (gameObject);
    Debug.Log("+100");
}

and then execute it on this script

#pragma strict

function scoreShow () {
    //execute this function
    Debug.Log("function is initiating");
    gameObject.guiText.enabled = true;
    yield WaitForSeconds(3);
    Debug.Log("yield successful");
    gameObject.guiText.enabled = false;        
}


function Start () {
    gameObject.guiText.enabled = false;
}

The two scripts are also on different game objects

You just need to have a script variable that references the other gameobject’s script, and then you just call the function like this:

var otherScript;

otherScript.ApplyTheDamage();

You can also use a GameObject variable to reference the whole other GameObject.

var GameObject otherObject;

otherObject.GetComponent(otherScript).ApplyTheDamage();

How you “populate” the script or GO variables is up to you; for example, you could use GameObject.Find or just drag it to the variable’s slot in the inspector.

People are rarely mad when closing questions. This particular question gets closed all the time because it has been answered so frequently and in so many different ways. In fact, it rarely makes it through moderation. Here are two references:

http://docs.unity3d.com/412/Documentation/ScriptReference/index.Accessing_Other_Game_Objects.html

Assuming your other script was named ‘Score’, and the name of the game object with the script was ‘TheScore’. Then you could access the function by:

 GameObject.Find("TheScore").GetComponent(Score).scoreShow();

Note when I did and did not use quotation marks in the above line. That’s important. Note for something that will be executed every frame, it would be better to do the Find() in Start() and cache the reference to the script. Or use a public variable for the script and initialize it by drag and drop.