Here's the actual script, I don't' know how to add a Gui for the amount of stamina the player has.
Mouse.KeyUp:connect(function(shiftUp)
if shiftUp:byte() == 48 then
sprinting = false
end
end)
Mouse.KeyDown:connect(function(shiftDown)
if shiftDown:byte() == 48 then
player.Character.Humanoid.WalkSpeed = 22
sprinting = true
if stamina.Value <=0 then --Less than, in case it goes negative
sprinting = false
end
while sprinting do
stamina.Value = stamina.Value -1
wait(.1)
end
player.Character.Humanoid.WalkSpeed = 16
end
end)

1 comment
:( I know how to make a Gui