-- Instâncias da GUI (Moderna e Minimalista) local ScreenGui = Instance.new("ScreenGui") local MainFrame = Instance.new("Frame") local UICorner = Instance.new("UICorner") local Title = Instance.new("TextLabel") local SpeedLabel = Instance.new("TextLabel") local SpeedInput = Instance.new("TextBox") local UICornerInput = Instance.new("UICorner") local ToggleButton = Instance.new("TextButton") local UICornerButton = Instance.new("UICorner") -- Configurando a Interface ScreenGui.Parent = game:GetService("CoreGui") ScreenGui.ResetOnSpawn = false MainFrame.Name = "FlyConfig" MainFrame.Parent = ScreenGui MainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25) MainFrame.Position = UDim2.new(0.05, 0, 0.4, 0) MainFrame.Size = UDim2.new(0, 180, 0, 160) MainFrame.Active = true MainFrame.Draggable = true UICorner.CornerRadius = UDim.new(0, 8) UICorner.Parent = MainFrame Title.Parent = MainFrame Title.BackgroundTransparency = 1 Title.Size = UDim2.new(1, 0, 0, 35) Title.Font = Enum.Font.SourceSansBold Title.Text = "FLY GUI" -- Alterado para FLY GUI Title.TextColor3 = Color3.fromRGB(255, 255, 255) Title.TextSize = 14 SpeedLabel.Parent = MainFrame SpeedLabel.BackgroundTransparency = 1 SpeedLabel.Position = UDim2.new(0, 0, 0.22, 0) SpeedLabel.Size = UDim2.new(1, 0, 0, 20) SpeedLabel.Font = Enum.Font.SourceSansSemibold SpeedLabel.Text = "Velocidade do Voo:" SpeedLabel.TextColor3 = Color3.fromRGB(180, 180, 180) SpeedLabel.TextSize = 13 SpeedInput.Parent = MainFrame SpeedInput.BackgroundColor3 = Color3.fromRGB(40, 40, 40) SpeedInput.Position = UDim2.new(0.15, 0, 0.37, 0) SpeedInput.Size = UDim2.new(0.7, 0, 0, 28) SpeedInput.Font = Enum.Font.SourceSansBold SpeedInput.Text = "70" SpeedInput.TextColor3 = Color3.fromRGB(255, 255, 255) SpeedInput.TextSize = 15 UICornerInput.CornerRadius = UDim.new(0, 5) UICornerInput.Parent = SpeedInput ToggleButton.Parent = MainFrame ToggleButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50) ToggleButton.Position = UDim2.new(0.1, 0, 0.62, 0) ToggleButton.Size = UDim2.new(0.8, 0, 0, 35) ToggleButton.Font = Enum.Font.SourceSansBold ToggleButton.Text = "Fly: DESLIGADO (E)" ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255) ToggleButton.TextSize = 14 UICornerButton.CornerRadius = UDim.new(0, 5) UICornerButton.Parent = ToggleButton -- Lógica Avançada do Voo 3D local FLY_KEY = Enum.KeyCode.E local flySpeed = 70 local smoothness = 0.15 local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local LocalPlayer = Players.LocalPlayer local Camera = workspace.CurrentCamera local flying = false local currentVelocity = Vector3.new(0, 0, 0) local bg, bv local movement = {W = 0, S = 0, A = 0, D = 0} -- Controles de Teclado (Movimento) UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if input.KeyCode == Enum.KeyCode.W then movement.W = 1 end if input.KeyCode == Enum.KeyCode.S then movement.S = 1 end if input.KeyCode == Enum.KeyCode.A then movement.A = 1 end if input.KeyCode == Enum.KeyCode.D then movement.D = 1 end end) UserInputService.InputEnded:Connect(function(input) if input.KeyCode == Enum.KeyCode.W then movement.W = 0 end if input.KeyCode == Enum.KeyCode.S then movement.S = 0 end if input.KeyCode == Enum.KeyCode.A then movement.A = 0 end if input.KeyCode == Enum.KeyCode.D then movement.D = 0 end end) -- Mantém braços colados e retos no corpo suavemente local function setArmsClosed(character, closed) if not character then return end local leftShoulder = character:FindFirstChild("LeftShoulder", true) or character:FindFirstChild("Left Shoulder", true) local rightShoulder = character:FindFirstChild("RightShoulder", true) or character:FindFirstChild("Right Shoulder", true) if leftShoulder and rightShoulder then if closed then leftShoulder.Transform = CFrame.new(-0.2, -0.2, 0) * CFrame.Angles(0, 0, math.rad(-5)) rightShoulder.Transform = CFrame.new(0.2, -0.2, 0) * CFrame.Angles(0, 0, math.rad(5)) end end end -- Inicia o Voo Baseado na Câmera local function startFly() local character = LocalPlayer.Character if not character or not character:FindFirstChild("HumanoidRootPart") then return end local hrp = character.HumanoidRootPart local humanoid = character:FindFirstChildOfClass("Humanoid") if humanoid then humanoid.PlatformStand = true end bg = Instance.new("BodyGyro") bg.maxTorque = Vector3.new(4e5, 4e5, 4e5) bg.cframe = hrp.CFrame bg.Parent = hrp bv = Instance.new("BodyVelocity") bv.maxForce = Vector3.new(4e5, 4e5, 4e5) bv.velocity = Vector3.new(0, 0, 0) bv.Parent = hrp task.spawn(function() while flying and character:FindFirstChild("HumanoidRootPart") do RunService.RenderStepped:Wait() setArmsClosed(character, true) bg.cframe = Camera.CFrame local lookVector = Camera.CFrame.LookVector local rightVector = Camera.CFrame.RightVector local direction = Vector3.new(0, 0, 0) direction = direction + (lookVector * (movement.W - movement.S)) direction = direction + (rightVector * (movement.D - movement.A)) local targetVelocity = Vector3.new(0, 0, 0) if direction.Magnitude > 0 then targetVelocity = direction.Unit * flySpeed else targetVelocity = Vector3.new(0, 0.05, 0) end currentVelocity = currentVelocity:Lerp(targetVelocity, smoothness) bv.velocity = currentVelocity end end) end local function stopFly() flying = false if bg then bg:Destroy() end if bv then bv:Destroy() end local character = LocalPlayer.Character if character then local humanoid = character:FindFirstChildOfClass("Humanoid") if humanoid then humanoid.PlatformStand = false end end end -- Função centralizada para alternar o estado do voo e atualizar a GUI local function toggleFly() flying = not flying if flying then ToggleButton.Text = "Fly: LIGADO (E)" ToggleButton.BackgroundColor3 = Color3.fromRGB(50, 180, 90) startFly() else ToggleButton.Text = "Fly: DESLIGADO (E)" ToggleButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50) stopFly() end end -- Ativação por Botão na GUI ToggleButton.MouseButton1Click:Connect(function() toggleFly() end) -- Ativação por Tecla (E) UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if input.KeyCode == FLY_KEY then toggleFly() end end) -- Atualiza a velocidade digitada na GUI SpeedInput.FocusLost:Connect(function() local numericValue = tonumber(SpeedInput.Text) if numericValue then flySpeed = numericValue else SpeedInput.Text = tostring(flySpeed) end end) -- Limpeza ao Morrer LocalPlayer.CharacterAdded:Connect(function() stopFly() ToggleButton.Text = "Fly: DESLIGADO (E)" ToggleButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50) movement = {W = 0, S = 0, A = 0, D = 0} end)