Ok so I have this script
local CAS = game:GetService("ContextActionService")
local RE = game:GetService("ReplicatedStorage"):WaitForChild("RE")
local fill = script.Parent:WaitForChild("Top"):WaitForChild("fill")
local stam = 50
local speed = 16
local sprinting = false
local function sprint(str, state, object)
if stam < 1 then return end
speed = state == Enum.UserInputState.Begin and 24 or 16
sprinting = state == Enum.UserInputState.Begin
while sprinting and stam > 0 and wait(.1) do
stam = stam - 1
fill:TweenSize(UDim2.new(stam/50,0, 1, 0), "Out", "Quint", .1, true)
RE:FireServer("sprint", {speed})
end
sprinting = false
speed = 16
RE:FireServer("sprint", {speed})
wait(1)
while not sprinting and stam < 50 and wait(.1) do
fill:TweenSize(UDim2.new(stam/50,0, 1, 0), "Out", "Quint", .1, true)
stam = stam + 1
end
end
CAS:BindAction("sprint", sprint, true, Enum.KeyCode.LeftShift)
Now is there a way to make it take away thirst as well and if so how would I do that?