--[[ WARNING: Heads up! This script has not been verified by ScriptBlox. Use at your own risk! ]] local UserInputService = game:GetService("UserInputService") local Players = game:GetService("Players") local RunService = game:GetService("RunService") local TweenService = game:GetService("TweenService") 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 -- GUI Setup local gui = Instance.new("ScreenGui") gui.Name = "FlyUI" gui.ResetOnSpawn = false gui.Parent = player:WaitForChild("PlayerGui") local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 200, 0, 150) frame.Position = UDim2.new(0, 20, 0, 20) frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) frame.BackgroundTransparency = 0.3 frame.Parent = gui local uicorner = Instance.new("UICorner") uicorner.CornerRadius = UDim.new(0, 8) uicorner.Parent = frame -- Drag Bar local dragBar = Instance.new("Frame") dragBar.Size = UDim2.new(0, 145, 0, 20) dragBar.Position = UDim2.new(0, 15, 0, 5) dragBar.BackgroundColor3 = Color3.fromRGB(40, 40, 40) dragBar.Parent = frame local dragCorner = Instance.new("UICorner") dragCorner.CornerRadius = UDim.new(0, 5) dragCorner.Parent = dragBar local dragLabel = Instance.new("TextLabel") dragLabel.Size = UDim2.new(1, 0, 1, 0) dragLabel.BackgroundTransparency = 1 dragLabel.Text = "Drag" dragLabel.TextColor3 = Color3.fromRGB(200, 200, 200) dragLabel.TextSize = 12 dragLabel.Font = Enum.Font.SourceSans dragLabel.Parent = dragBar -- Minimize Button local minimizeButton = Instance.new("TextButton") minimizeButton.Size = UDim2.new(0, 25, 0, 25) minimizeButton.Position = UDim2.new(1, -30, 0, 5) minimizeButton.Text = "-" minimizeButton.TextColor3 = Color3.fromRGB(255, 255, 255) minimizeButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50) minimizeButton.TextSize = 14 minimizeButton.Parent = frame local minimizeCorner = Instance.new("UICorner") minimizeCorner.CornerRadius = UDim.new(0, 5) minimizeCorner.Parent = minimizeButton -- Fly Toggle Button local flyButton = Instance.new("TextButton") flyButton.Size = UDim2.new(0, 170, 0, 40) flyButton.Position = UDim2.new(0, 15, 0, 35) flyButton.Text = "Fly: OFF" flyButton.TextColor3 = Color3.fromRGB(255, 255, 255) flyButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50) flyButton.TextSize = 16 flyButton.Parent = frame local flyCorner = Instance.new("UICorner") flyCorner.CornerRadius = UDim.new(0, 5) flyCorner.Parent = flyButton -- No-Clip Toggle Button local noClipButton = Instance.new("TextButton") noClipButton.Size = UDim2.new(0, 170, 0, 40) noClipButton.Position = UDim2.new(0, 15, 0, 80) noClipButton.Text = "No-Clip: OFF" noClipButton.TextColor3 = Color3.fromRGB(255, 255, 255) noClipButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50) noClipButton.TextSize = 16 noClipButton.Parent = frame local noClipCorner = Instance.new("UICorner") noClipCorner.CornerRadius = UDim.new(0, 5) noClipCorner.Parent = noClipButton -- Fly Speed Slider local speedLabel = Instance.new("TextLabel") speedLabel.Size = UDim2.new(0, 170, 0, 20) speedLabel.Position = UDim2.new(0, 15, 0, 120) speedLabel.Text = "Speed: 50" speedLabel.BackgroundTransparency = 1 speedLabel.TextColor3 = Color3.fromRGB(255, 255, 255) speedLabel.TextSize = 14 speedLabel.Parent = frame local sliderFrame = Instance.new("Frame") sliderFrame.Size = UDim2.new(0, 170, 0, 10) sliderFrame.Position = UDim2.new(0, 15, 0, 140) sliderFrame.BackgroundColor3 = Color3.fromRGB(70, 70, 70) sliderFrame.Parent = frame local sliderCorner = Instance.new("UICorner") sliderCorner.CornerRadius = UDim.new(0, 5) sliderCorner.Parent = sliderFrame local sliderFill = Instance.new("Frame") sliderFill.Size = UDim2.new(0.5, 0, 1, 0) sliderFill.BackgroundColor3 = Color3.fromRGB(100, 100, 255) sliderFill.Parent = sliderFrame local fillCorner = Instance.new("UICorner") fillCorner.CornerRadius = UDim.new(0, 5) fillCorner.Parent = sliderFill -- Dragging Logic (Restricted to Drag Bar) local dragging = false local dragStart = nil local startPos = nil dragBar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = true dragStart = input.Position startPos = frame.Position end end) UserInputService.InputChanged:Connect(function(input) if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then local delta = input.Position - dragStart local newPos = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) frame.Position = newPos end end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = false end end) -- Minimize/Maximize Logic local isMinimized = false local originalSize = frame.Size minimizeButton.MouseButton1Click:Connect(function() isMinimized = not isMinimized minimizeButton.Text = isMinimized and "+" or "-" local targetSize = isMinimized and UDim2.new(0, 200, 0, 30) or originalSize TweenService:Create(frame, TweenInfo.new(0.3), {Size = targetSize}):Play() dragBar.Visible = not isMinimized flyButton.Visible = not isMinimized noClipButton.Visible = not isMinimized speedLabel.Visible = not isMinimized sliderFrame.Visible = not isMinimized end) -- Variables local isFlying = false local isNoClip = false local flySpeed = 50 local bodyVelocity = nil local bodyGyro = nil local moveDirection = Vector3.new(0, 0, 0) -- Fly Function local function startFlying() if not isFlying then isFlying = true flyButton.Text = "Fly: ON" flyButton.BackgroundColor3 = Color3.fromRGB(60, 100, 60) humanoid.PlatformStand = true humanoid.WalkSpeed = 0 -- Prevent walking movement interference bodyVelocity = Instance.new("BodyVelocity") bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge) bodyVelocity.Velocity = Vector3.new(0, 0, 0) bodyVelocity.Parent = rootPart bodyGyro = Instance.new("BodyGyro") bodyGyro.MaxTorque = Vector3.new(4000, 4000, 4000) -- Reduced torque for stability bodyGyro.CFrame = camera.CFrame bodyGyro.Parent = rootPart end end local function stopFlying() if isFlying then isFlying = false flyButton.Text = "Fly: OFF" flyButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50) humanoid.PlatformStand = false humanoid.WalkSpeed = 16 -- Restore default walk speed if bodyVelocity then bodyVelocity:Destroy() bodyVelocity = nil end if bodyGyro then bodyGyro:Destroy() bodyGyro = nil end end end -- No-Clip Function local function setNoClip(state) isNoClip = state noClipButton.Text = "No-Clip: " .. (state and "ON" or "OFF") noClipButton.BackgroundColor3 = state and Color3.fromRGB(60, 100, 60) or Color3.fromRGB(50, 50, 50) for _, part in pairs(character:GetDescendants()) do if part:IsA("BasePart") then part.CanCollide = not state end end end -- Fly Movement RunService.RenderStepped:Connect(function() if isFlying and bodyVelocity and bodyGyro then bodyGyro.CFrame = camera.CFrame local velocity = camera.CFrame:VectorToWorldSpace(moveDirection * flySpeed) bodyVelocity.Velocity = velocity end end) -- Input Handling local inputStates = {} UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if isFlying then if input.KeyCode == Enum.KeyCode.W then inputStates.W = true elseif input.KeyCode == Enum.KeyCode.S then inputStates.S = true elseif input.KeyCode == Enum.KeyCode.A then inputStates.A = true elseif input.KeyCode == Enum.KeyCode.D then inputStates.D = true elseif input.KeyCode == Enum.KeyCode.Space then inputStates.Space = true elseif input.KeyCode == Enum.KeyCode.LeftShift then inputStates.LeftShift = true end end end) UserInputService.InputEnded:Connect(function(input) if isFlying then if input.KeyCode == Enum.KeyCode.W then inputStates.W = false elseif input.KeyCode == Enum.KeyCode.S then inputStates.S = false elseif input.KeyCode == Enum.KeyCode.A then inputStates.A = false elseif input.KeyCode == Enum.KeyCode.D then inputStates.D = false elseif input.KeyCode == Enum.KeyCode.Space then inputStates.Space = false elseif input.KeyCode == Enum.KeyCode.LeftShift then inputStates.LeftShift = false end end end) RunService.Heartbeat:Connect(function() if isFlying then moveDirection = Vector3.new( (inputStates.A and -1 or 0) + (inputStates.D and 1 or 0), (inputStates.Space and 1 or 0) + (inputStates.LeftShift and -1 or 0), (inputStates.W and -1 or 0) + (inputStates.S and 1 or 0) ) end end) -- Button Connections flyButton.MouseButton1Click:Connect(function() if isFlying then stopFlying() else startFlying() end end) noClipButton.MouseButton1Click:Connect(function() setNoClip(not isNoClip) end) -- Speed Slider Logic local sliderDragging = false sliderFrame.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then sliderDragging = true end end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then sliderDragging = false end end) UserInputService.InputChanged:Connect(function(input) if sliderDragging and input.UserInputType == Enum.UserInputType.MouseMovement then local mousePos = UserInputService:GetMouseLocation() local sliderPos = sliderFrame.AbsolutePosition local sliderWidth = sliderFrame.AbsoluteSize.X local relativePos = math.clamp((mousePos.X - sliderPos.X) / sliderWidth, 0, 1) flySpeed = 20 + relativePos * 130 -- Speed range: 20 to 150 speedLabel.Text = "Speed: " .. math.floor(flySpeed) sliderFill.Size = UDim2.new(relativePos, 0, 1, 0) end end) -- Cleanup on character reset player.CharacterAdded:Connect(function(newCharacter) character = newCharacter humanoid = character:WaitForChild("Humanoid") rootPart = character:WaitForChild("HumanoidRootPart") stopFlying() setNoClip(false) end)