Advertisement
Previized

LocalScript ("SpeedHandler")

Nov 14th, 2020
3,070
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.53 KB | None | 0 0
  1. --@author FiredDusk (aka Previized)
  2.  
  3. --// Client
  4. local Player = game.Players.LocalPlayer
  5. local Character = Player.Character or Player.CharacterAdded:Wait()
  6. local Mouse = Player:GetMouse()
  7. local Camera = workspace.CurrentCamera
  8.  
  9. local SpeedTextLabel = Player.PlayerGui:WaitForChild('Main'):WaitForChild('Speed')
  10.  
  11. --// Main
  12. while wait() do
  13.     local HumanoidRootPart = Character:FindFirstChild('HumanoidRootPart')
  14.     if HumanoidRootPart then
  15.         SpeedTextLabel.Text = 'Speed: ' ..math.floor(HumanoidRootPart.Velocity.magnitude)
  16.     end
  17. end
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement