--// FLY SYSTEM COMPLETO MOBILE local Players = game:GetService("Players") local RunService = game:GetService("RunService") local player = Players.LocalPlayer local camera = workspace.CurrentCamera --================ CHARACTER ================= local character, humanoid, hrp local function setupCharacter(char) character = char humanoid = char:WaitForChild("Humanoid") hrp = char:WaitForChild("HumanoidRootPart") camera.CameraType = Enum.CameraType.Custom camera.CameraSubject = humanoid end setupCharacter(player.Character or player.CharacterAdded:Wait()) player.CharacterAdded:Connect(setupCharacter) --================ GUI ================= local gui = Instance.new("ScreenGui") gui.Name = "FlyMenu" gui.ResetOnSpawn = false gui.Parent = player:WaitForChild("PlayerGui") local openButton = Instance.new("TextButton", gui) openButton.Size = UDim2.fromScale(0.12, 0.06) openButton.Position = UDim2.fromScale(0.02, 0.05) openButton.Text = "MENU" openButton.BackgroundColor3 = Color3.fromRGB(0,170,255) openButton.TextScaled = true Instance.new("UICorner", openButton) local frame = Instance.new("Frame", gui) frame.Size = UDim2.fromScale(0.6, 0.35) frame.Position = UDim2.fromScale(0.2, 0.3) frame.BackgroundColor3 = Color3.fromRGB(20,20,20) frame.BackgroundTransparency = 0.1 frame.BorderSizePixel = 0 frame.Visible = false frame.Active = true frame.Draggable = true Instance.new("UICorner", frame) local title = Instance.new("TextLabel", frame) title.Size = UDim2.fromScale(1, 0.25) title.BackgroundTransparency = 1 title.Text = "FLY MENU" title.Font = Enum.Font.GothamBold title.TextScaled = true -- RGB título task.spawn(function() local hue = 0 while true do hue += 0.01 if hue > 1 then hue = 0 end title.TextColor3 = Color3.fromHSV(hue,1,1) task.wait(0.05) end end) local flyButton = Instance.new("TextButton", frame) flyButton.Size = UDim2.fromScale(0.4, 0.3) flyButton.Position = UDim2.fromScale(0.05, 0.4) flyButton.Text = "FLY" flyButton.BackgroundColor3 = Color3.fromRGB(0,170,255) flyButton.TextScaled = true Instance.new("UICorner", flyButton) local unflyButton = Instance.new("TextButton", frame) unflyButton.Size = UDim2.fromScale(0.4, 0.3) unflyButton.Position = UDim2.fromScale(0.55, 0.4) unflyButton.Text = "UNFLY" unflyButton.BackgroundColor3 = Color3.fromRGB(255,60,60) unflyButton.TextScaled = true Instance.new("UICorner", unflyButton) -- SPEED CONTROL local speed = 60 local speedLabel = Instance.new("TextLabel", frame) speedLabel.Size = UDim2.fromScale(1, 0.15) speedLabel.Position = UDim2.fromScale(0, 0.7) speedLabel.BackgroundTransparency = 1 speedLabel.Text = "Speed: 60" speedLabel.TextScaled = true local plus = Instance.new("TextButton", frame) plus.Size = UDim2.fromScale(0.2, 0.15) plus.Position = UDim2.fromScale(0.55, 0.7) plus.Text = "+" plus.TextScaled = true plus.BackgroundColor3 = Color3.fromRGB(0,200,0) Instance.new("UICorner", plus) local minus = Instance.new("TextButton", frame) minus.Size = UDim2.fromScale(0.2, 0.15) minus.Position = UDim2.fromScale(0.25, 0.7) minus.Text = "-" minus.TextScaled = true minus.BackgroundColor3 = Color3.fromRGB(200,0,0) Instance.new("UICorner", minus) openButton.MouseButton1Click:Connect(function() frame.Visible = not frame.Visible end) plus.MouseButton1Click:Connect(function() speed += 10 speedLabel.Text = "Speed: "..speed end) minus.MouseButton1Click:Connect(function() speed = math.max(10, speed - 10) speedLabel.Text = "Speed: "..speed end) --================ MOBILE VERTICAL BUTTONS ================= local vertical = 0 -- -1 desce | 0 parado | 1 sobe local upButton = Instance.new("TextButton", gui) upButton.Size = UDim2.fromScale(0.12, 0.08) upButton.Position = UDim2.fromScale(0.85, 0.55) upButton.Text = "⬆" upButton.TextScaled = true upButton.BackgroundColor3 = Color3.fromRGB(0,170,255) upButton.Visible = false Instance.new("UICorner", upButton) local downButton = Instance.new("TextButton", gui) downButton.Size = UDim2.fromScale(0.12, 0.08) downButton.Position = UDim2.fromScale(0.85, 0.68) downButton.Text = "⬇" downButton.TextScaled = true downButton.BackgroundColor3 = Color3.fromRGB(255,80,80) downButton.Visible = false Instance.new("UICorner", downButton) upButton.MouseButton1Down:Connect(function() vertical = 1 end) upButton.MouseButton1Up:Connect(function() vertical = 0 end) downButton.MouseButton1Down:Connect(function() vertical = -1 end) downButton.MouseButton1Up:Connect(function() vertical = 0 end) --================ FLY SYSTEM ================= local flying = false local renderConn local attachment, linearVel, alignOri local function startFly() if flying or not hrp then return end flying = true upButton.Visible = true downButton.Visible = true humanoid:ChangeState(Enum.HumanoidStateType.Physics) attachment = Instance.new("Attachment", hrp) linearVel = Instance.new("LinearVelocity") linearVel.Attachment0 = attachment linearVel.MaxForce = math.huge linearVel.VectorVelocity = Vector3.zero linearVel.Parent = hrp alignOri = Instance.new("AlignOrientation") alignOri.Attachment0 = attachment alignOri.MaxTorque = math.huge alignOri.Responsiveness = 25 alignOri.RigidityEnabled = true alignOri.Parent = hrp renderConn = RunService.RenderStepped:Connect(function() if not flying then return end local moveDir = humanoid.MoveDirection local horizontal = Vector3.zero if moveDir.Magnitude > 0 then horizontal = moveDir.Unit * speed alignOri.CFrame = CFrame.lookAt(hrp.Position, hrp.Position + moveDir.Unit) end local verticalVelocity = Vector3.new(0, vertical * speed, 0) linearVel.VectorVelocity = horizontal + verticalVelocity end) end local function stopFly() flying = false vertical = 0 upButton.Visible = false downButton.Visible = false if renderConn then renderConn:Disconnect() end if linearVel then linearVel:Destroy() end if alignOri then alignOri:Destroy() end if attachment then attachment:Destroy() end if humanoid then humanoid:ChangeState(Enum.HumanoidStateType.GettingUp) end end flyButton.MouseButton1Click:Connect(startFly) unflyButton.MouseButton1Click:Connect(stopFly)