What's problem with my script?

Hello, I have animation on my container Open close. Script attached to container itself.
I am operating it by

Input.GetButtonDown(“Fire1”); and
private var Activated : boolean;

So when only one object on scene all works fine. Animation is works great. but when i duplicate that object and toching they . One Variable works for both. First object = true. then when i click other playing second animation (that need variable = true); How can variable works only for that object that i clicked?

class AnimateObject extends MonoBehaviour 
{
public var playerCam : Camera;
public var obj : String;
public var HighLightColor : Color;
public var anim1 : String;
public var anim2 : String;
public var distanceToObj : float = 2.0;
private var currentObj : GameObject;
var Anim1Sound : AudioClip;
var Anim2Sound : AudioClip;
private var CanPressButton : int = 1;


private var _Activated : boolean = false;
function AnimateThatObj(obj,anim1 : String,anim2 : String)
{
var hit : RaycastHit;
var ray : Ray = playerCam.ScreenPointToRay(new Vector3(Screen.width * 0.5, Screen.height * 0.5, 0)); 
if(Physics.Raycast(ray.origin, ray.direction,hit, distanceToObj)){

}
if (Input.GetButtonDown("Fire1")  CanPressButton == 1){

if(Physics.Raycast(ray.origin, ray.direction,hit, distanceToObj)){
				
if(hit.collider.gameObject.tag==obj  _Activated  == false){
currentObj = hit.collider.gameObject;
ObjectControl(Anim1Sound,true,anim1,currentObj);
								
	}
						
	else if(hit.collider.gameObject.tag==obj  _Activated  == true)
		{
	currentObj = hit.collider.gameObject;
	ObjectControl(Anim2Sound,false,anim2,currentObj);
								
							
		}
Debug.Log(currentObj.GetComponent("Animate Object")._Activated);
				}
}
	
}


function ObjectControl(aClip : AudioClip, ActivatedCheck : boolean, animName : String, thisObj : GameObject)
{
audio.PlayOneShot(aClip);
_Activated  = ActivatedCheck;
thisObj.animation[animName].wrapMode = WrapMode.Once;
thisObj.animation.Play(animName);


}

	function AnimateCheking(){ 

		if (currentObj != 0) {

			if(currentObj.animation.isPlaying==true){ 

				CanPressButton = 0; 
				}
				else 
				{
				CanPressButton = 1;
				}
		}
	}


	function Update () {

		AnimateThatObj(obj,anim1,anim2);
		AnimateCheking();

		//Debug.Log(_Activated);
	}
	

}

If you use the GetButtonDown method, then whenver you press the mouse button down, you will activate the script. You need to use a method where you are specifically looking for a mouse button down on this object (collider)

For this, use OnMousedown: