The Best Universal Esp Free
Key RequiredUniversal

The Best Universal Esp Free

Universal Scriptdaughterdamedaughterdame 575 views 356 executesUpdated Jan 25, 2026
Unrated
00
Lua Script•317 lines (11079 chars)
local Players      = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local UserInputService = game:GetService("UserInputService")
local LocalPlayer  = Players.LocalPlayer

_G.ESPEnabled  = false
_G.ShowEnemies = true
_G.ShowFriends = true

local JUNK        = { Box = true, LOST_ESP = true, LostHighlight = true, LostCham = true }
local playerConns = {}

local function getRelation(player)
    if not LocalPlayer.Team or not player.Team then return "neutral" end
    return player.Team == LocalPlayer.Team and "friend" or "enemy"
end

local function getColor(player)
    local rel = getRelation(player)
    if rel == "friend" then return Color3.fromRGB(0, 210, 110) end
    if rel == "enemy"  then return Color3.fromRGB(255, 55, 55)  end
    return Color3.fromRGB(255, 165, 0)
end

local function shouldShow(player)
    local rel = getRelation(player)
    if rel == "friend" then return _G.ShowFriends end
    if rel == "enemy"  then return _G.ShowEnemies  end
    return true
end

local function removeHL(char)
    local hl = char:FindFirstChild("LOST_HL")
    if hl then hl:Destroy() end
end

local function applyHL(char, player)
    local hl = char:FindFirstChild("LOST_HL")
    if not hl then
        hl              = Instance.new("Highlight")
        hl.Name         = "LOST_HL"
        hl.OutlineColor = Color3.new(1, 1, 1)
        hl.DepthMode    = Enum.HighlightDepthMode.AlwaysOnTop
        hl.Parent       = char
    end
    hl.FillColor = getColor(player)
end

local function refreshPlayer(player)
    if player == LocalPlayer then return end
    local char = player.Character
    if not char then return end
    if _G.ESPEnabled and shouldShow(player) then
        applyHL(char, player)
    else
        removeHL(char)
    end
end

local function refreshAll()
    for _, p in ipairs(Players:GetPlayers()) do refreshPlayer(p) end
end

local function watchJunk(char)
    for _, obj in ipairs(char:GetChildren()) do
        if JUNK[obj.Name] or obj:IsA("BoxHandleAdornment") then obj:Destroy() end
    end
    char.ChildAdded:Connect(function(obj)
        if JUNK[obj.Name] or obj:IsA("BoxHandleAdornment") then obj:Destroy() end
    end)
end

local function disconnectPlayer(player)
    if playerConns[player] then
        for _, conn in ipairs(playerConns[player]) do conn:Disconnect() end
        playerConns[player] = nil
    end
end

local function setupPlayer(player)
    if player == LocalPlayer then return end
    disconnectPlayer(player)
    playerConns[player] = {}
    local conns = playerConns[player]
    table.insert(conns, player.CharacterAdded:Connect(function(char)
        watchJunk(char)
        task.wait()
        refreshPlayer(player)
    end))
    table.insert(conns, player:GetPropertyChangedSignal("Team"):Connect(function()
        refreshPlayer(player)
    end))
    if player.Character then
        watchJunk(player.Character)
        refreshPlayer(player)
    end
end

LocalPlayer:GetPropertyChangedSignal("Team"):Connect(refreshAll)
for _, p in ipairs(Players:GetPlayers()) do setupPlayer(p) end
Players.PlayerAdded:Connect(setupPlayer)
Players.PlayerRemoving:Connect(function(player)
    if player.Character then removeHL(player.Character) end
    disconnectPlayer(player)
end)

-- [[ INTRO ]] --
local function PlayIntro()
    local gui   = Instance.new("ScreenGui", game:GetService("CoreGui"))
    gui.ResetOnSpawn = false
    local label = Instance.new("TextLabel", gui)
    label.Size               = UDim2.new(1, 0, 1, 0)
    label.BackgroundTransparency = 1
    label.Text               = "LostHub"
    label.TextColor3         = Color3.new(1, 1, 1)
    label.Font               = Enum.Font.GothamBold
    label.TextSize           = 1
    label.TextTransparency   = 1
    label.ZIndex             = 10
    TweenService:Create(label, TweenInfo.new(1.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {
        TextSize = 80, TextTransparency = 0
    }):Play()
    task.wait(1.5)
    TweenService:Create(label, TweenInfo.new(1, Enum.EasingStyle.Quint, Enum.EasingDirection.In), {
        TextSize = 120, TextTransparency = 1
    }):Play()
    task.wait(1)
    gui:Destroy()
end

PlayIntro()

-- [[ UI NATIVA ]] --
local CoreGui = game:GetService("CoreGui")
local ScreenGui = Instance.new("ScreenGui", CoreGui)
ScreenGui.Name          = "LostHubUI"
ScreenGui.ResetOnSpawn  = false
ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling

local Window = Instance.new("Frame", ScreenGui)
Window.Name              = "Window"
Window.Size              = UDim2.fromOffset(280, 220)
Window.Position          = UDim2.new(0.5, -140, 0.5, -110)
Window.BackgroundColor3  = Color3.fromRGB(15, 15, 15)
Window.BorderSizePixel   = 0
Window.ClipsDescendants  = true

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

local stroke = Instance.new("UIStroke", Window)
stroke.Color     = Color3.fromRGB(60, 60, 60)
stroke.Thickness = 1

local TitleBar = Instance.new("Frame", Window)
TitleBar.Size             = UDim2.new(1, 0, 0, 36)
TitleBar.BackgroundColor3 = Color3.fromRGB(22, 22, 22)
TitleBar.BorderSizePixel  = 0

local TitleCorner = Instance.new("UICorner", TitleBar)
TitleCorner.CornerRadius = UDim.new(0, 8)

local TitleFix = Instance.new("Frame", TitleBar)
TitleFix.Size            = UDim2.new(1, 0, 0.5, 0)
TitleFix.Position        = UDim2.new(0, 0, 0.5, 0)
TitleFix.BackgroundColor3 = Color3.fromRGB(22, 22, 22)
TitleFix.BorderSizePixel = 0

local TitleLabel = Instance.new("TextLabel", TitleBar)
TitleLabel.Size              = UDim2.new(1, -12, 1, 0)
TitleLabel.Position          = UDim2.new(0, 12, 0, 0)
TitleLabel.BackgroundTransparency = 1
TitleLabel.Text              = "LOST  ·  Hub Edition"
TitleLabel.TextColor3        = Color3.new(1, 1, 1)
TitleLabel.Font              = Enum.Font.GothamBold
TitleLabel.TextSize          = 13
TitleLabel.TextXAlignment    = Enum.TextXAlignment.Left

local HintLabel = Instance.new("TextLabel", TitleBar)
HintLabel.Size              = UDim2.new(0, 120, 1, 0)
HintLabel.Position          = UDim2.new(1, -124, 0, 0)
HintLabel.BackgroundTransparency = 1
HintLabel.Text              = "[RShift] toggle"
HintLabel.TextColor3        = Color3.fromRGB(100, 100, 100)
HintLabel.Font              = Enum.Font.Gotham
HintLabel.TextSize          = 11
HintLabel.TextXAlignment    = Enum.TextXAlignment.Right

local Content = Instance.new("Frame", Window)
Content.Size             = UDim2.new(1, 0, 1, -36)
Content.Position         = UDim2.new(0, 0, 0, 36)
Content.BackgroundTransparency = 1

local Layout = Instance.new("UIListLayout", Content)
Layout.Padding          = UDim.new(0, 0)
Layout.SortOrder        = Enum.SortOrder.LayoutOrder
Layout.FillDirection    = Enum.FillDirection.Vertical

local function makeToggle(parent, labelText, default, order, onChange)
    local row = Instance.new("Frame", parent)
    row.Name             = labelText
    row.Size             = UDim2.new(1, 0, 0, 54)
    row.BackgroundTransparency = 1
    row.LayoutOrder      = order

    local lbl = Instance.new("TextLabel", row)
    lbl.Size             = UDim2.new(1, -70, 1, 0)
    lbl.Position         = UDim2.new(0, 16, 0, 0)
    lbl.BackgroundTransparency = 1
    lbl.Text             = labelText
    lbl.TextColor3       = Color3.fromRGB(220, 220, 220)
    lbl.Font             = Enum.Font.Gotham
    lbl.TextSize         = 13
    lbl.TextXAlignment   = Enum.TextXAlignment.Left

    local track = Instance.new("Frame", row)
    track.Size           = UDim2.fromOffset(42, 22)
    track.Position       = UDim2.new(1, -56, 0.5, -11)
    track.BackgroundColor3 = default and Color3.fromRGB(0, 180, 90) or Color3.fromRGB(55, 55, 55)
    track.BorderSizePixel = 0
    Instance.new("UICorner", track).CornerRadius = UDim.new(1, 0)

    local thumb = Instance.new("Frame", track)
    thumb.Size           = UDim2.fromOffset(16, 16)
    thumb.Position       = default and UDim2.new(1, -19, 0.5, -8) or UDim2.new(0, 3, 0.5, -8)
    thumb.BackgroundColor3 = Color3.new(1, 1, 1)
    thumb.BorderSizePixel = 0
    Instance.new("UICorner", thumb).CornerRadius = UDim.new(1, 0)

    local divider = Instance.new("Frame", row)
    divider.Size           = UDim2.new(1, -32, 0, 1)
    divider.Position       = UDim2.new(0, 16, 1, -1)
    divider.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
    divider.BorderSizePixel = 0

    local value = default
    local btn = Instance.new("TextButton", row)
    btn.Size             = UDim2.new(1, 0, 1, 0)
    btn.BackgroundTransparency = 1
    btn.Text             = ""

    btn.MouseButton1Click:Connect(function()
        value = not value
        TweenService:Create(track, TweenInfo.new(0.2), {
            BackgroundColor3 = value and Color3.fromRGB(0, 180, 90) or Color3.fromRGB(55, 55, 55)
        }):Play()
        TweenService:Create(thumb, TweenInfo.new(0.2), {
            Position = value and UDim2.new(1, -19, 0.5, -8) or UDim2.new(0, 3, 0.5, -8)
        }):Play()
        onChange(value)
    end)

    return row
end

local Separator = Instance.new("Frame", Content)
Separator.Size             = UDim2.new(1, -32, 0, 1)
Separator.Position         = UDim2.new(0, 16, 0, 0)
Separator.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
Separator.BorderSizePixel  = 0
Separator.LayoutOrder      = 0

makeToggle(Content, "Highlight ESP", false, 1, function(val)
    _G.ESPEnabled = val
    refreshAll()
end)

makeToggle(Content, "Mostrar Inimigos 🔴", true, 2, function(val)
    _G.ShowEnemies = val
    if _G.ESPEnabled then refreshAll() end
end)

makeToggle(Content, "Mostrar Aliados 🟢", true, 3, function(val)
    _G.ShowFriends = val
    if _G.ESPEnabled then refreshAll() end
end)

local Footer = Instance.new("TextLabel", Window)
Footer.Size              = UDim2.new(1, -16, 0, 20)
Footer.Position          = UDim2.new(0, 16, 1, -24)
Footer.BackgroundTransparency = 1
Footer.Text              = "TG : @LostHubScript"
Footer.TextColor3        = Color3.fromRGB(80, 80, 80)
Footer.Font              = Enum.Font.Gotham
Footer.TextSize          = 11
Footer.TextXAlignment    = Enum.TextXAlignment.Left

-- [[ DRAG ]] --
local dragging, dragStart, startPos
TitleBar.InputBegan:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 then
        dragging  = true
        dragStart = input.Position
        startPos  = Window.Position
    end
end)
TitleBar.InputEnded:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 then
        dragging = false
    end
end)
UserInputService.InputChanged:Connect(function(input)
    if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
        local delta = input.Position - dragStart
        Window.Position = UDim2.new(
            startPos.X.Scale, startPos.X.Offset + delta.X,
            startPos.Y.Scale, startPos.Y.Offset + delta.Y
        )
    end
end)

-- [[ TOGGLE VISIBILIDADE ]] --
UserInputService.InputBegan:Connect(function(input, gameProcessed)
    if not gameProcessed and input.KeyCode == Enum.KeyCode.RightShift then
        Window.Visible = not Window.Visible
    end
end)

Features & Information

A simple script made by CLAUDE AI
#Universal

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts