2d project
acceleration = 500
maxSpeed = 1500
friction = 250
velocity = Vector2.ZERO
state = move
airState = false
realSpeed = 0
//moving (acceleration)
velocity = velocity.move_toward(input_vector maxSpeed, acceleration delta)
//moving (no acceleration)
velocity = velocity.move_toward(Vector2.ZERO, friction* delta)
//brakes
friction = 900
velocity = move_and_slide(velocity)
some like that
edit: is not a car, its a ship, and im using a kinetic body