Advertisement
Magzz

IMVU CREDITScxzcc

Feb 17th, 2020
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. --made by 6magz
  2. --Hold "F" to speed up
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9. down = false
  10. velocity = Instance.new("BodyVelocity")
  11. velocity.maxForce = Vector3.new(100000, 0, 100000)
  12. ---vv Use that to change the speed v
  13. local speed = 85
  14. gyro = Instance.new("BodyGyro")
  15. gyro.maxTorque = Vector3.new(100000, 0, 100000)
  16.  
  17. local hum = game.Players.LocalPlayer.Character.Humanoid
  18.  
  19. function onButton1Down(mouse)
  20. down = true
  21. velocity.Parent = game.Players.LocalPlayer.Character.UpperTorso
  22. velocity.velocity = (hum.MoveDirection) * speed
  23. gyro.Parent = game.Players.LocalPlayer.Character.UpperTorso
  24. while down do
  25. if not down then break end
  26. velocity.velocity = (hum.MoveDirection) * speed
  27. local refpos = gyro.Parent.Position + (gyro.Parent.Position - workspace.CurrentCamera.CoordinateFrame.p).unit * 5
  28. gyro.cframe = CFrame.new(gyro.Parent.Position, Vector3.new(refpos.x, gyro.Parent.Position.y, refpos.z))
  29. wait(0.1)
  30. end
  31. end
  32.  
  33. function onButton1Up(mouse)
  34. velocity.Parent = nil
  35. gyro.Parent = nil
  36. down = false
  37. end
  38. --To Change the key in those 2 lines, replace the "F" with your desired key
  39. function onSelected(mouse)
  40. mouse.KeyDown:connect(function(k) if k:lower()=="F"then onButton1Down(mouse)end end)
  41. mouse.KeyUp:connect(function(k) if k:lower()=="F"then onButton1Up(mouse)end end)
  42. end
  43.  
  44. onSelected(game.Players.LocalPlayer:GetMouse())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement