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)
Here's a link to the Beginner's GUI Tutorial on the ROBLOX wiki:
http://wiki.roblox.com/index.php?title=Beginner%27s_GUI_Tutorial
In your case, you will need to create a ScreenGui in StarterGui with a Frame inside, and in your script, change the Size property of the Frame each time the stamina is changed.