I what a hunger bar that actively goes down, then when you eat something it gives you more hunger points. Pretty simple, right? Everything works except when it adds the points, it adds it, but then a second later, it just removes it. Whats going on?

(All three scripts are children of Hunger Points)

-Script 1-

val = script.Parent
val.Value = 600
while true do
	wait(1)
	val.Value = val.Value - 1 -- timer
end

-script 2-

while true do
	if script.Parent.Value == 0 then
		script.Parent.Value = 600 -- if your hunger hits 0 then it resets
	end
	wait(.5)
end

-script3-

while true do
	wait(.2)
	if game.Workspace.Eating.Value == 1 then
		script.Parent.Value = script.Parent.Value + 300 -- if you eat food then it adds 300
		game.Workspace.Eating.Value = 0
	end
end