-- Call AddStamina or RemoveStamina and add a number into the brackets between 0-100 to add/deduct stamina.


local StaminaSystem = {}
StaminaSystem.StaminaValue = script.Parent.StaminaValue
StaminaSystem.StaminaCanRegen = true

function StaminaSystem.AddStamina(value)
	local newStamina = math.min(StaminaSystem.StaminaValue.Value + value, 100)
	StaminaSystem.StaminaValue.Value = newStamina
end

function StaminaSystem.RemoveStamina(value)
	local newStamina = math.max(StaminaSystem.StaminaValue.Value - value, 0)
	StaminaSystem.StaminaValue.Value = newStamina
end

return StaminaSystem
