Open Source ESP
Key RequiredUniversal

Open Source ESP

Universal ScriptTruthfulJubiTruthfulJubi 834 views 88 executesUpdated Apr 10, 2026
Unrated
00
Lua Script•74 lines (1841 chars)
--esp
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UIS = game:GetService("UserInputService")
local LocalPlayer = Players.LocalPlayer

local espEnabled = false
local highlights = {}

local function getHighlight(player)
    if highlights[player] then
        return highlights[player]
    end

    local h = Instance.new("Highlight")
    h.FillTransparency = 1
    h.OutlineTransparency = 0
    h.Parent = game.CoreGui
    highlights[player] = h
    return h
end

local function removeESP(player)
    if highlights[player] then
        highlights[player]:Destroy()
        highlights[player] = nil
    end
end

local function getHealthColor(hp)
    if hp <= 0 then
        return Color3.fromRGB(0, 0, 0)
    elseif hp <= 30 then
        return Color3.fromRGB(255, 0, 0)
    elseif hp <= 59 then
        return Color3.fromRGB(255, 255, 0)
    else
        return Color3.fromRGB(0, 255, 0)
    end
end

RunService.RenderStepped:Connect(function()
    for _, plr in ipairs(Players:GetPlayers()) do
        if plr ~= LocalPlayer then

            local h = getHighlight(plr)

            if espEnabled and plr.Character then
                local hum = plr.Character:FindFirstChild("Humanoid")
                if hum and hum.Health > 0 then
                    h.Adornee = plr.Character
                    h.OutlineColor = getHealthColor(hum.Health)
                    h.Enabled = true
                else
                    h.Enabled = false
                end
            else
                h.Enabled = false
            end
        end
    end
end)

Players.PlayerRemoving:Connect(removeESP)

UIS.InputBegan:Connect(function(input)
    if UIS:GetFocusedTextBox() then
        return
    end

    if input.KeyCode == Enum.KeyCode.M then
        espEnabled = not espEnabled
    end
end)

Features & Information

ESP, M to activate. changes color depending on health: Green; Max - 60 Yellow; 59 - 31 Red; 30 - 1

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts