Advertisement
Matt777

fly script v3

Jan 7th, 2022
445
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.43 KB | None | 0 0
  1. -- Gui to Lua
  2. -- Version: 3.2
  3.  
  4. -- Instances:
  5.  
  6. local ScreenGui = Instance.new("ScreenGui")
  7. local Frame = Instance.new("Frame")
  8. local UICorner = Instance.new("UICorner")
  9. local TextButton = Instance.new("TextButton")
  10. local UICorner_2 = Instance.new("UICorner")
  11. local close = Instance.new("TextButton")
  12. local UICorner_3 = Instance.new("UICorner")
  13. local speed = Instance.new("TextButton")
  14. local UICorner_4 = Instance.new("UICorner")
  15. local TextLabel = Instance.new("TextLabel")
  16. local UICorner_5 = Instance.new("UICorner")
  17. local TextButton_2 = Instance.new("TextButton")
  18. local UICorner_6 = Instance.new("UICorner")
  19.  
  20. --Properties:
  21.  
  22. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  23. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  24.  
  25. Frame.Parent = ScreenGui
  26. Frame.BackgroundColor3 = Color3.fromRGB(44, 44, 44)
  27. Frame.Position = UDim2.new(0.116680361, 0, 0.374800622, 0)
  28. Frame.Size = UDim2.new(0, 241, 0, 356)
  29. Frame.Visible = false
  30.  
  31. UICorner.CornerRadius = UDim.new(0.300000012, 0)
  32. UICorner.Parent = Frame
  33.  
  34. TextButton.Parent = Frame
  35. TextButton.BackgroundColor3 = Color3.fromRGB(85, 85, 85)
  36. TextButton.Position = UDim2.new(0.0829875544, 0, 0.205056176, 0)
  37. TextButton.Size = UDim2.new(0, 200, 0, 50)
  38. TextButton.Font = Enum.Font.SourceSans
  39. TextButton.Text = "Fly - E to fly"
  40. TextButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  41. TextButton.TextSize = 41.000
  42. TextButton.TextWrapped = true
  43.  
  44. UICorner_2.CornerRadius = UDim.new(0.300000012, 0)
  45. UICorner_2.Parent = TextButton
  46.  
  47. close.Name = "close"
  48. close.Parent = Frame
  49. close.BackgroundColor3 = Color3.fromRGB(85, 85, 85)
  50. close.Position = UDim2.new(0.0829875544, 0, 0.67696631, 0)
  51. close.Size = UDim2.new(0, 200, 0, 50)
  52. close.Font = Enum.Font.SourceSans
  53. close.Text = "Close"
  54. close.TextColor3 = Color3.fromRGB(0, 0, 0)
  55. close.TextSize = 41.000
  56. close.TextWrapped = true
  57.  
  58. UICorner_3.CornerRadius = UDim.new(0.300000012, 0)
  59. UICorner_3.Parent = close
  60.  
  61. speed.Name = "speed"
  62. speed.Parent = Frame
  63. speed.BackgroundColor3 = Color3.fromRGB(85, 85, 85)
  64. speed.Position = UDim2.new(0.0829875544, 0, 0.429775238, 0)
  65. speed.Size = UDim2.new(0, 200, 0, 50)
  66. speed.Font = Enum.Font.SourceSans
  67. speed.Text = "Speed"
  68. speed.TextColor3 = Color3.fromRGB(0, 0, 0)
  69. speed.TextSize = 41.000
  70. speed.TextWrapped = true
  71.  
  72. UICorner_4.CornerRadius = UDim.new(0.300000012, 0)
  73. UICorner_4.Parent = speed
  74.  
  75. TextLabel.Parent = Frame
  76. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  77. TextLabel.BackgroundTransparency = 1.000
  78. TextLabel.Position = UDim2.new(0.0829875544, 0, 0.0477528088, 0)
  79. TextLabel.Size = UDim2.new(0, 200, 0, 50)
  80. TextLabel.Font = Enum.Font.SourceSans
  81. TextLabel.Text = "Fly script V3: By MrDinosaurLives"
  82. TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
  83. TextLabel.TextSize = 14.000
  84.  
  85. UICorner_5.CornerRadius = UDim.new(0.300000012, 0)
  86. UICorner_5.Parent = TextLabel
  87.  
  88. TextButton_2.Parent = ScreenGui
  89. TextButton_2.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  90. TextButton_2.Position = UDim2.new(0, 0, 0.47208932, 0)
  91. TextButton_2.Size = UDim2.new(0, 200, 0, 50)
  92. TextButton_2.Font = Enum.Font.SourceSans
  93. TextButton_2.Text = "Open"
  94. TextButton_2.TextColor3 = Color3.fromRGB(0, 0, 0)
  95. TextButton_2.TextSize = 41.000
  96.  
  97. UICorner_6.CornerRadius = UDim.new(0.300000012, 0)
  98. UICorner_6.Parent = TextButton_2
  99.  
  100. -- Scripts:
  101.  
  102. local function XJHXT_fake_script() -- TextButton.LocalScript
  103. local script = Instance.new('LocalScript', TextButton)
  104.  
  105. repeat wait()
  106. until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild("Head") and game.Players.LocalPlayer.Character:findFirstChild("Humanoid")
  107. local mouse = game.Players.LocalPlayer:GetMouse()
  108. repeat wait() until mouse
  109. local plr = game.Players.LocalPlayer
  110. local torso = plr.Character.Head
  111. local flying = false
  112. local deb = true
  113. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  114. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  115. local maxspeed = 400
  116. local speed = 5000
  117.  
  118. function Fly()
  119. local bg = Instance.new("BodyGyro", torso)
  120. bg.P = 9e4
  121. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  122. bg.cframe = torso.CFrame
  123. local bv = Instance.new("BodyVelocity", torso)
  124. bv.velocity = Vector3.new(0,0.1,0)
  125. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  126. repeat wait()
  127. plr.Character.Humanoid.PlatformStand = true
  128. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  129. speed = speed+.5+(speed/maxspeed)
  130. if speed > maxspeed then
  131. speed = maxspeed
  132. end
  133. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  134. speed = speed-1
  135. if speed < 0 then
  136. speed = 0
  137. end
  138. end
  139. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  140. 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
  141. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  142. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  143. 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
  144. else
  145. bv.velocity = Vector3.new(0,0.1,0)
  146. end
  147. bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
  148. until not flying
  149. ctrl = {f = 0, b = 0, l = 0, r = 0}
  150. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  151. speed = 0
  152. bg:Destroy()
  153. bv:Destroy()
  154. plr.Character.Humanoid.PlatformStand = false
  155. end
  156. mouse.KeyDown:connect(function(key)
  157. if key:lower() == "e" then
  158. if flying then flying = false
  159. else
  160. flying = true
  161. Fly()
  162. end
  163. elseif key:lower() == "w" then
  164. ctrl.f = 1
  165. elseif key:lower() == "s" then
  166. ctrl.b = -1
  167. elseif key:lower() == "a" then
  168. ctrl.l = -1
  169. elseif key:lower() == "d" then
  170. ctrl.r = 1
  171. end
  172. end)
  173. mouse.KeyUp:connect(function(key)
  174. if key:lower() == "w" then
  175. ctrl.f = 0
  176. elseif key:lower() == "s" then
  177. ctrl.b = 0
  178. elseif key:lower() == "a" then
  179. ctrl.l = 0
  180. elseif key:lower() == "d" then
  181. ctrl.r = 0
  182. end
  183. end)
  184. Fly()
  185. end
  186. coroutine.wrap(XJHXT_fake_script)()
  187. local function NXSWYG_fake_script() -- close.LocalScript
  188. local script = Instance.new('LocalScript', close)
  189.  
  190. script.Parent.MouseButton1Click:Connect(function()
  191. script.Parent.Parent.Parent.Frame.Visible = false
  192. wait(0.1)
  193. script.Parent.Parent.Parent.TextButton.Visible = true
  194. end)
  195. end
  196. coroutine.wrap(NXSWYG_fake_script)()
  197. local function WTCBKC_fake_script() -- speed.LocalScript
  198. local script = Instance.new('LocalScript', speed)
  199.  
  200. script.Parent.MouseButton1Click:Connect(function()
  201. local player = game.Players.LocalPlayer
  202. local setspeed = script.Parent.Parent.speed.Text
  203. local hum = game.Workspace:WaitForChild(player.Name).Humanoid
  204. if hum then
  205. hum.WalkSpeed = 50
  206. end
  207. end)
  208. end
  209. coroutine.wrap(WTCBKC_fake_script)()
  210. local function BOEPNP_fake_script() -- TextButton_2.LocalScript
  211. local script = Instance.new('LocalScript', TextButton_2)
  212.  
  213. script.Parent.MouseButton1Click:Connect(function()
  214. script.Parent.Parent.Frame.Visible = true
  215. wait(0.1)
  216. script.Parent.Visible = false
  217. end)
  218. end
  219. coroutine.wrap(BOEPNP_fake_script)()
  220.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement