This does work, and works correctly as far as I can tell so I can pass this.
However, do note that it would probably make much more sense to start with a full bar when fuel is full that depletes as fuel depletes, instead of the other way around. It could also be a good idea to make it only refuel when on the ground to attempt to balance it somewhat and avoid cheesing situations a little, even though you do have the weird thing that stops you gaining vertical speed after some point.