local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local Players = game:GetService("Players") local Lighting = game:GetService("Lighting") local player = Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local rootPart = character:WaitForChild("HumanoidRootPart") local camera = workspace.CurrentCamera local flyEnabled = false local flySpeed = 50 local originalWalkSpeed = humanoid.WalkSpeed local originalJumpPower = humanoid.JumpPower local colorCorrection = Instance.new("ColorCorrectionEffect", Lighting) colorCorrection.Brightness = 0 local function toggleFulbright(enable) if enable then colorCorrection.Brightness = 0 else colorCorrection.Brightness = 0 end end local spawnLocation = workspace:FindFirstChild("SpawnLocation") local function teleportToSpawn() if spawnLocation then local spawnCFrame = spawnLocation.CFrame + Vector3.new(0, 3, 0) for _, part in pairs(character:GetChildren()) do if part:IsA("BasePart") then part.CanCollide = false end end rootPart.CFrame = spawnCFrame for _, part in pairs(character:GetChildren()) do if part:IsA("BasePart") then part.CanCollide = true end end else rootPart.CFrame = CFrame.new(0, 10, 0) end end local ScreenGui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui")) local flyButton = Instance.new("TextButton", ScreenGui) flyButton.Size = UDim2.new(0, 100, 0, 50) flyButton.Position = UDim2.new(0, 10, 0, 10) flyButton.Text = "FLY: OFF" flyButton.TextColor3 = Color3.fromRGB(250, 0, 0) flyButton.BackgroundColor3 = Color3.fromRGB(0, 70, 140) flyButton.BorderColor3 = Color3.fromRGB(0, 170, 255) flyButton.BorderSizePixel = 2 flyButton.TextWrapped = true flyButton.TextSize = 20 flyButton.Font = Enum.Font.GothamBlack local fulbrightActive = false local function toggleFly() flyEnabled = not flyEnabled if flyEnabled then humanoid.PlatformStand = true flyButton.Text = "FLY: ON" for _, part in pairs(character:GetChildren()) do if part:IsA("BasePart") then part.CanCollide = false end end rootPart.AssemblyLinearVelocity = Vector3.new(0,0,0) rootPart.Anchored = true rootPart.Massless = true toggleFulbright(true) fulbrightActive = true else humanoid.PlatformStand = false flyButton.Text = "FLY: OFF" for _, part in pairs(character:GetChildren()) do if part:IsA("BasePart") then part.CanCollide = true end end rootPart.Anchored = false rootPart.Massless = false humanoid.WalkSpeed = originalWalkSpeed humanoid.JumpPower = originalJumpPower teleportToSpawn() toggleFulbright(false) fulbrightActive = false end end flyButton.MouseButton1Click:Connect(toggleFly) UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if input.KeyCode == Enum.KeyCode.F then toggleFly() end end) RunService.Heartbeat:Connect(function() if flyEnabled then local moveDirection = Vector3.new() if UserInputService:IsKeyDown(Enum.KeyCode.W) then moveDirection = moveDirection + camera.CFrame.LookVector end if UserInputService:IsKeyDown(Enum.KeyCode.S) then moveDirection = moveDirection - camera.CFrame.LookVector end if UserInputService:IsKeyDown(Enum.KeyCode.A) then moveDirection = moveDirection - camera.CFrame.RightVector end if UserInputService:IsKeyDown(Enum.KeyCode.D) then moveDirection = moveDirection + camera.CFrame.RightVector end if UserInputService:IsKeyDown(Enum.KeyCode.Space) then moveDirection = moveDirection + Vector3.new(0, 1, 0) end if UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) then moveDirection = moveDirection - Vector3.new(0, 1, 0) end if moveDirection.Magnitude > 0 then moveDirection = moveDirection.Unit rootPart.CFrame = rootPart.CFrame + moveDirection * flySpeed * RunService.Heartbeat:Wait() end end end)