How do i Call a Var from object's child?

i know this has been asked a bunch of time’s but i dont understand. . .

im in my Gui object (empty) and i want to put a 2d texture on the screen if my player.MainCamera.Variable is 1 and so forth

how would i call apon another objects child’s script through another script/object?
and is it the same for just an object that is seperate?

Yes, it’s the same as accessing a variable in a separated object: get a reference (transform, camera, collider, rigidbody etc.) to the target object, then use GetComponent to get a reference to the script and access the variable with it. The only difference is that you can use GetComponentInChildren to find the script reference directly. Supposing that the camera script is called CameraScript, you can use something like this:

var camScript: CameraScript = GetComponentInChildren(CameraScript);
if (camScript.variable == 1){
   ...

It’s better to find the script reference at Start, so that you’ll not waste time searching for it every Update:

private var camScript: CameraScript;

function Start(){
    camScript = GetComponentInChildren(CameraScript);
}

NOTE: Usually it’s a bad idea to have a GUIText or GUITexture childed to a world object: these elements assume that their position property is in viewport coordinates, and any change in the parent position kicks the GUI element out of screen. This doesn’t affect the GUI system (items rendered via OnGUI), which uses screen coordinates.