Tryhell

speedhack(Q)

Nov 19th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. game.StarterGui:SetCore('SendNotification', {Duration = 10; Title='Tryhack'; Text='Зажмите Q для активации спидхака '})
  2. down = false
  3. velocity = Instance.new("BodyVelocity")
  4. velocity.maxForce = Vector3.new(100000, 0, 100000)
  5. ---vv Use that to change the speed v
  6. local speed = 150
  7. gyro = Instance.new("BodyGyro")
  8. gyro.maxTorque = Vector3.new(100000, 0, 100000)
  9.  
  10. local hum = game.Players.LocalPlayer.Character.Humanoid
  11.  
  12. function onButton1Down(mouse)
  13. down = true
  14. velocity.Parent = game.Players.LocalPlayer.Character.UpperTorso
  15. velocity.velocity = (hum.MoveDirection) * speed
  16. gyro.Parent = game.Players.LocalPlayer.Character.UpperTorso
  17. while down do
  18. if not down then break end
  19. velocity.velocity = (hum.MoveDirection) * speed
  20. local refpos = gyro.Parent.Position + (gyro.Parent.Position - workspace.CurrentCamera.CoordinateFrame.p).unit * 5
  21. gyro.cframe = CFrame.new(gyro.Parent.Position, Vector3.new(refpos.x, gyro.Parent.Position.y, refpos.z))
  22. wait(0.1)
  23. end
  24. end
  25.  
  26. function onButton1Up(mouse)
  27. velocity.Parent = nil
  28. gyro.Parent = nil
  29. down = false
  30. end
  31.  
  32. function onSelected(mouse)
  33. mouse.KeyDown:connect(function(k) if k:lower()=="q"then onButton1Down(mouse)end end)
  34. mouse.KeyUp:connect(function(k) if k:lower()=="q"then onButton1Up(mouse)end end)
  35. end
  36.  
  37. onSelected(game.Players.LocalPlayer:GetMouse())
Add Comment
Please, Sign In to add comment