Levitator v1
Key RequiredUniversal

Levitator v1

Universal Script_0_0__0_0_ 538 views 26 executesUpdated Dec 19, 2025
Unrated
00
Lua Script•260 lines (7706 chars)
local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local HRP = Character:WaitForChild("HumanoidRootPart")

local UIS = game:GetService("UserInputService")
local RunService = game:GetService("RunService")

local LEVITATION_FORCE = 35
local DRAG_FACTOR = 0.92
local TILT_AMOUNT = 0.15
local STABILIZE_SPEED = 8
local MAX_HOVER_VARIANCE = 3

local isLevitating = false
local currentVelocity = Vector3.new(0, 0, 0)
local targetHeight = 0
local originalCanCollide = {}
local mobileTapCount = 0
local mobileTapTime = 0

local screenGui = Instance.new("ScreenGui")
screenGui.Parent = Player:WaitForChild("PlayerGui")
screenGui.Name = "LevitationUI"

local statusLabel = Instance.new("TextLabel")
statusLabel.Size = UDim2.new(0.45, 0, 0.09, 0)
statusLabel.Position = UDim2.new(0.275, 0, 0.02, 0)
statusLabel.BackgroundTransparency = 0.85
statusLabel.BackgroundColor3 = Color3.new(0.05, 0.05, 0.1)
statusLabel.TextColor3 = Color3.new(0.8, 0.9, 1)
statusLabel.Text = "Levitator: STANDBY"
statusLabel.Font = Enum.Font.GothamBold
statusLabel.TextSize = 20
statusLabel.BorderSizePixel = 0
statusLabel.TextStrokeTransparency = 0.7
statusLabel.Parent = screenGui

local heightBar = Instance.new("Frame")
heightBar.Size = UDim2.new(0.35, 0, 0.015, 0)
heightBar.Position = UDim2.new(0.325, 0, 0.12, 0)
heightBar.BackgroundColor3 = Color3.new(0.2, 0.2, 0.3)
heightBar.BorderSizePixel = 0
heightBar.Parent = screenGui

local heightFill = Instance.new("Frame")
heightFill.Size = UDim2.new(0, 0, 1, 0)
heightFill.BackgroundColor3 = Color3.new(0.4, 0.7, 1)
heightFill.BorderSizePixel = 0
heightFill.Parent = heightBar

local function updateUI(message, color)
    statusLabel.Text = "Levitator: " .. message
    statusLabel.TextColor3 = color
end

updateUI("READY", Color3.new(0, 1, 0.5))

local function manageCollisions(state)
    if state then
        originalCanCollide = {}
        for _, part in pairs(Character:GetDescendants()) do
            if part:IsA("BasePart") then
                originalCanCollide[part] = part.CanCollide
                part.CanCollide = false
            end
        end
    else
        for part, collideState in pairs(originalCanCollide) do
            if part.Parent then
                part.CanCollide = collideState
            end
        end
        originalCanCollide = {}
    end
end

local function activateLevitation()
    if isLevitating then return end
    
    isLevitating = true
    targetHeight = HRP.Position.Y
    Humanoid.PlatformStand = true
    manageCollisions(true)
    
    updateUI("LEVITATING", Color3.new(0.3, 0.8, 1))
    
    local pulse = Instance.new("ParticleEmitter")
    pulse.Parent = HRP
    pulse.LightEmission = 0.8
    pulse.Color = ColorSequence.new(Color3.new(0.5, 0.8, 1))
    pulse.Size = NumberSequence.new(0.5)
    pulse.Transparency = NumberSequence.new(0.7)
    pulse.Lifetime = NumberRange.new(0.5)
    pulse.Rate = 15
    pulse.VelocitySpread = 5
    
    task.wait(1.2)
    pulse:Destroy()
end

local function deactivateLevitation()
    if not isLevitating then return end
    
    isLevitating = false
    Humanoid.PlatformStand = false
    manageCollisions(false)
    
    updateUI("DISABLED", Color3.new(1, 0.4, 0.3))
    
    task.wait(1.5)
    if not isLevitating then
        updateUI("READY", Color3.new(0, 1, 0.5))
    end
end

local function toggleLevitation()
    if isLevitating then
        deactivateLevitation()
    else
        activateLevitation()
    end
end

UIS.InputBegan:Connect(function(input, processed)
    if processed then return end
    
    if input.UserInputType == Enum.UserInputType.Keyboard then
        if input.KeyCode == Enum.KeyCode.G then
            toggleLevitation()
        end
    end
    
    if input.UserInputType == Enum.UserInputType.Touch then
        local now = tick()
        if now - mobileTapTime > 0.6 then
            mobileTapCount = 0
        end
        mobileTapCount += 1
        mobileTapTime = now
        
        if mobileTapCount >= 3 then
            mobileTapCount = 0
            toggleLevitation()
        end
    end
end)

local function calculateDriftForce()
    if not isLevitating then return Vector3.new(0, 0, 0) end
    
    local camera = workspace.CurrentCamera
    local drift = Vector3.new(0, 0, 0)
    local inputActive = false
    
    if UIS:IsKeyDown(Enum.KeyCode.W) then
        drift = drift + camera.CFrame.LookVector * 0.7
        inputActive = true
    end
    if UIS:IsKeyDown(Enum.KeyCode.S) then
        drift = drift - camera.CFrame.LookVector * 0.5
        inputActive = true
    end
    if UIS:IsKeyDown(Enum.KeyCode.D) then
        drift = drift + camera.CFrame.RightVector * 0.6
        inputActive = true
    end
    if UIS:IsKeyDown(Enum.KeyCode.A) then
        drift = drift - camera.CFrame.RightVector * 0.6
        inputActive = true
    end
    
    if not inputActive then
        drift = currentVelocity * 0.3
    end
    
    return drift
end

local function updateHeightStabilization()
    if not isLevitating then return 0 end
    
    local currentY = HRP.Position.Y
    local heightDifference = targetHeight - currentY
    
    if math.abs(heightDifference) > MAX_HOVER_VARIANCE then
        targetHeight = currentY + math.sign(heightDifference) * MAX_HOVER_VARIANCE
        heightDifference = targetHeight - currentY
    end
    
    local stabilization = heightDifference * 0.4
    
    if UIS:IsKeyDown(Enum.KeyCode.Space) then
        stabilization = stabilization + 1.2
        targetHeight = targetHeight + 0.15
    end
    if UIS:IsKeyDown(Enum.KeyCode.LeftControl) then
        stabilization = stabilization - 1.2
        targetHeight = targetHeight - 0.15
    end
    
    return stabilization
end

local levitationConnection
levitationConnection = RunService.Heartbeat:Connect(function(delta)
    if not isLevitating or not HRP then
        heightFill.Size = UDim2.new(0, 0, 1, 0)
        return
    end
    
    local driftForce = calculateDriftForce()
    local liftForce = updateHeightStabilization()
    
    local buoyancy = Vector3.new(0, LEVITATION_FORCE * 0.3, 0)
    local totalForce = driftForce + Vector3.new(0, liftForce, 0) + buoyancy
    
    currentVelocity = currentVelocity + totalForce * delta * 12
    currentVelocity = currentVelocity * DRAG_FACTOR
    
    if currentVelocity.Magnitude > LEVITATION_FORCE then
        currentVelocity = currentVelocity.Unit * LEVITATION_FORCE
    end
    
    local gravityCompensation = Vector3.new(0, workspace.Gravity * delta * 60, 0)
    HRP.Velocity = currentVelocity + gravityCompensation
    
    local tiltX = -currentVelocity.Z * TILT_AMOUNT
    local tiltZ = currentVelocity.X * TILT_AMOUNT
    HRP.RotVelocity = Vector3.new(tiltX, 0, tiltZ) * 2
    
    local heightPercent = (HRP.Position.Y - targetHeight + MAX_HOVER_VARIANCE) / (MAX_HOVER_VARIANCE * 2)
    heightPercent = math.clamp(heightPercent, 0, 1)
    heightFill.Size = UDim2.new(heightPercent, 0, 1, 0)
    
    if heightPercent > 0.5 then
        heightFill.BackgroundColor3 = Color3.new(0.8, 0.4, 0.2)
    else
        heightFill.BackgroundColor3 = Color3.new(0.4, 0.7, 1)
    end
end)

Character:WaitForChild("Humanoid").Died:Connect(function()
    if isLevitating then
        deactivateLevitation()
    end
    if levitationConnection then
        levitationConnection:Disconnect()
    end
end)

Player.CharacterAdded:Connect(function(newChar)
    Character = newChar
    Humanoid = Character:WaitForChild("Humanoid")
    HRP = Character:WaitForChild("HumanoidRootPart")
    isLevitating = false
    
    task.wait(0.5)
    updateUI("READY", Color3.new(0, 1, 0.5))
end)

Features & Information

It's Literally just a script that levitates u. Keybind - G Mobile - Triple Tap
#Levitator#Free#Roblox#Keyless

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts