how could i add stamina in my game?

i want to add stamina so i could limit how much the player attack and add a new potion. pls help

Start from a 100 and make filters to stop attacking after it goes below a specific number.

Similar to this health bar example:
https://flowlab.io/game/play/9822

@“JR 01” thx