Toggle Battery Percentage in Menubar

Hey guys, I would love to create an automation that'll show battery percentage when battery level goes under 10% and hide the percentage when it's above 10%.

I would appreciate any script that can toggle battery percentage in menubar. Guess I can create a custom trigger based on it.