Rigidbody continues to add force on hold

I have a quick jump script here where when the user presses “up” the ball translates up. The problem is, when it is held, it continues to move the character upwards. Does anyone know a clever way to jump once, then stop adding force. If you give me pseudoscript I could probably figure it out for myself. Thanks a bunch.

var jumpSpeed : float = 0;
   
   function Update () {
   
     if (Input.GetKey ("up")) {
         
         rigidbody.velocity = transform.up * jumpSpeed;
 
	}
}

You need to check, if the ball is grounded.

var jumpSpeed : float = 10;
var isGrounded : boolean = false;
var ballHeight : float = 0.5;
 
function Update () {
    isGrounded = Physics.Raycast(transform.position,-transform.up,ballHeight);
 
    if(isGrounded && Input.GetKeyDown("up"))
        rigidbody.velocity = transform.up * jumpSpeed;
}

–David–