FLY
Key RequiredUniversal

FLY

Universal Scriptxx_loxixx_loxi 495 views 4.2K executesUpdated Jul 4, 2026
Unrated
00
Lua Script•137 lines (4127 chars)
local player = game.Players.LocalPlayer
local coreGui = game:GetService("CoreGui")
local uis = game:GetService("UserInputService")
local runService = game:GetService("RunService")

local guiName = "RageButton"
local gui = coreGui:FindFirstChild(guiName)
if not gui then
    gui = Instance.new("ScreenGui")
    gui.Name = guiName
    gui.Parent = coreGui
end

local mainFrame = gui:FindFirstChild("MainFrame")
if mainFrame then mainFrame:Destroy() end

mainFrame = Instance.new("Frame")
mainFrame.Name = "MainFrame"
mainFrame.Size = UDim2.new(0, 180, 0, 64)
mainFrame.Position = UDim2.new(0, 10, 0, 10)
mainFrame.BackgroundTransparency = 1
mainFrame.Parent = gui

local dragHandle = Instance.new("Frame")
dragHandle.Name = "DragHandle"
dragHandle.Size = UDim2.new(1, 0, 0, 20)
dragHandle.Position = UDim2.new(0, 0, 0, 0)
dragHandle.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
dragHandle.BorderSizePixel = 0
dragHandle.Parent = mainFrame

local dragCorner = Instance.new("UICorner")
dragCorner.CornerRadius = UDim.new(0, 10)
dragCorner.Parent = dragHandle

local dragText = Instance.new("TextLabel")
dragText.Size = UDim2.new(1, 0, 1, 0)
dragText.BackgroundTransparency = 1
dragText.Text = "≡"
dragText.TextColor3 = Color3.new(1, 1, 1)
dragText.Font = Enum.Font.SourceSansBold
dragText.TextSize = 18
dragText.Parent = dragHandle

local button = Instance.new("TextButton")
button.Name = "FlyButton"
button.Size = UDim2.new(1, 0, 0, 40)
button.Position = UDim2.new(0, 0, 0, 24)
button.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
button.Text = "ВЫКЛ"
button.TextColor3 = Color3.new(1, 1, 1)
button.Font = Enum.Font.SourceSansBold
button.TextSize = 18
button.Parent = mainFrame

local buttonCorner = Instance.new("UICorner")
buttonCorner.CornerRadius = UDim.new(0, 10)
buttonCorner.Parent = button

local dragging = false
local dragStartPos = nil
local startMainPos = nil

dragHandle.InputBegan:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 then
        dragging = true
        dragStartPos = uis:GetMouseLocation()
        startMainPos = mainFrame.Position
    end
end)

uis.InputEnded:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 then
        dragging = false
    end
end)

uis.InputChanged:Connect(function(input)
    if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
        local delta = uis:GetMouseLocation() - dragStartPos
        mainFrame.Position = UDim2.new(
            startMainPos.X.Scale, startMainPos.X.Offset + delta.X,
            startMainPos.Y.Scale, startMainPos.Y.Offset + delta.Y
        )
    end
end)

local enabled = false
local step = 0.8
local rootPart, camera

local function refresh()
    local char = player.Character
    if char then
        rootPart = char:FindFirstChild("HumanoidRootPart")
    end
    camera = workspace.CurrentCamera
end
refresh()
player.CharacterAdded:Connect(refresh)

button.MouseButton1Click:Connect(function()
    enabled = not enabled
    button.BackgroundColor3 = enabled and Color3.fromRGB(50,200,50) or Color3.fromRGB(200,50,50)
    button.Text = enabled and "ВКЛ" or "ВЫКЛ"
    if enabled then
        if rootPart then
            rootPart.Anchored = true
        end
    else
        if rootPart then
            rootPart.Anchored = false
        end
    end
end)

runService.Heartbeat:Connect(function()
    if not enabled then return end
    refresh()
    if not rootPart or not camera then return end

    local look = camera.CFrame.LookVector
    local right = camera.CFrame.RightVector
    local move = Vector3.new(0,0,0)

    if uis:IsKeyDown(Enum.KeyCode.W) then move += look end
    if uis:IsKeyDown(Enum.KeyCode.S) then move -= look end
    if uis:IsKeyDown(Enum.KeyCode.A) then move -= right end
    if uis:IsKeyDown(Enum.KeyCode.D) then move += right end
    if uis:IsKeyDown(Enum.KeyCode.Space) then move += Vector3.new(0,1,0) end
    if uis:IsKeyDown(Enum.KeyCode.LeftControl) then move += Vector3.new(0,-1,0) end

    if move.Magnitude > 0 then
        move = move.Unit * step
        rootPart.CFrame = rootPart.CFrame + move
    end
end)

Features & Information

Fly script for Tower of Hell.
#Tower of Hell#tower of hell#tower#TOWER OF HELL

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts