detodounpoquito

ADMIN FLY

Oct 2nd, 2021
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. -- Made by: AccessQ
  2. -- Youtube: https://youtube.com/AccessQ
  3. -- Twitter: https://twitter.com/RealAcccessQ
  4.  
  5.  
  6. if game.Players.LocalPlayer.Name == "AccessQ" and "Name" then -- to add names do <"Name" and "Name"> never end with a "and"
  7.  
  8. keybind = "g" -- Keybind to activate flight
  9. speed = 50 -- I recommed 50
  10.  
  11. repeat wait() until game.Players.LocalPlayer.Character
  12.  
  13. local plr = game.Players.LocalPlayer
  14. local char = plr.Character
  15. local hum = char:WaitForChild("Humanoid")
  16. local Torso = char:WaitForChild("LowerTorso")
  17. local Mouse = plr:GetMouse()
  18. local toggle = false
  19.  
  20. Mouse.KeyDown:Connect(function(key)
  21. if key == keybind then
  22. if toggle == false then
  23. toggle = true
  24. local Anim = Instance.new("Animation")
  25. Anim.AnimationId = "rbxassetid://04704211237" -- Animation while flying
  26. local PlayAnim = hum:LoadAnimation(Anim)
  27. PlayAnim:Play()
  28. local BV = Instance.new("BodyVelocity",Torso)
  29. BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  30. while toggle == true do
  31. BV.Velocity = Mouse.Hit.lookVector*speed
  32. wait()
  33. end
  34. end
  35. if toggle == true then
  36. toggle = false
  37. Torso:FindFirstChildOfClass("BodyVelocity"):Destroy()
  38. local tracks = hum:GetPlayingAnimationTracks()
  39. for i, stoptracks in pairs(tracks) do
  40. stoptracks:Stop()
  41. end
  42. local Anim = Instance.new("Animation")
  43. Anim.AnimationId = "rbxassetid://0" -- Animation while falling down to the ground
  44. local PlayAnim = hum:LoadAnimation(Anim)
  45. PlayAnim:Play()
  46. end
  47. end
  48. end)
  49. end
Advertisement
Add Comment
Please, Sign In to add comment