Need help with begginner script!

I believe this is a very noob script. I just started programming in unity. :stuck_out_tongue: So in this script i want a ball to jump when spacebar OR W is pressed.

#pragma strict

var rotationSpeed= 100;
var jumpHeight = 8;

private var isFalling = false;

function Update () 
{
	//Handles ball rotation.
	var rotation : float = Input.GetAxis ("Horizontal") * rotationSpeed;
	rotation *= Time.deltaTime;
	rigidbody.AddRelativeTorque (Vector3.back * rotation);
	
	if (Input.GetKeyDown(KeyCode.W) && isFalling == false)
	{
		rigidbody.velocity.y = jumpHeight;
	}
	isFalling = true;
	
	if (Input.GetKeyDown(KeyCode.Space) && isFalling == false)
	{
		rigidbody.velocity.y = jumpHeight;
	}
	isFalling = true;
}

function OnCollisionStay ()
{
	isFalling = false;
}

//The w key is working but not the spacebar. Why? Please help!

Try this :

function Update () {
    //Handles ball rotation.
    var rotation : float = Input.GetAxis ("Horizontal") * rotationSpeed;
    rotation *= Time.deltaTime;
    rigidbody.AddRelativeTorque (Vector3.back * rotation);

    if (Input.GetKeyDown(KeyCode.W) && isFalling == false)
    {
        rigidbody.velocity.y = jumpHeight;
        isFalling = true;
    }
    if (Input.GetKeyDown(KeyCode.Space) && isFalling == false)
    {
        rigidbody.velocity.y = jumpHeight;
        isFalling = true;
    }
}