1. local Players = game:GetService("Players")
  2. local UserInputService = game:GetService("UserInputService")
  3. local RunService = game:GetService("RunService")
  4. local Workspace = game:GetService("Workspace")
  5.  
  6. local LocalPlayer = Players.LocalPlayer
  7. local Camera = Workspace.CurrentCamera
  8.  
  9. -- Flight Settings
  10. local displaySpeed = 30 -- Default set to 30 (Fast!)
  11. local minSpeed = 1
  12. local maxSpeed = 50
  13. local SPEED_MULTIPLIER = 6 -- Multiplies value so '30' feels extremely fast
  14. local isFlying = false
  15. local mobileAscend = 0
  16.  
  17. -- Physical Components
  18. local character, human, root
  19. local linearVelocity, alignOrientation, attachment
  20.  
  21. --------------------------------------------------------------------------------
  22. -- GUI CREATION
  23. --------------------------------------------------------------------------------
  24. local screenGui = Instance.new("ScreenGui")
  25. screenGui.Name = "FlyControlGui"
  26. screenGui.ResetOnSpawn = false
  27. screenGui.Parent = LocalPlayer:WaitForChild("PlayerGui")
  28.  
  29. -- Main Menu Frame
  30. local mainFrame = Instance.new("Frame")
  31. mainFrame.Name = "MainFrame"
  32. mainFrame.Size = UDim2.new(0, 220, 0, 180)
  33. mainFrame.Position = UDim2.new(0.85, -110, 0.5, -90)
  34. mainFrame.BackgroundColor3 = Color3.fromRGB(20, 22, 30)
  35. mainFrame.BorderSizePixel = 0
  36. mainFrame.Active = true
  37. mainFrame.Draggable = true
  38. mainFrame.Parent = screenGui
  39.  
  40. local mainCorner = Instance.new("UICorner")
  41. mainCorner.CornerRadius = UDim.new(0, 10)
  42. mainCorner.Parent = mainFrame
  43.  
  44. local mainStroke = Instance.new("UIStroke")
  45. mainStroke.Color = Color3.fromRGB(50, 55, 75)
  46. mainStroke.Thickness = 1.5
  47. mainStroke.Parent = mainFrame
  48.  
  49. -- Title Bar
  50. local titleLabel = Instance.new("TextLabel")
  51. titleLabel.Size = UDim2.new(1, -20, 0, 30)
  52. titleLabel.Position = UDim2.new(0, 10, 0, 5)
  53. titleLabel.BackgroundTransparency = 1
  54. titleLabel.Text = "FLIGHT CONTROL"
  55. titleLabel.TextColor3 = Color3.fromRGB(200, 205, 220)
  56. titleLabel.TextSize = 13
  57. titleLabel.Font = Enum.Font.GothamBold
  58. titleLabel.TextXAlignment = Enum.TextXAlignment.Left
  59. titleLabel.Parent = mainFrame
  60.  
  61. -- Toggle Fly Button
  62. local flyBtn = Instance.new("TextButton")
  63. flyBtn.Size = UDim2.new(1, -20, 0, 38)
  64. flyBtn.Position = UDim2.new(0, 10, 0, 35)
  65. flyBtn.BackgroundColor3 = Color3.fromRGB(46, 204, 113)
  66. flyBtn.Text = "ENABLE FLY"
  67. flyBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
  68. flyBtn.TextSize = 14
  69. flyBtn.Font = Enum.Font.GothamBold
  70. flyBtn.Parent = mainFrame
  71.  
  72. local flyCorner = Instance.new("UICorner")
  73. flyCorner.CornerRadius = UDim.new(0, 6)
  74. flyCorner.Parent = flyBtn
  75.  
  76. -- Speed Control Container
  77. local speedFrame = Instance.new("Frame")
  78. speedFrame.Size = UDim2.new(1, -20, 0, 40)
  79. speedFrame.Position = UDim2.new(0, 10, 0, 80)
  80. speedFrame.BackgroundColor3 = Color3.fromRGB(30, 33, 45)
  81. speedFrame.BorderSizePixel = 0
  82. speedFrame.Parent = mainFrame
  83.  
  84. local speedCorner = Instance.new("UICorner")
  85. speedCorner.CornerRadius = UDim.new(0, 6)
  86. speedCorner.Parent = speedFrame
  87.  
  88. -- Speed Decrease (-)
  89. local decBtn = Instance.new("TextButton")
  90. decBtn.Size = UDim2.new(0, 35, 1, 0)
  91. decBtn.Position = UDim2.new(0, 0, 0, 0)
  92. decBtn.BackgroundColor3 = Color3.fromRGB(45, 50, 68)
  93. decBtn.Text = "-"
  94. decBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
  95. decBtn.TextSize = 18
  96. decBtn.Font = Enum.Font.GothamBold
  97. decBtn.Parent = speedFrame
  98.  
  99. local decCorner = Instance.new("UICorner")
  100. decCorner.CornerRadius = UDim.new(0, 6)
  101. decCorner.Parent = decBtn
  102.  
  103. -- Speed Display / Input
  104. local speedBox = Instance.new("TextBox")
  105. speedBox.Size = UDim2.new(1, -70, 1, 0)
  106. speedBox.Position = UDim2.new(0, 35, 0, 0)
  107. speedBox.BackgroundTransparency = 1
  108. speedBox.Text = "Speed: " .. tostring(displaySpeed)
  109. speedBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  110. speedBox.TextSize = 13
  111. speedBox.Font = Enum.Font.GothamMedium
  112. speedBox.Parent = speedFrame
  113.  
  114. -- Speed Increase (+)
  115. local incBtn = Instance.new("TextButton")
  116. incBtn.Size = UDim2.new(0, 35, 1, 0)
  117. incBtn.Position = UDim2.new(1, -35, 0, 0)
  118. incBtn.BackgroundColor3 = Color3.fromRGB(45, 50, 68)
  119. incBtn.Text = "+"
  120. incBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
  121. incBtn.TextSize = 18
  122. incBtn.Font = Enum.Font.GothamBold
  123. incBtn.Parent = speedFrame
  124.  
  125. local incCorner = Instance.new("UICorner")
  126. incCorner.CornerRadius = UDim.new(0, 6)
  127. incCorner.Parent = incBtn
  128.  
  129. -- Mobile Altitude Controls Container
  130. local mobileFrame = Instance.new("Frame")
  131. mobileFrame.Size = UDim2.new(1, -20, 0, 40)
  132. mobileFrame.Position = UDim2.new(0, 10, 0, 130)
  133. mobileFrame.BackgroundTransparency = 1
  134. mobileFrame.Parent = mainFrame
  135.  
  136. local upBtn = Instance.new("TextButton")
  137. upBtn.Size = UDim2.new(0.48, 0, 1, 0)
  138. upBtn.Position = UDim2.new(0, 0, 0, 0)
  139. upBtn.BackgroundColor3 = Color3.fromRGB(52, 152, 219)
  140. upBtn.Text = "ASCEND (▲)"
  141. upBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
  142. upBtn.TextSize = 11
  143. upBtn.Font = Enum.Font.GothamBold
  144. upBtn.Parent = mobileFrame
  145.  
  146. local upCorner = Instance.new("UICorner")
  147. upCorner.CornerRadius = UDim.new(0, 6)
  148. upCorner.Parent = upBtn
  149.  
  150. local downBtn = Instance.new("TextButton")
  151. downBtn.Size = UDim2.new(0.48, 0, 1, 0)
  152. downBtn.Position = UDim2.new(0.52, 0, 0, 0)
  153. downBtn.BackgroundColor3 = Color3.fromRGB(155, 89, 182)
  154. downBtn.Text = "DESCEND (▼)"
  155. downBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
  156. downBtn.TextSize = 11
  157. downBtn.Font = Enum.Font.GothamBold
  158. downBtn.Parent = mobileFrame
  159.  
  160. local downCorner = Instance.new("UICorner")
  161. downCorner.CornerRadius = UDim.new(0, 6)
  162. downCorner.Parent = downBtn
  163.  
  164. --------------------------------------------------------------------------------
  165. -- SPEED LOGIC
  166. --------------------------------------------------------------------------------
  167. local function updateSpeedDisplay()
  168. displaySpeed = math.clamp(displaySpeed, minSpeed, maxSpeed)
  169. speedBox.Text = "Speed: " .. tostring(displaySpeed)
  170. end
  171.  
  172. decBtn.MouseButton1Click:Connect(function()
  173. displaySpeed = displaySpeed - 5
  174. updateSpeedDisplay()
  175. end)
  176.  
  177. incBtn.MouseButton1Click:Connect(function()
  178. displaySpeed = displaySpeed + 5
  179. updateSpeedDisplay()
  180. end)
  181.  
  182. speedBox.FocusLost:Connect(function()
  183. local num = tonumber(speedBox.Text:match("%d+"))
  184. if num then
  185. displaySpeed = num
  186. end
  187. updateSpeedDisplay()
  188. end)
  189.  
  190. --------------------------------------------------------------------------------
  191. -- FLIGHT LOGIC
  192. --------------------------------------------------------------------------------
  193. local function enableFlight()
  194. character = LocalPlayer.Character
  195. if not character then return end
  196. root = character:FindFirstChild("HumanoidRootPart")
  197. human = character:FindFirstChildOfClass("Humanoid")
  198. if not root or not human then return end
  199.  
  200. attachment = Instance.new("Attachment")
  201. attachment.Name = "FlyAttachment"
  202. attachment.Parent = root
  203.  
  204. linearVelocity = Instance.new("LinearVelocity")
  205. linearVelocity.Attachment0 = attachment
  206. linearVelocity.MaxForce = 9e9
  207. linearVelocity.VectorVelocity = Vector3.zero
  208. linearVelocity.RelativeTo = Enum.ActuatorRelativeTo.World
  209. linearVelocity.Parent = root
  210.  
  211. alignOrientation = Instance.new("AlignOrientation")
  212. alignOrientation.Attachment0 = attachment
  213. alignOrientation.MaxTorque = 9e9
  214. alignOrientation.Responsiveness = 200
  215. alignOrientation.Mode = Enum.OrientationAlignmentMode.OneAttachment
  216. alignOrientation.Parent = root
  217.  
  218. human.PlatformStand = true
  219. isFlying = true
  220.  
  221. flyBtn.Text = "DISABLE FLY"
  222. flyBtn.BackgroundColor3 = Color3.fromRGB(231, 76, 60)
  223. end
  224.  
  225. local function disableFlight()
  226. isFlying = false
  227. if human then
  228. human.PlatformStand = false
  229. end
  230. if linearVelocity then linearVelocity:Destroy() end
  231. if alignOrientation then alignOrientation:Destroy() end
  232. if attachment then attachment:Destroy() end
  233.  
  234. flyBtn.Text = "ENABLE FLY"
  235. flyBtn.BackgroundColor3 = Color3.fromRGB(46, 204, 113)
  236. end
  237.  
  238. flyBtn.MouseButton1Click:Connect(function()
  239. if isFlying then
  240. disableFlight()
  241. else
  242. enableFlight()
  243. end
  244. end)
  245.  
  246. -- Mobile Manual Altitude Buttons
  247. upBtn.MouseButton1Down:Connect(function() mobileAscend = 1 end)
  248. upBtn.MouseButton1Up:Connect(function() mobileAscend = 0 end)
  249. downBtn.MouseButton1Down:Connect(function() mobileAscend = -1 end)
  250. downBtn.MouseButton1Up:Connect(function() mobileAscend = 0 end)
  251.  
  252. -- Keyboard Shortcut (PC)
  253. UserInputService.InputBegan:Connect(function(input, gpe)
  254. if gpe then return end
  255. if input.KeyCode == Enum.KeyCode.E then
  256. if isFlying then disableFlight() else enableFlight() end
  257. end
  258. end)
  259.  
  260. -- Main Render Loop
  261. RunService.RenderStepped:Connect(function()
  262. if not isFlying or not root or not human then return end
  263.  
  264. -- Calculated actual physics speed
  265. local actualSpeed = displaySpeed * SPEED_MULTIPLIER
  266.  
  267. local moveDirection = human.MoveDirection
  268. local cameraCFrame = Camera.CFrame
  269. local finalVelocity = Vector3.zero
  270.  
  271. -- Camera direction vector calculation
  272. if moveDirection.Magnitude > 0 then
  273. local localCamDirection = Camera.CFrame:VectorToObjectSpace(moveDirection)
  274.  
  275. finalVelocity = (cameraCFrame:VectorToWorldSpace(
  276. Vector3.new(localCamDirection.X, 0, localCamDirection.Z)
  277. )) * actualSpeed
  278. end
  279.  
  280. -- Direct Vertical Adjustments
  281. if mobileAscend ~= 0 then
  282. finalVelocity = Vector3.new(finalVelocity.X, mobileAscend * actualSpeed, finalVelocity.Z)
  283. elseif UserInputService:IsKeyDown(Enum.KeyCode.Space) then
  284. finalVelocity = Vector3.new(finalVelocity.X, actualSpeed, finalVelocity.Z)
  285. elseif UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) then
  286. finalVelocity = Vector3.new(finalVelocity.X, -actualSpeed, finalVelocity.Z)
  287. end
  288.  
  289. linearVelocity.VectorVelocity = finalVelocity
  290. alignOrientation.CFrame = cameraCFrame
  291. end)
  292.  
  293. LocalPlayer.CharacterAdded:Connect(function()
  294. disableFlight()
  295. end)