Advertisement
xSGTx

Untitled

Mar 18th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. local speed = 50 -- This is the fly speed. Change it to whatever you like. The variable can be changed while running
  2.  
  3. local c
  4. local h
  5. local bv
  6. local bav
  7. local cam
  8. local flying
  9. local p = game.Players.LocalPlayer
  10. local buttons = {W = false, S = false, A = false, D = false, Moving = false}
  11.  
  12. local startFly = function () -- Call this function to begin flying
  13. if not p.Character or not p.Character.Head or flying then return end
  14. c = p.Character
  15. h = c.Humanoid
  16. h.PlatformStand = true
  17. cam = workspace:WaitForChild('Camera')
  18. bv = Instance.new("BodyVelocity")
  19. bav = Instance.new("BodyAngularVelocity")
  20. bv.Velocity, bv.MaxForce, bv.P = Vector3.new(0, 0, 0), Vector3.new(10000, 10000, 10000), 1000
  21. bav.AngularVelocity, bav.MaxTorque, bav.P = Vector3.new(0, 0, 0), Vector3.new(10000, 10000, 10000), 1000
  22. bv.Parent = c.Head
  23. bav.Parent = c.Head
  24. flying = true
  25. h.Died:connect(function() flying = false end)
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement