How to use 1 script for multiple enemies ?

I want to make multiple enemies with 1 script, if I just duplicate the prefab with attached script, 1 die, all will die. How can I make it with just 1 script, so don’t need multiple script ?
My script :

static var health : int;
var playerDistance : int;
static var player : GameObject;
static var attacking :  boolean = false;
var attackEffect : AudioClip;
var move : boolean = true;
var isdead : boolean = false;
static var hurt : boolean = false;
var target : Transform;
var aware : boolean = false;
var character : GameObject;
var agent : NavMeshAgent;

function Update(){
	if(hurt){
		if(health > 0){
			TakenDamage(); //reducing enemy health
		}
	}
	playerDistance = Vector3.Distance(player.transform.position, transform.position);
	if(playerDistance <= 1){
		if(!attacking && health > 0 && !hurt){
			move = false;
			GetComponent.<NavMeshAgent>().Stop();
			animAttack(); //attacking
		}
	}
	if(playerDistance > 1 && playerDistance <= 25 && !attacking && this.health > 0 && !hurt){
		agent.destination = target.transform.position;
		agent.Resume();
		if(!aware){
			animMove(); //moving
		}
		if(aware){
			run(); //running
		}
	}
	if(playerDistance > 25 && health > 0){
		move = false;
		GetComponent.<NavMeshAgent>().Stop();
		GetComponent.<Animation>().Play("idle");
	}
	if(health <= 0){
		die();
	}
	if(UIs.health < 0){
		UIs.health = 0; // player's health
	}
}

function die(){
	if(!isdead){
		GetComponent.<Animation>().Play("death");
		Destroy(gameObject, 3);
		isdead = true;
		move = false;
		GetComponent.<NavMeshAgent>().Stop();
		UIs.zombie--; //reducing zombies in UIs script
	}
}

function TakenDamage(){
	GetComponent.<Animation>().Play("damage01");
	GetComponent.<NavMeshAgent>().Stop();
	yield WaitForSeconds(GetComponent.<Animation>().clip.length);
	hurt = false;
	move = false;
}

You are on the right track, making prefabs with the script is the way to do this. Your problem is in static variables, you should read up on them. Gist of it is that static variables don’t belong to any instance, but to the class itself. So if you change the variable from anywhere, it will be changed for all the instances of that class. So making health a static variable is illogical, because every instance is going to have it’s own health, and it’s going to change depending on the state of the that instance e.g. falls down a ditch. Also I don’t know why you have a player variable, if it’s supposed to be reference to the game object script is attached to, then you don’t need it, just use gameObject in the script and it’ll get the game object script is attached to. I think can guess now that attacking shouldn’t be static either.

You rarely use static variables, so first think about doing it without them, and if it doesn’t work then use them.

You can reach the other script in the same gameobject with gameObject.GetComponent().variable;

So you don’t need static variable. The health can’t be static variable, use private or public.

I have found the answer, health should not be static and I just make function and call it in other script, so I don’t need to make it static any more. Thanks for your answers, it opens my mind.