clientcmdshowenergybar(%on)
That already exists. That's not the hard part.
My problem with trying this is detecting when you are actually trying to go forwards (e.g. pressing W) without clientside mods and not taking fuel for using impulse cannons etc.