Increase value depending on total velocity?

Ok… Is it possible for me to increase my “var rate” depending on my rigidbody’s total velocity? Eg Rate = 20, if velocity = 0 then rate = 200, if velocity = 10 then rate = 2010 etc.

I’m a spaceship with fuel and when I use the retro rocket (brake) I want to tell the fuel gauge to decrease. But I want it to decrease faster if I’m traveling faster eg more reverse thrust is needed to slow the space ship.

You almost provided the answer yourself:

var baseRate:float = 20;
...
    rate = baseRate*rigidbody.velocity.magnitude;

This generates a rate directly proportional to the velocity, no matter its direction.

You can have more control if you specify a baseVel variable - the rate will be baseRate when the velocity is baseVel:

var baseRate:float = 20;
var baseVel:float = 5;
...
    rate = baseRate*rigidbody.velocity.magnitude/baseVel; // rate = 20 when vel = 5