Esp
Key RequiredUniversal

Esp

Universal ScriptScriptsByDeaslScriptsByDeasl 1.1K views 98 executesUpdated Oct 16, 2025
5.0/ 5(3 votes)
30100% Positive
Lua Script•173 lines (5049 chars)
-- Player ESP Script
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local player = Players.LocalPlayer

local espStatus = false
local espItems = {}

-- UI Setup
local ui = Instance.new("ScreenGui")
ui.Parent = game:GetService("CoreGui")

local main = Instance.new("Frame")
main.Size = UDim2.new(0, 250, 0, 140)
main.Position = UDim2.new(0, 10, 0, 10)
main.BackgroundColor3 = Color3.fromRGB(25, 25, 35)
main.Parent = ui

local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0, 6)
corner.Parent = main

local header = Instance.new("TextLabel")
header.Size = UDim2.new(1, 0, 0, 35)
header.BackgroundColor3 = Color3.fromRGB(35, 35, 45)
header.TextColor3 = Color3.fromRGB(255, 255, 255)
header.Text = "Player ESP"
header.Font = Enum.Font.GothamSemibold
header.Parent = main

local toggleBtn = Instance.new("TextButton")
toggleBtn.Size = UDim2.new(0.8, 0, 0, 38)
toggleBtn.Position = UDim2.new(0.1, 0, 0.3, 0)
toggleBtn.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
toggleBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
toggleBtn.Text = "ENABLE ESP"
toggleBtn.Font = Enum.Font.GothamBold
toggleBtn.Parent = main

local statusText = Instance.new("TextLabel")
statusText.Size = UDim2.new(0.8, 0, 0, 25)
statusText.Position = UDim2.new(0.1, 0, 0.7, 0)
statusText.BackgroundTransparency = 1
statusText.TextColor3 = Color3.fromRGB(255, 255, 255)
statusText.Text = "Status: Disabled"
statusText.Font = Enum.Font.Gotham
statusText.Parent = main

local btnCorner = Instance.new("UICorner")
btnCorner.CornerRadius = UDim.new(0, 5)
btnCorner.Parent = toggleBtn

-- Перетаскивание окна
local dragging = false
local dragInput, dragStart, startPos

header.InputBegan:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 then
        dragging = true
        dragStart = input.Position
        startPos = main.Position
        
        input.Changed:Connect(function()
            if input.UserInputState == Enum.UserInputState.End then
                dragging = false
            end
        end)
    end
end)

header.InputChanged:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseMovement then
        dragInput = input
    end
end)

UserInputService.InputChanged:Connect(function(input)
    if input == dragInput and dragging then
        local delta = input.Position - dragStart
        main.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
    end
end)

-- ESP Functions
local function addESP(target)
    if target == player then return end
    if not target.Character then return end
    
    local root = target.Character:FindFirstChild("HumanoidRootPart")
    if not root then return end
    
    local highlight = Instance.new("Highlight")
    highlight.Name = "ESPHighlight"
    highlight.FillColor = Color3.fromRGB(255, 50, 50)
    highlight.OutlineColor = Color3.fromRGB(255, 255, 255)
    highlight.FillTransparency = 0.6
    highlight.Parent = target.Character
    
    local billboard = Instance.new("BillboardGui")
    billboard.Name = "ESPInfo"
    billboard.Size = UDim2.new(0, 200, 0, 40)
    billboard.StudsOffset = Vector3.new(0, 3, 0)
    billboard.AlwaysOnTop = true
    billboard.Adornee = root
    billboard.Parent = target.Character
    
    local label = Instance.new("TextLabel")
    label.Size = UDim2.new(1, 0, 1, 0)
    label.BackgroundTransparency = 1
    label.Text = target.Name
    label.TextColor3 = Color3.fromRGB(255, 255, 255)
    label.TextStrokeTransparency = 0
    label.Font = Enum.Font.GothamBold
    label.TextSize = 14
    label.Parent = billboard
    
    espItems[target] = {highlight, billboard}
end

local function removeESP(target)
    if espItems[target] then
        for _, item in pairs(espItems[target]) do
            item:Destroy()
        end
        espItems[target] = nil
    end
end

local function toggleESP()
    espStatus = not espStatus
    
    if espStatus then
        toggleBtn.Text = "DISABLE ESP"
        toggleBtn.BackgroundColor3 = Color3.fromRGB(50, 200, 50)
        statusText.Text = "Status: Enabled"
        
        for _, target in pairs(Players:GetPlayers()) do
            addESP(target)
        end
    else
        toggleBtn.Text = "ENABLE ESP"
        toggleBtn.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
        statusText.Text = "Status: Disabled"
        
        for target, _ in pairs(espItems) do
            removeESP(target)
        end
        espItems = {}
    end
end

-- Event Handlers
toggleBtn.MouseButton1Click:Connect(toggleESP)

Players.PlayerAdded:Connect(function(newPlayer)
    if espStatus then
        addESP(newPlayer)
    end
end)

Players.PlayerRemoving:Connect(function(leftPlayer)
    removeESP(leftPlayer)
end)

for _, target in pairs(Players:GetPlayers()) do
    target.CharacterAdded:Connect(function()
        if espStatus then
            wait(1)
            addESP(target)
        end
    end)
end

Features & Information

Esp

Community Comments (1)

ScriptsByDeaslScriptsByDeaslOct 18, 2025

Sorry guys this script so bad

More Scripts for Universal Scripts