@david8184 said:
I would like to make a video game that consists of a character who has to collect coins with the jetpack and also that there is a bar that runs out of gasoline ...
If you mean from a programming point of view, set variables for fuel and the rate fuel is depleted, and also the rate at which fuel can be replenished.
On the func _input(_event):
check to see if the "use jetpack" key is being pressed, if it is, and there's fuel, have your character controller get "boosted" the way you want.
In your func _process(delta):
function check to see if you're either boosting or not. Based on that you can add or remove fuel at the rates you chose.