How can I activate a scripts variable from another gameobject?

I didn’t really know how to describe it in that question, but this is what I really mean.

Alright, I’m trying to disable a variable from another script.

For example.
If this GameObject == Clicked then.

Inside Script SummonButton. Summon = false;

Bottom line I’m really trying to find out a way to disable Summoning because of a card effect.

Game View Ex:

Player activated the Card “OFF Boundaries”

Opponent is Unable to Summon.

But idk how to do this…

Another visual of how this works is. My Script is a global function.
I placed my Script SummonButton in an empty GameObject
The SummonButton script is always active, and what it does is this.

If I click a card that is tagged Monster Card it’ll show up a Gui Button named Summon.
If I click Summon then it’ll apply it’s effect and what not.

Since I will be having cards that’ll effect the way my Summoning Button can and can’t do.
and cards that’ll effect other things like drawing and shuffling, or disabling other stuff.
I’d really like to know how I can do this or If it’s possible.

Can someone please give me a hand?

Here’s what I tried to do in a Cube Gameobject.

var Jeq : MonoScript;

function OnMouseDown()

{


showButton2 = false;
}

Here’s my Summoning Script Button.

private var showButton = false;
private var showButton2 = false;
private var pos : Vector2;
private var hit : RaycastHit;
var Occupied1 : GameObject;
var Occupied2 : GameObject;
var Occupied3 : GameObject;
var Occupied4 : GameObject;
var Occupied5 : GameObject;
var Clicked = false;
var Zone1 : float = 3.546595;
var Zone2 : float = 1.466332;
var Zone3 : float = -0.5914766;
var Zone4 : float = -2.645551;
var Zone5 : float = 3.546595;
var jeq : MonoScript;
	var target1: Transform;
		var speed: float;
		var Summon : boolean;
		private var selectedCard : GameObject;
		var Summoning : boolean;
		var inHand = true;
		var from : Transform;
		var to : Transform;
		


function Update(){

var step = speed * Time.deltaTime;
    if (Input.GetMouseButtonDown (1) && showButton){
    	showButton = false;
    	showButton2 = false;
    }		 	  	          	
    
    if (Input.GetMouseButtonDown (0) && !showButton)
    {	
        CheckClick ();

    }
        	if (selectedCard.transform.position == target1.position){
    	Summon = false;
    	Screen.lockCursor = false;
    	CheckClick ();}
    if (Summon == true)
    
    {
	
    	
         selectedCard.transform.rotation =
		  Quaternion.Lerp (from.rotation, to.rotation, Time.deltaTime * speed);
        selectedCard.transform.position = Vector3.MoveTowards(selectedCard.transform.position, target1.position, step);
       {print("I have been Summoned!");}
       Screen.lockCursor = true;
    }

}

function OnGUI() {
    var e = Event.current;
 
    var x = pos.x - 50;  // Calc x and y to center of button
    var y = pos.y - 10;

    if (showButton && GUI.Button (Rect (x,y - 135, 100, 20), "Summon")) {
    print("Summoning");
    	Summon = true;
        showButton = false;
        showButton2 = false;
	}
	    if (showButton2 && GUI.Button (Rect (x,y - 110, 100, 20), "Set")) {
    print("Summoning");
    	Setting = true;
        showButton2 = false;
        showButton = false;
	}
}
 
function CheckClick() {

    var ray = Camera.main.ScreenPointToRay(Input.mousePosition);
    if (Physics.Raycast(ray, hit)) {
    Debug.Log("Card selected:"+hit.collider.name);
           if (hit.collider.tag == "Monster Card" ){
 					inHand = true;
 					showButton = true;
 					showButton2 = true;
                    selectedCard = hit.collider.gameObject; //Store my selection
                    from = selectedCard.transform;
                    if (hit.collider.tag == !selectedCard.tag){
			showButton2 = false;
           showButton = false;
           Summon = false;
           return;
           }
           }
           if (hit.collider.tag == "Monster Card"  && selectedCard.transform.position == target1.position)
           {inHand =  false;
           showButton = false;
           showButton2 = false;
           return;
           }
           if (hit.collider.tag == "Strength Card" ){
           showButton = false;
           showButton2 = false;
           Summon = false;
           return;
           }
           
           if (hit.collider.tag == "Will Card" ){
           showButton = false;
           showButton2 = false;
           Summon = false;
           return;
           }
           
         pos = Camera.main.WorldToScreenPoint(hit.transform.position);
         pos.y = Screen.height - pos.y;  // convert from Screen to GUI
         showButton = true;
         showButton2 = true;
      
    }
    else {
       showButton = false;
       showButton2 = false;
       return;
    }
}

Please help me I’d really appreciate it.

//Create a variable for use with your Cube Object later
var cube : GameObject;

//Calls the SummonButton script from the Cube Object on script Start
function Start()
{
//Uses the variable cube to reference the GameObject Cube
cube = GameObject.Find("Cube");

//Creates a new variable to reference the SummonButton script inside the Cube Object
var other : SummonButton = cube.GetComponent(SummonButton);
}


//Then when you want to call your bool on the SummonButton script you would use
other.showbutton2 = false;


//You must have created a reference variable for the Cube Object if the two 
//scripts are not on the same GameObject