transform.Translate moving while upside down?

Alright, So I am trying to design a racing type of game, and I have this snippit of code:

    if (Input.GetKey(KeyCode.W) || Input.GetKey(KeyCode.UpArrow))
    {//if "W" or "UpArrow" is pressed
        currentSpeed += Speed; //increase the speed
        SlowingDownSpeed = 0; //disable slowing down
        if(currentSpeed <= 0)
        {//if the speed is in reverse / in park
            currentSpeed*= -1; //make it positive
        }
    }

If the car is facing up in air, like this (sorry for bad handwriting):


Then If I hold Up Arrow or “W” it goes higher in the air.

The reason I don’t think it is normal is if the car is upside down, like this:


It still would move forward, I don’t know if there is a way to fix this, so any help would be appreciated, thanks!

You probably want to check if the car is on the ground. If the car is on the ground then allow user input.

Lock the user input if the car is in the air.

Also lock the input if the car is on its back. Or you can switch the normal input to affect rotation, so the player input can flip the car back on its wheels.

Once the car is positioned correctly, then allow normal driving input from the Player.