This is the sprint script:

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)