Forward movement relative to rotation/position?

I’m making a space exploration game, it currently has 0 gravity applied to the entire scene. What I’m trying to get it to do is move in the direction it is facing, so all WASD does is control rotation. But with this current script the rotation works fine, but with a space click it moves up. Up and only up. Hope you can help, thanks.

var speed = 0.8;
var turnSpeed = 0.15;

function Start () {
    rigidbody.useGravity = false;
}

function Update () {
    if (Input.GetButton("Jump")) { //Spacebar by default will make it move forward
        rigidbody.AddRelativeForce (Vector3.forward*speed);
    }
    rigidbody.AddRelativeTorque ((Input.GetAxis("Vertical"))*turnSpeed,0,0);
    // W key or the up arrow to turn upwards, S or the down arrow to turn downwards.
    rigidbody.AddRelativeTorque (0,(Input.GetAxis("Horizontal"))*turnSpeed,0);
    // A or left arrow to turn left, D or right arrow to turn right. 
}

If I understand correctly, your whole issue is related to world and local axes.

Relative torque needs a global vector, so if you apply the global ‘forward’ or ‘up’, they will ALWAYS be -world- forward and up, which is different from the local forward or up.
Sadly, documentation is 100% obscure in regards to which are local and which are world references for these properties.

This should fix it:

Vector3 currentvertical = transform.TransformDirection(transform.up*Input.GetAxis("Vertical")*turnSpeed);
rigidbody.AddRelativeTorque(currentvertical);

Be sure to do the equivalent for horizontal (using transform.right), and you should be set.