Invincible fly script R6
Key RequiredUniversal

Invincible fly script R6

Universal ScriptScriptTesterScriptTester 96.6K views 12.9K executesUpdated Jul 9, 2025
4.7/ 5(15 votes)
14193% Positive
Lua Script•216 lines (7993 chars)
local savedSpeed = 50

local function gui()
    local Players = game:GetService("Players")
    local RunService = game:GetService("RunService")
    local UserInputService = game:GetService("UserInputService")
    local player = Players.LocalPlayer
    local character = player.Character or player.CharacterAdded:Wait()
    local humanoid = character:WaitForChild("Humanoid")
    local HRP = character:WaitForChild("HumanoidRootPart")
    local Camera = workspace.CurrentCamera

    local baseSpeed = savedSpeed
    local flySpeed = baseSpeed
    local flying = false
    local forwardHold = 0
    local inputFlags = { forward = false, back = false, left = false, right = false, up = false, down = false }

    local bodyVelocity = Instance.new("BodyVelocity")
    bodyVelocity.MaxForce = Vector3.new(1e5, 1e5, 1e5)

    local bodyGyro = Instance.new("BodyGyro")
    bodyGyro.MaxTorque = Vector3.new(1e5, 1e5, 1e5)

    local screenGui = Instance.new("ScreenGui")
    screenGui.Name = "FlyScreenGui"
    screenGui.ResetOnSpawn = false
    screenGui.Parent = player:WaitForChild("PlayerGui")

    local toggleButton = Instance.new("TextButton")
    toggleButton.Name = "ToggleFlyButton"
    toggleButton.Text = "Fly OFF"
    toggleButton.Size = UDim2.new(0, 100, 0, 50)
    toggleButton.Position = UDim2.new(1, -220, 0, 10)
    toggleButton.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
    toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
    toggleButton.Font = Enum.Font.GothamBold
    toggleButton.TextScaled = true
    toggleButton.BackgroundTransparency = 0.2
    toggleButton.Parent = screenGui

    local speedBox = Instance.new("TextBox")
    speedBox.Name = "SpeedBox"
    speedBox.Text = tostring(baseSpeed)
    speedBox.Size = UDim2.new(0, 100, 0, 50)
    speedBox.Position = UDim2.new(1, -110, 0, 10)
    speedBox.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
    speedBox.TextColor3 = Color3.fromRGB(255, 255, 255)
    speedBox.Font = Enum.Font.GothamBold
    speedBox.TextScaled = true
    speedBox.BackgroundTransparency = 0.2
    speedBox.Parent = screenGui

    local function newAnim(id)
        local anim = Instance.new("Animation")
        anim.AnimationId = "rbxassetid://" .. id
        return anim
    end

    local animations = {
        forward = newAnim(90872539),
        up = newAnim(90872539),
        right1 = newAnim(136801964),
        right2 = newAnim(142495255),
        left1 = newAnim(136801964),
        left2 = newAnim(142495255),
        flyLow1 = newAnim(97169019),
        flyLow2 = newAnim(282574440),
        flyFast = newAnim(282574440),
        back1 = newAnim(136801964),
        back2 = newAnim(106772613),
        back3 = newAnim(42070810),
        back4 = newAnim(214744412),
        down = newAnim(233322916),
        idle1 = newAnim(97171309)
    }

    local tracks = {}
    for name, anim in pairs(animations) do
        tracks[name] = humanoid:LoadAnimation(anim)
    end

    local function stopAll()
        for _, track in pairs(tracks) do
            track:Stop()
        end
    end

    local function startFlying()
        flying = true
        forwardHold = 0
        flySpeed = baseSpeed
        bodyVelocity.Parent = HRP
        bodyGyro.Parent = HRP
        humanoid.PlatformStand = true
    end

    local function stopFlying()
        flying = false
        bodyVelocity.Parent = nil
        bodyGyro.Parent = nil
        humanoid.PlatformStand = false
        stopAll()
    end

    toggleButton.MouseButton1Click:Connect(function()
        if flying then
            stopFlying()
            toggleButton.Text = "Fly OFF"
        else
            startFlying()
            toggleButton.Text = "Fly ON"
        end
    end)

    speedBox.FocusLost:Connect(function()
        local num = tonumber(speedBox.Text)
        if num and num > 0 then
            baseSpeed = num
            savedSpeed = num
            if flying then flySpeed = baseSpeed end
        else
            speedBox.Text = tostring(baseSpeed)
        end
    end)

    UserInputService.InputBegan:Connect(function(input, gameProcessed)
        if gameProcessed then return end
        if input.KeyCode == Enum.KeyCode.W then inputFlags.forward = true end
        if input.KeyCode == Enum.KeyCode.S then inputFlags.back = true end
        if input.KeyCode == Enum.KeyCode.A then inputFlags.left = true end
        if input.KeyCode == Enum.KeyCode.D then inputFlags.right = true end
        if input.KeyCode == Enum.KeyCode.E then inputFlags.up = true end
        if input.KeyCode == Enum.KeyCode.Q then inputFlags.down = true end
    end)

    UserInputService.InputEnded:Connect(function(input)
        if input.KeyCode == Enum.KeyCode.W then inputFlags.forward = false end
        if input.KeyCode == Enum.KeyCode.S then inputFlags.back = false end
        if input.KeyCode == Enum.KeyCode.A then inputFlags.left = false end
        if input.KeyCode == Enum.KeyCode.D then inputFlags.right = false end
        if input.KeyCode == Enum.KeyCode.E then inputFlags.up = false end
        if input.KeyCode == Enum.KeyCode.Q then inputFlags.down = false end
    end)

    RunService.RenderStepped:Connect(function(dt)
        if not flying then return end

        if not inputFlags.forward then forwardHold = 0 end

        local dir = Vector3.zero
        local camCF = Camera.CFrame

        if inputFlags.forward then dir += camCF.LookVector end
        if inputFlags.back then dir -= camCF.LookVector end
        if inputFlags.left then dir -= camCF.RightVector end
        if inputFlags.right then dir += camCF.RightVector end
        if inputFlags.up then dir += Vector3.yAxis end
        if inputFlags.down then dir -= Vector3.yAxis end

        if dir.Magnitude > 0 then dir = dir.Unit end

        bodyVelocity.Velocity = dir * flySpeed
        bodyGyro.CFrame = camCF

        -- Animation Logic
        if inputFlags.up then
            if not tracks.up.IsPlaying then stopAll(); tracks.up:Play() end
        elseif inputFlags.down then
            if not tracks.down.IsPlaying then stopAll(); tracks.down:Play() end
        elseif inputFlags.left then
            if not tracks.left1.IsPlaying then
                stopAll()
                tracks.left1:Play(); tracks.left1.TimePosition = 2.0; tracks.left1:AdjustSpeed(0)
                tracks.left2:Play(); tracks.left2.TimePosition = 0.5; tracks.left2:AdjustSpeed(0)
            end
        elseif inputFlags.right then
            if not tracks.right1.IsPlaying then
                stopAll()
                tracks.right1:Play(); tracks.right1.TimePosition = 1.1; tracks.right1:AdjustSpeed(0)
                tracks.right2:Play(); tracks.right2.TimePosition = 0.5; tracks.right2:AdjustSpeed(0)
            end
        elseif inputFlags.back then
            if not tracks.back1.IsPlaying then
                stopAll()
                tracks.back1:Play(); tracks.back1.TimePosition = 5.3; tracks.back1:AdjustSpeed(0)
                tracks.back2:Play(); tracks.back2:AdjustSpeed(0)
                tracks.back3:Play(); tracks.back3.TimePosition = 0.8; tracks.back3:AdjustSpeed(0)
                tracks.back4:Play(); tracks.back4.TimePosition = 1; tracks.back4:AdjustSpeed(0)
            end
        elseif inputFlags.forward then
            forwardHold += dt
            if forwardHold >= 3 then
                if not tracks.flyFast.IsPlaying then
                    stopAll()
                    flySpeed = baseSpeed * 1.3
                    tracks.flyFast:Play(); tracks.flyFast:AdjustSpeed(0.05)
                end
            else
                if not tracks.flyLow1.IsPlaying then
                    stopAll()
                    flySpeed = baseSpeed
                    tracks.flyLow1:Play()
                    tracks.flyLow2:Play()
                end
            end
        else
            if not tracks.idle1.IsPlaying then
                stopAll()
                tracks.idle1:Play(); tracks.idle1:AdjustSpeed(0)
            end
        end
    end)
end

gui()

Features & Information

I decided NOT to add a key system, NOT make it paid, and make it an instant script for everyone. Ever wanted to fly like characters in the show "Invincible"? Now you can in any game you want to! Open sourced too you can look at all the code to see how it works for beginner scripters and leaners alike, Please give it a like if it works and HAVE FUN :D
#universal#invincible#fly#superman#superman fly

Community Comments (29)

ScriptTesterScriptTesterJul 9, 2025

You can press the letters "Q" and "E" to descend and ascend they also have animations to them

Replying to @ScriptTester
GquagmireGquagmireDec 26, 2025

@ScriptTester how do i do the script

Replying to @Gquagmire
ScriptTesterScriptTesterDec 28, 2025(edited)

@Gquagmire Use an executor if your on PC like XENO, https://xeno.onl/, If your on mobile use krnl

TheMugenKingTheMugenKingJul 9, 2025

Invincible🗣️🔥

ScriptTesterScriptTesterJul 9, 2025

CECIL

IkzzIkzzJul 9, 2025

very tuff I liked ts

gabrielmgabrielmJul 9, 2025

fire

devinmaagdevinmaagJul 9, 2025

sea salt

lortiz_frfrlortiz_frfrJul 9, 2025

Hey I was wondering if I can try to modify the script and make it mobile friendly I’ll still credit you and im asking permission to also add it to my script hub you can see it in my page.

Replying to @lortiz_frfr
Michaelsherlock14Michaelsherlock14Sep 29, 2025

@lortiz_frfr please do

Replying to @lortiz_frfr
SuperDuberRoonieSuperDuberRoonieNov 10, 2025

@lortiz_frfr pls do it, the script seems really cool but I can't use it

benjaminmajidi17benjaminmajidi17Jul 9, 2025

great script and i fw the animation but it bugs out for me everytime i die or reset think u could fix it?

ermhatermhatJul 9, 2025

yo can you make it mobile version would help a lot while moving into my new house without a pc

ScriptTesterScriptTesterJul 10, 2025

@Benjaminmajidi17, what game are you playing? Its worked even after death for me.

ScriptTesterScriptTesterJul 10, 2025

@ermhat, Theres a mobile friendly one out there, but @lortiz_frfr said he's gonna make one so just hit him up by @ his username and talking to him on here

XerytXerytJul 12, 2025

SEA SALTTTT I NEED SEA SALTTTTT

ahmadahmedov2020ahmadahmedov2020Jul 18, 2025

* you if there key nd

ahmadahmedov2020ahmadahmedov2020Jul 18, 2025

Not working

ThraggThraggJul 18, 2025

He has me!

ScriptTesterScriptTesterJul 18, 2025

its PC only

lolgatorinlolgatorinJul 19, 2025

When is lortiz gonna release mobile version bruv it's been a week now

SkeletonlmaooSkeletonlmaooSep 5, 2025

how does it work?

ismayila304ismayila304Oct 23, 2025

Will it gonna work?

CycleOfWisdomCycleOfWisdomApr 5, 2026

Please make it work for jjsploit broo

Oheohd9781Oheohd9781Jun 26, 2026

Я не магу скачать

can someone tell me what poeple use to flt like a viultrumite is jjs

fly

Vincent_WhitmanVincent_WhitmanJul 23, 2026

Does this work on mobile?

More Scripts for Universal Scripts