Disable script

I have the following script attached to a collider called collider1:
function Update(){
if(Collision.GameObject(“Collision”));
(GetComponent(test) as test).enabled = true;
}

It is supposed to disable a script named test.

Use the OnTriggerEnter() function

function OnTriggerEnter(other: Collider){
	if(other.name == "Name"){
		other.gameObject.GetComponent(ScriptName).enabled = false;
	}
}