Highlight all script
Key RequiredUniversal

Highlight all script

Universal Scripttouzanimm144touzanimm144 2.5K views 110 executesUpdated Feb 8, 2025
Unrated
00
Lua Script•70 lines (2220 chars)
local ESP_ENABLED = true -- Toggle ESP On/Off
local ESP_COLOR = Color3.fromRGB(255, 0, 0) -- Red color

-- Create a toggle button for mobile
local ScreenGui = Instance.new("ScreenGui")
local ToggleButton = Instance.new("TextButton")

ScreenGui.Parent = game.CoreGui
ToggleButton.Parent = ScreenGui
ToggleButton.Text = "ESP: ON"
ToggleButton.Size = UDim2.new(0, 100, 0, 50)
ToggleButton.Position = UDim2.new(0, 10, 0, 10)
ToggleButton.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
ToggleButton.BorderSizePixel = 2
ToggleButton.BorderColor3 = Color3.fromRGB(255, 0, 0)

local function createESP(player)
    if player == game.Players.LocalPlayer then return end -- Ignore the local player

    local character = player.Character
    if character and not character:FindFirstChild("ESPHighlight") then
        local highlight = Instance.new("Highlight")
        highlight.Name = "ESPHighlight"
        highlight.Adornee = character
        highlight.FillColor = ESP_COLOR
        highlight.FillTransparency = 0.5
        highlight.OutlineColor = Color3.fromRGB(255, 255, 255) -- White outline
        highlight.OutlineTransparency = 0
        highlight.Parent = character
    end
end

local function updateESP()
    for _, player in pairs(game.Players:GetPlayers()) do
        createESP(player)
    end
end

-- Initial ESP setup
updateESP()

-- Update ESP when a new player joins
game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function()
        task.wait(1) -- Wait for the character to load
        createESP(player)
    end)
end)

-- Toggle ESP using the button
ToggleButton.MouseButton1Click:Connect(function()
    ESP_ENABLED = not ESP_ENABLED
    ToggleButton.Text = "ESP: " .. (ESP_ENABLED and "ON" or "OFF")

    if not ESP_ENABLED then
        -- Remove all ESP highlights
        for _, player in pairs(game.Players:GetPlayers()) do
            if player.Character then
                local esp = player.Character:FindFirstChild("ESPHighlight")
                if esp then
                    esp:Destroy()
                end
            end
        end
    else
        -- Re-enable ESP
        updateESP()
    end
end)

Features & Information

Hightlights all people (thanks chatgpt) -Iwoldail1

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts