Advertisement
mrhotmadm

K1LLOX Speed Script [UNIVERSAL]

Aug 27th, 2020
518
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.27 KB | None | 0 0
  1. -- << K1LL0X >> --
  2. -- NOT MINE --
  3.  
  4. --This may be a little buggy, so beware.
  5. --Hold "Q" to speed up
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12. down = false
  13. velocity = Instance.new("BodyVelocity")
  14. velocity.maxForce = Vector3.new(100000, 0, 100000)
  15. local speed = 150
  16. gyro = Instance.new("BodyGyro")
  17. gyro.maxTorque = Vector3.new(100000, 0, 100000)
  18.  
  19. local hum = game.Players.LocalPlayer.Character.Humanoid
  20.  
  21. function onButton1Down(mouse)
  22.     down = true
  23.     velocity.Parent = game.Players.LocalPlayer.Character.UpperTorso
  24.     velocity.velocity = (hum.MoveDirection) * speed
  25.     gyro.Parent = game.Players.LocalPlayer.Character.UpperTorso
  26.     while down do
  27.         if not down then break end
  28.         velocity.velocity = (hum.MoveDirection) * speed
  29.         local refpos = gyro.Parent.Position + (gyro.Parent.Position - workspace.CurrentCamera.CoordinateFrame.p).unit * 5
  30.         gyro.cframe = CFrame.new(gyro.Parent.Position, Vector3.new(refpos.x, gyro.Parent.Position.y, refpos.z))
  31.         wait(0.1)
  32.     end
  33. end
  34.  
  35. function onButton1Up(mouse)
  36.     velocity.Parent = nil
  37.     gyro.Parent = nil
  38.     down = false
  39. end
  40.  
  41. function onSelected(mouse)
  42.     mouse.KeyDown:connect(function(k) if k:lower()=="q"then onButton1Down(mouse)end end)
  43.     mouse.KeyUp:connect(function(k) if k:lower()=="q"then onButton1Up(mouse)end end)
  44. end
  45.  
  46. onSelected(game.Players.LocalPlayer:GetMouse())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement