Help with code

#pragma strict

var Bullet : Transform;
var Spawn : Transform;

function Update ()
{
if(Input.GetButtonDown(“Fire1”))
{
Shot();
}
}

function Shot()
{
var pel = Instantiate(Bullet, Spawn.position, Spawn.rotation);
pel.GetComponent.().AddForce(transform.forward * 5000);

}

I want to shoot only one bullet, that player got only 1 bullet to shoot.

You can make it shoot any number of times you want simply by inhibiting the shot method. For example, you could use another variable, say, ammo:

var Bullet : Transform; var Spawn : Transform;
var ammo : int;

function Update () { if(Input.GetButtonDown("Fire1")) { Shot(); } }

function Shot() { 
if(ammo>0){

var pel = Instantiate(Bullet, Spawn.position, Spawn.rotation); pel.GetComponent.().AddForce(transform.forward * 5000);

}
ammo--;

}

You would have to set the value of the variable first, of course.