esp 4
Key RequiredUniversal

esp 4

Universal Scripthuezoangel57huezoangel57 11.5K views 44 executesUpdated Aug 11, 2025
0.0/ 5(1 votes)
010% Positive
Lua Script•139 lines (4835 chars)
-- ESP ULTRA OPTIMIZADO (SIN LAG + Muertos + Nunca se desactiva AL MORIR)
-- SINGLE LOOP (1 conexión total), Distancia límite, Limpieza auto, _G para no duplicados
-- Muestra TODO el tiempo (incluso muerto tú: distancia "???"), Font pequeña, Bajo uso CPU

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local LocalPlayer = Players.LocalPlayer
local Camera = workspace.CurrentCamera

-- Globals para persistencia y no duplicados
_G.ESP = _G.ESP or {}
local ESP = _G.ESP

-- Colores
local TeamColor = Color3.fromRGB(0, 255, 0)    -- Verde aliados vivos
local EnemyColor = Color3.fromRGB(255, 0, 0)   -- Rojo enemigos vivos
local DeadColor = Color3.fromRGB(128, 128, 128) -- Gris muertos
local BoxThickness = 1.5  -- Más delgado
local MaxDist = 1000     -- Oculta texto si >1000 studs (pero box se ve)

-- LIMPIEZA INICIAL (evita duplicados/lag acumulado)
for player, data in pairs(ESP) do
    if data.Box then data.Box:Remove() end
    if data.Name then data.Name:Remove() end
    ESP[player] = nil
end

-- FUNCIÓN para crear drawings de un jugador (solo UNA vez)
local function CreateDrawings(player)
    if ESP[player] then return end
    
    local Box = Drawing.new("Square")
    Box.Thickness = BoxThickness
    Box.Filled = false
    Box.Transparency = 1
    Box.Visible = false

    local Name = Drawing.new("Text")
    Name.Size = 14  -- Más pequeño (menos lag)
    Name.Center = true
    Name.Outline = true
    Name.Font = 2
    Name.Visible = false

    ESP[player] = {Box = Box, Name = Name}
end

-- FUNCIÓN para remover drawings
local function RemoveDrawings(player)
    local data = ESP[player]
    if data then
        if data.Box then data.Box:Remove() end
        if data.Name then data.Name:Remove() end
        ESP[player] = nil
    end
end

-- SINGLE LOOP ULTRA OPTIMIZADO (¡1 sola conexión para TODOS los jugadores!)
_G.UpdateConnection = _G.UpdateConnection
if _G.UpdateConnection then
    _G.UpdateConnection:Disconnect()
end

_G.UpdateConnection = RunService.RenderStepped:Connect(function()
    local myRoot = LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
    local myPos = myRoot and myRoot.Position

    for _, player in ipairs(Players:GetPlayers()) do
        if player == LocalPlayer then continue end

        local char = player.Character
        if not char then
            RemoveDrawings(player)  -- Limpia si no tiene char
            continue
        end

        local root = char:FindFirstChild("HumanoidRootPart")
        local head = char:FindFirstChild("Head")
        local humanoid = char:FindFirstChild("Humanoid")
        if not root or not head then
            RemoveDrawings(player)
            continue
        end

        -- Crear drawings si no existen
        CreateDrawings(player)

        local data = ESP[player]
        local screenPos, onScreen = Camera:WorldToViewportPoint(root.Position)
        if not onScreen then
            data.Box.Visible = false
            data.Name.Visible = false
            return
        end

        -- Tamaño dinámico
        local headPos = Camera:WorldToViewportPoint(head.Position + head.Size/2)
        local footPos = Camera:WorldToViewportPoint(root.Position - Vector3.new(0, 4, 0))
        local boxHeight = math.abs(headPos.Y - footPos.Y)
        local boxWidth = boxHeight * 0.5
        if boxHeight < 10 then  -- Muy lejos/pequeño = ocultar
            data.Box.Visible = false
            data.Name.Visible = false
            return
        end

        -- Posición y tamaño
        data.Box.Size = Vector2.new(boxWidth, boxHeight)
        data.Box.Position = Vector2.new(screenPos.X - boxWidth/2, screenPos.Y - boxHeight/2)

        -- Distancia (??? si estás muerto)
        local distance = myPos and math.floor((myPos - root.Position).Magnitude) or 999
        if distance > MaxDist then distance = 999 end

        -- Estado vivo/muerto
        local isDead = humanoid and humanoid.Health <= 0
        local color = (player.Team == LocalPlayer.Team and player.Team) and TeamColor or EnemyColor
        local status = isDead and " DEAD" or ""

        if isDead then color = DeadColor end

        -- Aplicar
        data.Box.Color = color
        data.Name.Color = color
        data.Name.Text = string.format("%s%s [%s]", player.Name, status, distance >= 999 and "???" or tostring(distance))
        data.Name.Position = Vector2.new(screenPos.X, screenPos.Y - boxHeight/2 - 18)

        data.Box.Visible = true
        data.Name.Visible = true
    end
end)

-- Limpieza cuando jugador sale
Players.PlayerRemoving:Connect(function(player)
    RemoveDrawings(player)
end)

print("ESP ULTRA LAG-FREE cargado! 🔥 (Single loop + Limpieza auto + Persistente FOREVER)")
print("Muestra muertos, distancia ??? cuando tú mueres, oculta lejos/pequeños.")

Features & Information

Shiftlock Universal for every game

Community Comments (1)

XerytXerytAug 11, 2025(edited)

I guess ts is chatgpt

More Scripts for Universal Scripts