*updated*The helper gui
Key RequiredUniversal

*updated*The helper gui

Universal Script1_hearts4you_11_hearts4you_1 30.3K views 226 executesUpdated Apr 30, 2025
5.0/ 5(2 votes)
20100% Positive
Lua Script•281 lines (8787 chars)
-- Full working fly script with custom GUI style, color & fullbright options, Clear Fog, and Rejoin functionality

local player = game.Players.LocalPlayer
local UIS = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local Lighting = game:GetService("Lighting")

local flying = false
local noclip = false
local fullbright = false
local clearFog = false
local speeds = {25, 50, 100, 200}
local speedIndex = 2
local currentSpeed = speeds[speedIndex]

local keys = {W=false, A=false, S=false, D=false, Up=false, Down=false}
local char, root
local bodyVel = Instance.new("BodyVelocity")
bodyVel.MaxForce = Vector3.new(1e5, 1e5, 1e5)
bodyVel.P = 1000

local function updateCharacter()
    char = player.Character or player.CharacterAdded:Wait()
    root = char:WaitForChild("HumanoidRootPart")
end
updateCharacter()

local function createGUI()
    local gui = Instance.new("ScreenGui")
    gui.Name = "FlyControlPanel"
    gui.ResetOnSpawn = false
    gui.Parent = player:WaitForChild("PlayerGui")

    local panel = Instance.new("Frame")
    panel.Size = UDim2.new(0, 300, 0, 350) -- Increased size of the panel
    panel.Position = UDim2.new(0, 30, 0, 120)
    panel.BackgroundColor3 = Color3.fromRGB(36, 36, 36)
    panel.BorderSizePixel = 0
    panel.ClipsDescendants = true
    panel.Parent = gui

    local corner = Instance.new("UICorner")
    corner.CornerRadius = UDim.new(0, 12)
    corner.Parent = panel

    local layout = Instance.new("UIListLayout")
    layout.Padding = UDim.new(0, 8)
    layout.HorizontalAlignment = Enum.HorizontalAlignment.Center
    layout.VerticalAlignment = Enum.VerticalAlignment.Top
    layout.Parent = panel

    -- Create buttons function
    local function makeButton(text)
        local btn = Instance.new("TextButton")
        btn.Size = UDim2.new(0, 160, 0, 40)
        btn.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
        btn.TextColor3 = Color3.fromRGB(255, 255, 255)
        btn.Font = Enum.Font.GothamBold
        btn.TextSize = 20
        btn.Text = text
        btn.AutoButtonColor = false

        local corner = Instance.new("UICorner")
        corner.CornerRadius = UDim.new(0, 8)
        corner.Parent = btn

        local hover = Instance.new("UIStroke")
        hover.Thickness = 0
        hover.Color = Color3.fromRGB(255, 255, 255)
        hover.Parent = btn

        btn.MouseEnter:Connect(function() hover.Thickness = 1 end)
        btn.MouseLeave:Connect(function() hover.Thickness = 0 end)

        return btn
    end

    -- Buttons for fly, noclip, speed, etc.
    local toggleBtn = makeButton("×")
    toggleBtn.Size = UDim2.new(0, 30, 0, 30)
    toggleBtn.TextSize = 22
    toggleBtn.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
    toggleBtn.Parent = panel

    local flyBtn = makeButton("Fly")
    flyBtn.Parent = panel

    local noclipBtn = makeButton("Noclip: Off")
    noclipBtn.Parent = panel

    local speedBtn = makeButton("Speed: 50")
    speedBtn.Parent = panel

    local colorBtn = makeButton("Change Color")
    colorBtn.Parent = panel

    local fullbrightBtn = makeButton("Fullbright: Off")
    fullbrightBtn.Parent = panel

    local clearFogBtn = makeButton("Clear Fog: Off")
    clearFogBtn.Parent = panel

    local rejoinBtn = makeButton("Rejoin")
    rejoinBtn.Parent = panel

    return panel, toggleBtn, flyBtn, noclipBtn, speedBtn, colorBtn, fullbrightBtn, clearFogBtn, rejoinBtn
end

local panel, toggleBtn, flyBtn, noclipBtn, speedBtn, colorBtn, fullbrightBtn, clearFogBtn, rejoinBtn = createGUI()

-- Variables for dragging the GUI
local dragStart
local dragInput
local dragStartPos
local dragging = false

-- Enable dragging the panel
local function beginDrag(input)
    dragStart = input.Position
    dragStartPos = panel.Position
    dragging = true
end

local function updateDrag(input)
    if dragging then
        local delta = input.Position - dragStart
        panel.Position = UDim2.new(0, dragStartPos.X.Offset + delta.X, 0, dragStartPos.Y.Offset + delta.Y)
    end
end

local function endDrag()
    dragging = false
end

panel.InputBegan:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 then
        beginDrag(input)
    end
end)

panel.InputChanged:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseMovement then
        updateDrag(input)
    end
end)

panel.InputEnded:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 then
        endDrag()
    end
end)

local collapsed = false
toggleBtn.MouseButton1Click:Connect(function()
    collapsed = not collapsed
    for _, child in ipairs(panel:GetChildren()) do
        if child:IsA("TextButton") and child ~= toggleBtn then
            child.Visible = not collapsed
        end
    end
    panel.Size = collapsed and UDim2.new(0, 60, 0, 40) or UDim2.new(0, 300, 0, 350)
    toggleBtn.Text = collapsed and "+" or "×"
end)

flyBtn.MouseButton1Click:Connect(function()
    if not root then return end
    flying = not flying
    flyBtn.Text = flying and "Unfly" or "Fly"
    bodyVel.Parent = flying and root or nil
end)

noclipBtn.MouseButton1Click:Connect(function()
    noclip = not noclip
    noclipBtn.Text = "Noclip: " .. (noclip and "On" or "Off")
end)

speedBtn.MouseButton1Click:Connect(function()
    speedIndex = speedIndex % #speeds + 1
    currentSpeed = speeds[speedIndex]
    speedBtn.Text = "Speed: " .. currentSpeed
end)

colorBtn.MouseButton1Click:Connect(function()
    local newColor = Color3.fromRGB(math.random(0, 255), math.random(0, 255), math.random(0, 255))
    flyBtn.BackgroundColor3 = newColor
    noclipBtn.BackgroundColor3 = newColor
    speedBtn.BackgroundColor3 = newColor
    colorBtn.BackgroundColor3 = newColor
    fullbrightBtn.BackgroundColor3 = newColor
    clearFogBtn.BackgroundColor3 = newColor
    rejoinBtn.BackgroundColor3 = newColor
end)

fullbrightBtn.MouseButton1Click:Connect(function()
    fullbright = not fullbright
    fullbrightBtn.Text = "Fullbright: " .. (fullbright and "On" or "Off")
    if fullbright then
        Lighting.Brightness = 2
        Lighting.OutdoorAmbient = Color3.fromRGB(255, 255, 255)
    else
        Lighting.Brightness = 1
        Lighting.OutdoorAmbient = Color3.fromRGB(128, 128, 128)
    end
end)

clearFogBtn.MouseButton1Click:Connect(function()
    clearFog = not clearFog
    clearFogBtn.Text = "Clear Fog: " .. (clearFog and "On" or "Off")
    if clearFog then
        Lighting.FogStart = 100000
        Lighting.FogEnd = 100000
        Lighting.FogColor = Color3.fromRGB(255, 255, 255)
    else
        Lighting.FogStart = 0
        Lighting.FogEnd = 1000
        Lighting.FogColor = Color3.fromRGB(128, 128, 128)
    end
end)

-- Rejoin Button Logic
rejoinBtn.MouseButton1Click:Connect(function()
    game:GetService("TeleportService"):Teleport(game.PlaceId, player)
end)

UIS.InputBegan:Connect(function(input, gpe)
    if gpe then return end
    local k = input.KeyCode
    if k == Enum.KeyCode.W then keys.W = true
    elseif k == Enum.KeyCode.A then keys.A = true
    elseif k == Enum.KeyCode.S then keys.S = true
    elseif k == Enum.KeyCode.D then keys.D = true
    elseif k == Enum.KeyCode.Space then keys.Up = true
    elseif k == Enum.KeyCode.LeftShift then keys.Down = true end
end)

UIS.InputEnded:Connect(function(input)
    local k = input.KeyCode
    if k == Enum.KeyCode.W then keys.W = false
    elseif k == Enum.KeyCode.A then keys.A = false
    elseif k == Enum.KeyCode.S then keys.S = false
    elseif k == Enum.KeyCode.D then keys.D = false
    elseif k == Enum.KeyCode.Space then keys.Up = false
    elseif k == Enum.KeyCode.LeftShift then keys.Down = false end
end)

RunService.RenderStepped:Connect(function()
    if flying and root then
        local cam = workspace.CurrentCamera
        local dir = Vector3.zero
        if keys.W then dir += cam.CFrame.LookVector end
        if keys.S then dir -= cam.CFrame.LookVector end
        if keys.A then dir -= cam.CFrame.RightVector end
        if keys.D then dir += cam.CFrame.RightVector end
        if keys.Up then dir += Vector3.new(0, 1, 0) end
        if keys.Down then dir -= Vector3.new(0, 1, 0) end
        bodyVel.Velocity = dir.Magnitude > 0 and dir.Unit * currentSpeed or Vector3.zero
    end

    if noclip and char then
        for _, part in pairs(char:GetDescendants()) do
            if part:IsA("BasePart") then
                part.CanCollide = false
            end
        end
    end
end)

player.CharacterAdded:Connect(function()
    updateCharacter()
    flying = false
    bodyVel.Parent = nil
    flyBtn.Text = "Fly"

    if noclip then
        for _, part in pairs(char:GetDescendants()) do
            if part:IsA("BasePart") then
                part.CanCollide = false
            end
        end
    end
end)

Features & Information

Made by me Updated 02.05.2025 Toggle Fly Toggle Noclip (works both flying and on foot) Toggle Speed between presets + / × button to collapse or expand the menu GUI works after respawn and many more... working on the gui to make it better :)
#fly#speed#noclip#Gui

Community Comments (4)

1_hearts4you_11_hearts4you_1Apr 30, 2025

Make sure to say what to add next!

radom81183radom81183Jul 7, 2025

Add Invisability!

dylancoolfortunedylancoolfortuneNov 26, 2025

INSTABAN DON'T USE THIS

frieza_1frieza_1Jan 13, 2026

nice cap

More Scripts for Universal Scripts