local l=game.Players.LocalPlayer repeat wait()until l.Character local u=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local V=l.Character:WaitForChild("\072\117\109\097\110\111\105\100")local p=100 local n=100 local h local T if l:FindFirstChild("\072\117\110\103\101\114\086\097\108")then T=l.HungerVal T.Value=n else(Instance.new("\073\110\116\086\097\108\117\101",l)).Name="\072\117\110\103\101\114\086\097\108"l.HungerVal.Value=n T=l.HungerVal end if l:FindFirstChild("\084\104\105\114\115\116\086\097\108")then h=l.ThirstVal h.Value=p else(Instance.new("\073\110\116\086\097\108\117\101",l)).Name="\084\104\105\114\115\116\086\097\108"l.ThirstVal.Value=p h=l.ThirstVal end local N=l:WaitForChild("\072\117\110\103\101\114\086\097\108")local Y=thirstGui.Frame local d=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")h.Changed:connect(function()if h.Value>60 then(d:Create(Y.Sede,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3=Color3.fromRGB(255,255,255);ImageTransparency=1})):Play()elseif h.Value<=0 then MedicSys.Fome:FireServer()print("\112\108\115 \100\114\105\110\107")elseif h.Value<=30 then(d:Create(Y.Sede,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3=Color3.fromRGB(255,(h.Value/30)*255,(h.Value/60)*255);ImageTransparency=.5})):Play()elseif h.Value<=60 then(d:Create(Y.Sede,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3=Color3.fromRGB(255,255,(h.Value/60)*255),ImageTransparency=.5})):Play()end end)N.Changed:connect(function()if N.Value>60 then(d:Create(Y.Fome,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3=Color3.fromRGB(255,255,255);ImageTransparency=1})):Play()elseif N.Value<=0 then MedicSys.Fome:FireServer()print("\112\108\115 \102\111\111\100")elseif N.Value<=30 then(d:Create(Y.Fome,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3=Color3.fromRGB(255,(N.Value/30)*255,(N.Value/60)*255),ImageTransparency=.5})):Play()elseif N.Value<=60 then(d:Create(Y.Fome,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3=Color3.fromRGB(255,255,(N.Value/60)*255);ImageTransparency=.5})):Play()end end)while wait(ServerConfig.HungerWaitTime)do if h.Value-1>=0 then h.Value=h.Value-1 end if N.Value-1>=0 then N.Value=N.Value-1 end end
--local Text = thirstGui:WaitForChild("Back"):WaitForchild("Text")
local plr = game.Players.LocalPlayer

repeat
	wait()
until plr.Character -- waiting for player to load

local UIS = game:GetService("UserInputService")
local hum = plr.Character:WaitForChild("Humanoid")
local maxThirst = 100
local maxHunger = 100
local thirstValue
local hungerValue

if plr:FindFirstChild("HungerVal") then
	hungerValue = plr.HungerVal
	hungerValue.Value = maxHunger
else
	Instance.new("IntValue", plr).Name = "HungerVal"
	plr.HungerVal.Value = maxHunger
	hungerValue = plr.HungerVal
end

if plr:FindFirstChild("ThirstVal") then
	thirstValue = plr.ThirstVal
	thirstValue.Value = maxThirst
else
	Instance.new("IntValue", plr).Name = "ThirstVal"
	plr.ThirstVal.Value = maxThirst
	thirstValue = plr.ThirstVal
end

local hungerValue = plr:WaitForChild("HungerVal")
local Frame = thirstGui.Frame

local TS = game:GetService("TweenService")

thirstValue.Changed:connect(function()
	if thirstValue.Value > 60 then
		TS:Create(
			Frame.Sede,
			TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0),
			{ ImageColor3 = Color3.fromRGB(255, 255, 255), ImageTransparency = 1 }
		):Play()
	elseif thirstValue.Value <= 0 then
		MedicSys.Fome:FireServer()
		print("pls drink")
	elseif thirstValue.Value <= 30 then
		TS:Create(
			Frame.Sede,
			TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0),
			{
				ImageColor3 = Color3.fromRGB(255, ((thirstValue.Value / 30) * 255), ((thirstValue.Value / 60) * 255)),
				ImageTransparency = 0.5,
			}
		):Play()
	elseif thirstValue.Value <= 60 then
		TS:Create(
			Frame.Sede,
			TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0),
			{ ImageColor3 = Color3.fromRGB(255, 255, ((thirstValue.Value / 60) * 255)), ImageTransparency = 0.5 }
		):Play()
	end
end)

hungerValue.Changed:connect(function()
	if hungerValue.Value > 60 then
		TS:Create(
			Frame.Fome,
			TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0),
			{ ImageColor3 = Color3.fromRGB(255, 255, 255), ImageTransparency = 1 }
		):Play()
	elseif hungerValue.Value <= 0 then
		MedicSys.Fome:FireServer()
		print("pls food")
	elseif hungerValue.Value <= 30 then
		TS:Create(
			Frame.Fome,
			TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0),
			{
				ImageColor3 = Color3.fromRGB(255, ((hungerValue.Value / 30) * 255), ((hungerValue.Value / 60) * 255)),
				ImageTransparency = 0.5,
			}
		):Play()
	elseif hungerValue.Value <= 60 then
		TS:Create(
			Frame.Fome,
			TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0),
			{ ImageColor3 = Color3.fromRGB(255, 255, ((hungerValue.Value / 60) * 255)), ImageTransparency = 0.5 }
		):Play()
	end
end)

while wait(ServerConfig.HungerWaitTime) do
	if thirstValue.Value - 1 >= 0 then
		thirstValue.Value = thirstValue.Value - 1
	end

	if hungerValue.Value - 1 >= 0 then
		hungerValue.Value = hungerValue.Value - 1
	end
end
