How can i make health system like this

What part of that exactly are you trying to create? I could see multiple features in there.

  1. Basic health meter, decreases as player takes damage
  2. Recharge level, health regained during rest
  3. Some link between combo punches that decreases total health but still allows a portion to be regained.

Do you need a health meter exactly like that or do you just want to make a generic “health bar” and need help starting?