Problem with my weapon change script

The problem is that the player can't fire. After i press (1) and try to fire nothing happened. I am trying to make a script that when i press button (1) to shoot with weapon 1 and pressing (2) to shoot with weapon 2.

var rotatespeed : float = 3.0f ;

var BulletPrefab : Transform ;

var BulletPrefab1 : Transform ;

function Update () {

// Mouse controll

var playerPlane = new Plane(Vector3.up, transform.position);

var ray = Camera.main.ScreenPointToRay (Input.mousePosition);

var hitdist = 0.0;

if(playerPlane.Raycast (ray, hitdist)) 

{

var targetPoint = ray.GetPoint(hitdist);

var targetRotation = Quaternion.LookRotation(targetPoint - transform.position);

transform.rotation = Quaternion.Slerp(transform.rotation, targetRotation, rotatespeed * Time.deltaTime);

}

// Bullet Spawn

if(Input.GetKeyDown("1")) 

{

    var weapon1 = 1 ;

    Debug.Log("press 1") ;

    if(Input.GetButtonDown("Fire1") && weapon1 == 1) {
        var bullet = Instantiate(BulletPrefab, GameObject.Find("bulletspawn").transform.position, transform.rotation );

        bullet.rigidbody.AddForce(transform.forward * 1000) ;

        Debug.Log("Fire weapon 1") ;

    }

}

if(Input.GetKeyDown("2")) 

{

    var weapon2 = 2 ;

    Debug.Log("press 2") ;

    if(Input.GetButtonDown("Fire1") && weapon2 == 2) 

{

        var bullet1 = Instantiate(BulletPrefab1, GameObject.Find("bulletspawn").transform.position, transform.rotation );

        bullet.rigidbody.AddForce(transform.forward * 1000) ;

        Debug.Log("Fire weapon 2") ;

    }
}

}

As to your question, I suggest a slightly different logic for the weapons. What I did, was make a gun script that contained a var for the fire key. Then, in a different script(a gun manager), I made an array of gameObjects that were the guns. Then, in the update function, I used a for loop like this one:

function Update()
{
 for(i = 0; i < [gun var here].length; i++)
 {
  if(Input.GetButtonDown([gun var here]*.GetComponent(Gun).[key to activate var here]))*
 *{*
 *ChangeToGun(i)*
 *}*
 *}*
*}*
*```*
*<p>Then you would have a change to gun function like this one:</p>*
*```*
*function ChangeToGun(gunInt : Int)*
*{*
 *for(i = 0; i < [gun var here].length; i++)*
 *{*
 *[gun var here].active = false;*
 *}*
 *[gun var here][gunInt].active = true;*
*}*
*```*
*<p>Then you would use the instantiate command you used above in a gun script. Just make sure that it has a key to activate var:</p>*
*```*
*var keyToActivate : KeyCode;*
*```*
*<p>Also, just a hint, look up Time.time in the documentation, it will give a simple machine gun script!!! :)</p>*