how to make it that longer the key is pressed the faster the object rotates?

this is my script

#pragma strict

var rotationSpeed = 100;
var jumpHeight = 8;

private var isFalling = false;

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

You can use an axis, that will scale as you hold the key, between 0 and 1.

Otherwise as others have said, keep a speed variable and increment it by some constant times the elapsed frame time every Update that the key is pressed.