local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer local camera = workspace.CurrentCamera -- ================= GUI ================= local gui = Instance.new("ScreenGui") gui.Name = "FlyGui" gui.ResetOnSpawn = false gui.Parent = player:WaitForChild("PlayerGui") local main = Instance.new("Frame") main.Size = UDim2.new(0,270,0,220) main.Position = UDim2.new(0.5,-135,0.5,-110) main.BackgroundColor3 = Color3.fromRGB(0,0,0) main.Parent = gui Instance.new("UICorner", main).CornerRadius = UDim.new(0,25) Instance.new("UIStroke", main).Thickness = 2 local topBar = Instance.new("Frame") topBar.Size = UDim2.new(1,0,0,45) topBar.BackgroundColor3 = Color3.fromRGB(25,25,25) topBar.Parent = main Instance.new("UICorner", topBar).CornerRadius = UDim.new(0,25) local credit = Instance.new("TextLabel") credit.Size = UDim2.new(1,0,0,30) credit.Position = UDim2.new(0,0,1,-30) credit.BackgroundTransparency = 1 credit.Text = "YouTuber: LoginEditXZ" credit.TextScaled = true credit.TextColor3 = Color3.new(1,1,1) credit.Parent = main -- ================= BOTÕES ================= local flyButton = Instance.new("TextButton") flyButton.Size = UDim2.new(0,210,0,55) flyButton.Position = UDim2.new(0.5,-105,0.4,-25) flyButton.Text = "Fly" flyButton.TextColor3 = Color3.new(1,1,1) flyButton.Parent = main Instance.new("UICorner", flyButton).CornerRadius = UDim.new(0,30) local flyStroke = Instance.new("UIStroke", flyButton) flyStroke.Thickness = 3 local unflyButton = Instance.new("TextButton") unflyButton.Size = UDim2.new(0,210,0,55) unflyButton.Position = UDim2.new(0.5,-105,0.7,-25) unflyButton.Text = "Unfly" unflyButton.TextColor3 = Color3.new(1,1,1) unflyButton.Parent = main Instance.new("UICorner", unflyButton).CornerRadius = UDim.new(0,30) local unflyStroke = Instance.new("UIStroke", unflyButton) unflyStroke.Thickness = 3 -- ================= ARRASTAR ================= local dragging = false local dragStart local startPos topBar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = true dragStart = input.Position startPos = main.Position end end) topBar.InputEnded:Connect(function() dragging = false end) UserInputService.InputChanged:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement) then local delta = input.Position - dragStart main.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end end) -- ================= ARCO-ÍRIS ================= local hue = 0 RunService.RenderStepped:Connect(function() hue += 0.004 if hue > 1 then hue = 0 end local color = Color3.fromHSV(hue,1,1) flyButton.BackgroundColor3 = color flyStroke.Color = color unflyButton.BackgroundColor3 = color unflyStroke.Color = color end) -- ================= SISTEMA DE FLY CORRETO ================= local flying = false local bodyVelocity local bodyGyro local speed = 60 local function startFly() local character = player.Character if not character then return end local hrp = character:FindFirstChild("HumanoidRootPart") if not hrp then return end flying = true bodyVelocity = Instance.new("BodyVelocity") bodyVelocity.MaxForce = Vector3.new(1e5,1e5,1e5) bodyVelocity.Velocity = Vector3.zero bodyVelocity.Parent = hrp bodyGyro = Instance.new("BodyGyro") bodyGyro.MaxTorque = Vector3.new(1e5,1e5,1e5) bodyGyro.P = 1e4 bodyGyro.Parent = hrp RunService:BindToRenderStep("FlyMovement", Enum.RenderPriority.Character.Value, function() if flying and hrp then local camCF = camera.CFrame bodyGyro.CFrame = camCF local moveDir = Vector3.zero if UserInputService:IsKeyDown(Enum.KeyCode.W) then moveDir += camCF.LookVector end if UserInputService:IsKeyDown(Enum.KeyCode.S) then moveDir -= camCF.LookVector end bodyVelocity.Velocity = moveDir * speed end end) end local function stopFly() flying = false RunService:UnbindFromRenderStep("FlyMovement") if bodyVelocity then bodyVelocity:Destroy() end if bodyGyro then bodyGyro:Destroy() end end flyButton.MouseButton1Click:Connect(startFly) unflyButton.MouseButton1Click:Connect(stopFly)