How to make stamina drain like in fnaf security breach?

I’m trying to make a stamina that drains like FNAF security breach but I don’t know how to change it to be that complex I tried to search for tutorials on Youtube I found nothing can you please help?

This is the line of Code that handles the stamina tween

-- bar:TweenSize(UDim2.new((1/100) * stamina, 0, 1 ,0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0)