Score Questions

Destruction of the enemy is judged.
Score increase.
How to write code?

static var score:int=0;
var stringToEdit: String;
/*
function Start () {
	blood = PlayerPrefs.GetInt("score",3);
	DontDestroyOnLoad(this);
}
*/

function  OnControllerColliderHit (hit : ControllerColliderHit )
{
	 if(hit.gameObject.tag  == "enemy")
 {
	    score+=100;
	}	
}
function OnGUI(){
	StringToEdit=score.ToString();
	StringToEdit=GUI.TextField(Rect(450,40,120,35),StringToEdit,50);
	PlayerPrefs.SetInt("Player Score",score);
}

If score didn’t increase, it’s either because OnControllerColliderHit is never called, or it’s because the if-sentence inside it never evaluates to true:

function  OnControllerColliderHit (hit : ControllerColliderHit ) <--- Is never called 
{
     if(hit.gameObject.tag  == "enemy") <--- Or is never true
 {
        score+=100;
    }   
}

Check that the method is actually called by inserting some Debug.Log() in it. Then check the tags on the gameObjects you expect to collide with. Are they “enemy”? Remember that string comparison is case sensitive. Should it be “Enemy”?

Also, your indentation is a little funky. Try to make sure your brackets line up in the code, so it’s clear exactly when a block begins and ends.