How to gradualy decrease all rigidbody added forces?

I am beginner and 3d artist! I making Space Shooter game in JavaScript with camera from bird-view, spaceship can turn around with “AddForce” floating freely in space and i want to decrease all rigidbody added forces on “Input.GetKey” function, but i dont have idea how to :confused: this is my code:

var speed : float = 10;
var rotationSpeed: float = 10;
var sideForce : float = 20;
var topSpeed : float = 20;

function Update()
{
	//MOVEMENT...
	if(Input.GetKey("s") || Input.GetKey("0"))
	{
		rigidbody.AddRelativeForce(Vector3.back * speed * Time.deltaTime);
	}
	if(Input.GetKey("w") || Input.GetKey("1"))
	{
		rigidbody.AddRelativeForce(Vector3.forward * speed * Time.deltaTime);
	}
	
		if(Input.GetKey("q") || Input.GetKey("0"))
	{
		rigidbody.AddRelativeForce(Vector3.left * sideForce * Time.deltaTime);
	}
	
		if(Input.GetKey("e") || Input.GetKey("0"))
	{
		rigidbody.AddRelativeForce(Vector3.right * sideForce * Time.deltaTime);
	}
	
		if(Input.GetKey("a"))
	{
		transform.Rotate(Vector3.down * rotationSpeed * Time.deltaTime);
	}
	
		if(Input.GetKey("d"))
	{
		transform.Rotate(Vector3.up * rotationSpeed * Time.deltaTime);
	}
	
		
	//unsuccessful attempts to make braking sistem on spaceship (speed slowing down)
	if (rigidbody.velocity.magnitude > topSpeed)
    rigidbody.velocity = rigidbody.velocity.normalized * topSpeed;
    
    transform.eulerAngles.x=0;
    transform.eulerAngles.z=0;
    transform.position.y=0;
    
    if(Input.GetKeyDown(KeyCode.LeftShift))
    {
        rigidbody.velocity = Vector3.zero;
    }
}

You could cheat and simply increase rigidBody.drag