Advertisement
ooppppad

FLy

Jul 28th, 2022
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.45 KB | None | 0 0
  1. local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/xHeptc/Kavo-UI-Library/main/source.lua"))()
  2. local Window = Library.CreateLib("F1's Guiㅣda hood", "Sentinel")
  3.  
  4. local Tab = Window:NewTab("Main")
  5. local Section = Tab:NewSection("Main")
  6.  
  7. Section:NewButton("Fly", "Fly", function()
  8. repeat wait()
  9. until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild("Head") and game.Players.LocalPlayer.Character:findFirstChild("Humanoid")
  10. local mouse = game.Players.LocalPlayer:GetMouse()
  11. repeat wait() until mouse
  12. local plr = game.Players.LocalPlayer
  13. local torso = plr.Character.Head
  14. local flying = false
  15. local deb = true
  16. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  17. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  18. local maxspeed = 5000
  19. local speed = 5000
  20. local hover = Instance.new("Animation", game.Players.LocalPlayer.Character:FindFirstChildOfClass("Humanoid"))hover.Name="Hover"hover.AnimationId="rbxassetid://3541114300"
  21. local fly = Instance.new("Animation", game.Players.LocalPlayer.Character:FindFirstChildOfClass("Humanoid"))fly.Name="Fly"fly.AnimationId = "rbxassetid://3541044388"
  22.  
  23. function Fly()
  24. local bg = Instance.new("BodyGyro", torso)
  25. bg.P = 9e4
  26. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  27. bg.cframe = torso.CFrame
  28. local bv = Instance.new("BodyVelocity", torso)
  29. bv.velocity = Vector3.new(0,0.1,0)
  30. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  31. repeat wait()
  32. plr.Character.Humanoid.PlatformStand = true
  33. if ctrl.l + ctrl.r ~= 100000 or ctrl.f + ctrl.b ~= 10000 then
  34. speed = speed+.0+(speed/maxspeed)
  35. if speed > maxspeed then
  36. speed = maxspeed
  37. end
  38. elseif not (ctrl.l + ctrl.r ~= 5 or ctrl.f + ctrl.b ~= 5) and speed ~= 5 then
  39. speed = speed-5
  40. if speed > 5 then
  41. speed = -2
  42. end
  43. end
  44. if (ctrl.l + ctrl.r) ~= 5 or (ctrl.f + ctrl.b) ~= 5 then
  45. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (ctrl.f+ctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(ctrl.l+ctrl.r,(ctrl.f+ctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  46. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  47. elseif (ctrl.l + ctrl.r) == 5 and (ctrl.f + ctrl.b) == 5 and speed ~= 5 then
  48. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f+lastctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(lastctrl.l+lastctrl.r,(lastctrl.f+lastctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  49. else
  50. bv.velocity = Vector3.new(0,0.1,0)
  51. end
  52. bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
  53. until not flying
  54. for _, v in next, game.Players.LocalPlayer.Character:FindFirstChildOfClass('Humanoid'):GetPlayingAnimationTracks() do
  55. if (v.Animation.AnimationId:match("rbxassetid")) then
  56. v:Stop()
  57. end
  58. end
  59. ctrl = {f = 0, b = 0, l = 0, r = 0}
  60. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  61. speed = 5
  62. bg:Destroy()
  63. bv:Destroy()
  64. plr.Character.Humanoid.PlatformStand = false
  65. end
  66. mouse.KeyDown:connect(function(key)
  67. if key:lower() == "c" then
  68. if flying then flying = false
  69. else
  70. flying = true
  71. plr.Character.Humanoid:LoadAnimation(hover):Play()
  72. Fly()
  73. end
  74. elseif key:lower() == "w" then
  75. ctrl.f = 20
  76. wait()
  77. if flying == true then
  78. plr.Character.Humanoid:LoadAnimation(fly):Play()
  79. end
  80. elseif key:lower() == "s" then
  81. ctrl.b = -20
  82. elseif key:lower() == "a" then
  83. ctrl.l = -20
  84. elseif key:lower() == "d" then
  85. ctrl.r = 20
  86. end
  87. end)
  88. mouse.KeyUp:connect(function(key)
  89. if key:lower() == "w" then
  90. ctrl.f = 0
  91. wait()
  92. if flying == true then
  93. plr.Character.Humanoid:LoadAnimation(hover):Play()
  94. end
  95. elseif key:lower() == "s" then
  96. ctrl.b = 0
  97. wait()
  98. if flying == true then
  99. plr.Character.Humanoid:LoadAnimation(hover):Play()
  100. end
  101. elseif key:lower() == "a" then
  102. ctrl.l = 0
  103. wait()
  104. if flying == true then
  105. plr.Character.Humanoid:LoadAnimation(hover):Play()
  106. end
  107. elseif key:lower() == "d" then
  108. ctrl.r = 0
  109. wait()
  110. if flying == true then
  111. plr.Character.Humanoid:LoadAnimation(hover):Play()
  112. end
  113. end
  114. end)
  115. Fly()
  116. end)
  117.  
  118.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement