while true do
wait()
--limit maximum amount--
if food.Value >= 101 then
food.Value = 100
elseif water.Value >= 101 then
water.Value = 100
elseif blood.Value >= 101 then
blood.Value = 100
elseif condition.Value >= 101 then
condition.Value = 100
end
------------------------
-- remove or add amounts naturally--
if not fooddebounce then
fooddebounce = true
food.Value = food.Value - 1
wait(5)
fooddebounce = false
end
------------------------------------
end
Im trying to have the “maximum amount” block of code run without any debounce and only have the “add or remove” block of code run debounce. but by setting fooddebounce to true the whole script is affected.