Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I add a Gui For the stamina?

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 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.