local a=game.Players.LocalPlayer repeat wait()until a.Character local Q=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local d=a.Character:WaitForChild("\072\117\109\097\110\111\105\100")local B=100 local c=100 local i local G if a:FindFirstChild("\072\117\110\103\101\114\086\097\108")then G=a.HungerVal G.Value=c else(Instance.new("\073\110\116\086\097\108\117\101",a)).Name="\072\117\110\103\101\114\086\097\108"a.HungerVal.Value=c G=a.HungerVal end if a:FindFirstChild("\084\104\105\114\115\116\086\097\108")then i=a.ThirstVal i.Value=B else(Instance.new("\073\110\116\086\097\108\117\101",a)).Name="\084\104\105\114\115\116\086\097\108"a.ThirstVal.Value=B i=a.ThirstVal end local y=a:WaitForChild("\072\117\110\103\101\114\086\097\108")local r=thirstGui.Frame local W=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")i.Changed:connect(function()script.Parent.Frame.Sede.ImageTransparency=0 script.Parent.Frame.Fome.ImageTransparency=0 if i.Value>60 then(W:Create(r.Sede,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3=Color3.fromRGB(255,255,255),ImageTransparency=1})):Play()elseif i.Value<=0 then MedicSys.Fome:FireServer()elseif i.Value<=30 then(W:Create(r.Sede,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3=Color3.fromRGB(255,(i.Value/30)*255,(i.Value/60)*255);ImageTransparency=0})):Play()elseif i.Value<=60 then(W:Create(r.Sede,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3=Color3.fromRGB(255,255,(i.Value/60)*255);ImageTransparency=0})):Play()end end)y.Changed:connect(function()if y.Value>60 then(W:Create(r.Fome,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3=Color3.fromRGB(255,255,255);ImageTransparency=1})):Play()elseif y.Value<=0 then MedicSys.Fome:FireServer()elseif y.Value<=30 then(W:Create(r.Fome,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3=Color3.fromRGB(255,(y.Value/30)*255,(y.Value/60)*255);ImageTransparency=0})):Play()elseif y.Value<=60 then(W:Create(r.Fome,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3=Color3.fromRGB(255,255,(y.Value/60)*255),ImageTransparency=0})):Play()end end);(coroutine.wrap(function()while wait(ServerConfig.HungerWaitTime)do if y.Value-1>=0 then y.Value=y.Value-1 end end end))()coroutine.wrap(function()while wait(ServerConfig.ThirstWaitTime)do if i.Value-1>=0 then i.Value=i.Value-1 end 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()
	script.Parent.Frame.Sede.ImageTransparency = 0
	script.Parent.Frame.Fome.ImageTransparency = 0

	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()
	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,
			}
		):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 }
		):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()
	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,
			}
		):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 }
		):Play()
	end
end)

coroutine.wrap(function()
	while wait(ServerConfig.HungerWaitTime) do
		if hungerValue.Value - 1 >= 0 then
			hungerValue.Value = hungerValue.Value - 1
		end
	end
end)()

coroutine.wrap(function()
	while wait(ServerConfig.ThirstWaitTime) do
		if thirstValue.Value - 1 >= 0 then
			thirstValue.Value = thirstValue.Value - 1
		end
	end
end)
