Advertisement
HackerTA

Fly script | Roblox Exploiting

Jul 1st, 2019
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.46 KB | None | 0 0
  1. local humanoid = game:GetService("Players").LocalPlayer.Character.Humanoid
  2. if humanoid.RigType == Enum.HumanoidRigType.R15 then
  3. game:GetService('Players').LocalPlayer.Character.Humanoid.Name = "Humanoida"
  4. repeat wait()
  5. until game:GetService"Players".LocalPlayer and game:GetService"Players".LocalPlayer.Character and game:GetService"Players".LocalPlayer.Character:findFirstChild("UpperTorso") and game:GetService"Players".LocalPlayer.Character:findFirstChild("Humanoida")
  6. local mouse = game:GetService"Players".LocalPlayer:GetMouse()
  7. repeat wait() until mouse
  8. local plr = game:GetService"Players".LocalPlayer
  9. local torso = plr.Character.UpperTorso
  10. local flying = true
  11. local deb = true
  12. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  13. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  14. local maxspeed = 100
  15. local speed = 0
  16. function Fly()
  17. local bg = Instance.new("BodyGyro", torso)
  18. bg.P = 9e4
  19. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  20. bg.cframe = torso.CFrame
  21. local bv = Instance.new("BodyVelocity", torso)
  22. bv.velocity = Vector3.new(0,0.1,0)
  23. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  24. repeat wait()
  25. plr.Character.Humanoida.PlatformStand = true
  26. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  27. speed = speed+.5+(speed/maxspeed)
  28. if speed > maxspeed then
  29. speed = maxspeed
  30. end
  31. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  32. speed = speed-1
  33. if speed < 0 then
  34. speed = 0
  35. end
  36. end
  37. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  38. bv.velocity = ((game:GetService("Workspace").CurrentCamera.CoordinateFrame.lookVector * (ctrl.f+ctrl.b)) + ((game:GetService("Workspace").CurrentCamera.CoordinateFrame * CFrame.new(ctrl.l+ctrl.r,(ctrl.f+ctrl.b)*.2,0).p) - game:GetService("Workspace").CurrentCamera.CoordinateFrame.p))*speed
  39. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  40. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  41. bv.velocity = ((game:GetService("Workspace").CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f+lastctrl.b)) + ((game:GetService("Workspace").CurrentCamera.CoordinateFrame * CFrame.new(lastctrl.l+lastctrl.r,(lastctrl.f+lastctrl.b)*.2,0).p) - game:GetService("Workspace").CurrentCamera.CoordinateFrame.p))*speed
  42. else
  43. bv.velocity = Vector3.new(0,0.1,0)
  44. end
  45. bg.cframe = game:GetService("Workspace").CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
  46. until not flying
  47. ctrl = {f = 0, b = 0, l = 0, r = 0}
  48. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  49. speed = 0
  50. bg:Destroy()
  51. bv:Destroy()
  52. plr.Character.Humanoida.PlatformStand = false
  53. end
  54. mouse.KeyDown:connect(function(key)
  55. if key:lower() == "e" then
  56. if flying then flying = false
  57. else
  58. flying = true
  59. Fly()
  60. end
  61. elseif key:lower() == "w" then
  62. ctrl.f = 1
  63. elseif key:lower() == "s" then
  64. ctrl.b = -1
  65. elseif key:lower() == "a" then
  66. ctrl.l = -1
  67. elseif key:lower() == "d" then
  68. ctrl.r = 1
  69. end
  70. end)
  71. mouse.KeyUp:connect(function(key)
  72. if key:lower() == "w" then
  73. ctrl.f = 0
  74. elseif key:lower() == "s" then
  75. ctrl.b = 0
  76. elseif key:lower() == "a" then
  77. ctrl.l = 0
  78. elseif key:lower() == "d" then
  79. ctrl.r = 0
  80. end
  81. end)
  82. Fly()
  83. else
  84. repeat wait()
  85. until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild("Torso") and game.Players.LocalPlayer.Character:findFirstChild("Humanoid")
  86. local mouse = game.Players.LocalPlayer:GetMouse()
  87. repeat wait() until mouse
  88. local plr = game.Players.LocalPlayer
  89. local torso = plr.Character.Torso
  90. local flying = true
  91. local deb = true
  92. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  93. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  94. local maxspeed = 50
  95. local speed = 0
  96.  
  97. function Fly()
  98. local bg = Instance.new("BodyGyro", torso)
  99. bg.P = 9e4
  100. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  101. bg.cframe = torso.CFrame
  102. local bv = Instance.new("BodyVelocity", torso)
  103. bv.velocity = Vector3.new(0,0.1,0)
  104. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  105. repeat wait()
  106. plr.Character.Humanoid.PlatformStand = true
  107. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  108. speed = speed+.5+(speed/maxspeed)
  109. if speed > maxspeed then
  110. speed = maxspeed
  111. end
  112. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  113. speed = speed-1
  114. if speed < 0 then
  115. speed = 0
  116. end
  117. end
  118. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  119. 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
  120. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  121. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  122. 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
  123. else
  124. bv.velocity = Vector3.new(0,0.1,0)
  125. end
  126. bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
  127. until not flying
  128. ctrl = {f = 0, b = 0, l = 0, r = 0}
  129. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  130. speed = 0
  131. bg:Destroy()
  132. bv:Destroy()
  133. plr.Character.Humanoid.PlatformStand = false
  134. end
  135. mouse.KeyDown:connect(function(key)
  136. if key:lower() == "e" then
  137. if flying then flying = false
  138. else
  139. flying = true
  140. Fly()
  141. end
  142. elseif key:lower() == "w" then
  143. ctrl.f = 1
  144. elseif key:lower() == "s" then
  145. ctrl.b = -1
  146. elseif key:lower() == "a" then
  147. ctrl.l = -1
  148. elseif key:lower() == "d" then
  149. ctrl.r = 1
  150. end
  151. end)
  152. mouse.KeyUp:connect(function(key)
  153. if key:lower() == "w" then
  154. ctrl.f = 0
  155. elseif key:lower() == "s" then
  156. ctrl.b = 0
  157. elseif key:lower() == "a" then
  158. ctrl.l = 0
  159. elseif key:lower() == "d" then
  160. ctrl.r = 0
  161. end
  162. end)
  163. Fly()
  164. end
  165. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement