How to gain access to variables of other gameobject?

Sorry in advance if I am asking a newbie question:

I have a 2 gameobject in my scene

a GUI script container and a human.

For the human there is a variable i named health.

What I want to do is when I press the button in the GUI class, it will then decrease the human’s health by 10.

I am not exactly sure how to gain access to the human’s health inside the GUI script.

Thanks in advance
Sunny

-in the script of Human set the variable health as public

public int health;//or float

-in GUI script you have to find Human.gameobject

public GameObject human;//set this from inspector

and then the script that is carrying(lets say the name of the script is HumanScript)

HumanScript humanScript;

and in Start

void Start () {
	human=GameObject.Find("human");//if you dont want to set from inspector where "human" is the name of the object human in your scene
	humanScript=human.GetComponent<humanScript>(); //take the script from human
}

and in your OnGUI.Button if pressed say

humanScript.health-=10;//or 10f (if float)