I realised I should have ripped this out of InterXeptor 3D back when that came out (a year ago now!), but I never got around to it. (See how the original version of this is used in InterXeptor 3D here: https://scratch.mit.edu/projects/10085324/ ) The only tweaks I've added, compared to the original version in InterXeptor, are to make the colours change slowly from green to orange to red as the value decreases (rather than abrupt changes at 70% and 20%), and make it look OK for height down to 4 (was 6).
One of the things I particularly liked about this status bar was the way the 'dot' shrinks in size as it approaches zero. Minimum useful height is four (below that the pen doesn't draw certain bits quite right because they're too thin). Feel free to tweak to taste - hopefully somebody somewhere might find it useful! :)