How can I make a system where player stamina is being used for sprinting, jumping, attacking?

I did tried that but what happens is I set to reduce stamina by 10 but it keeps on reducing the stamina during the jump until it is left with 10 stamina and then the regeneration does not work. Could you please assist.