ESP script
Key Required

ESP script

🎨Paint Or OOF!mraumin11mraumin11 251 views 264 executesUpdated Jun 21, 2026
Unrated
00
Lua Script•231 lines (7756 chars)
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")

local LocalPlayer = Players.LocalPlayer
local enabled = false
local highlights = {}
local connection = nil

local ACCENT_ON = Color3.fromRGB(80, 230, 150)
local ACCENT_OFF = Color3.fromRGB(90, 95, 110)

-- ====================== UI ======================
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "HeadCanvasHighlight"
ScreenGui.ResetOnSpawn = false
ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui")

local MainFrame = Instance.new("Frame")
MainFrame.Size = UDim2.new(0, 210, 0, 54)
MainFrame.Position = UDim2.new(0.5, -105, 0.08, 0)
MainFrame.BackgroundColor3 = Color3.fromRGB(22, 22, 30)
MainFrame.BackgroundTransparency = 0.04
MainFrame.BorderSizePixel = 0
MainFrame.Active = true
MainFrame.Parent = ScreenGui

local UICorner = Instance.new("UICorner")
UICorner.CornerRadius = UDim.new(0, 14)
UICorner.Parent = MainFrame

local Stroke = Instance.new("UIStroke")
Stroke.Color = Color3.fromRGB(255, 255, 255)
Stroke.Thickness = 1
Stroke.Transparency = 0.88
Stroke.Parent = MainFrame

-- subtle accent bar on the left edge, reflects on/off state
local AccentBar = Instance.new("Frame")
AccentBar.Size = UDim2.new(0, 3, 0.6, 0)
AccentBar.Position = UDim2.new(0, 0, 0.2, 0)
AccentBar.BackgroundColor3 = ACCENT_OFF
AccentBar.BorderSizePixel = 0
AccentBar.Parent = MainFrame

local AccentCorner = Instance.new("UICorner")
AccentCorner.CornerRadius = UDim.new(1, 0)
AccentCorner.Parent = AccentBar

-- Title + subtitle (status word)
local TextHolder = Instance.new("Frame")
TextHolder.Size = UDim2.new(1, -76, 1, 0)
TextHolder.Position = UDim2.new(0, 16, 0, 0)
TextHolder.BackgroundTransparency = 1
TextHolder.Active = false
TextHolder.Parent = MainFrame

local Title = Instance.new("TextLabel")
Title.Size = UDim2.new(1, 0, 0, 20)
Title.Position = UDim2.new(0, 0, 0, 8)
Title.BackgroundTransparency = 1
Title.Text = "ESP"
Title.TextColor3 = Color3.fromRGB(235, 235, 240)
Title.TextXAlignment = Enum.TextXAlignment.Left
Title.Font = Enum.Font.GothamMedium
Title.TextSize = 15
Title.Active = false
Title.Parent = TextHolder

local Subtitle = Instance.new("TextLabel")
Subtitle.Size = UDim2.new(1, 0, 0, 14)
Subtitle.Position = UDim2.new(0, 0, 0, 28)
Subtitle.BackgroundTransparency = 1
Subtitle.Text = "off"
Subtitle.TextColor3 = Color3.fromRGB(130, 130, 145)
Subtitle.TextXAlignment = Enum.TextXAlignment.Left
Subtitle.Font = Enum.Font.Gotham
Subtitle.TextSize = 12
Subtitle.Active = false
Subtitle.Parent = TextHolder

-- iOS-style toggle switch
local SwitchTrack = Instance.new("TextButton")
SwitchTrack.Size = UDim2.new(0, 44, 0, 24)
SwitchTrack.Position = UDim2.new(1, -58, 0.5, -12)
SwitchTrack.BackgroundColor3 = ACCENT_OFF
SwitchTrack.AutoButtonColor = false
SwitchTrack.Text = ""
SwitchTrack.Parent = MainFrame

local SwitchCorner = Instance.new("UICorner")
SwitchCorner.CornerRadius = UDim.new(1, 0)
SwitchCorner.Parent = SwitchTrack

local SwitchKnob = Instance.new("Frame")
SwitchKnob.Size = UDim2.new(0, 18, 0, 18)
SwitchKnob.Position = UDim2.new(0, 3, 0.5, -9)
SwitchKnob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
SwitchKnob.BorderSizePixel = 0
SwitchKnob.Parent = SwitchTrack

local KnobCorner = Instance.new("UICorner")
KnobCorner.CornerRadius = UDim.new(1, 0)
KnobCorner.Parent = SwitchKnob

-- gentle entrance animation
MainFrame.BackgroundTransparency = 1
Stroke.Transparency = 1
local startY = MainFrame.Position.Y.Scale
MainFrame.Position = UDim2.new(0.5, -105, startY - 0.03, 0)
TweenService:Create(MainFrame, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
    BackgroundTransparency = 0.04,
    Position = UDim2.new(0.5, -105, startY, 0)
}):Play()
TweenService:Create(Stroke, TweenInfo.new(0.3), {Transparency = 0.88}):Play()

-- ====================== ПЕРЕТАСКИВАНИЕ ======================
local dragging = false
local dragInput, dragStart, startPos

local function updateInput(input)
    local delta = input.Position - dragStart
    MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
end

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

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

UserInputService.InputChanged:Connect(function(input)
    if dragging and input == dragInput then
        updateInput(input)
    end
end)

-- ====================== ЛОГИКА ======================
local function highlightCharacter(character)
    if highlights[character] then return end
    local highlight = Instance.new("Highlight")
    highlight.Name = "HeadCanvasHighlight"
    highlight.FillColor = Color3.fromRGB(0, 255, 170)
    highlight.OutlineColor = Color3.fromRGB(0, 255, 255)
    highlight.FillTransparency = 0.45
    highlight.OutlineTransparency = 0.1
    highlight.Adornee = character
    highlight.Parent = character
    highlights[character] = highlight
end

local function removeHighlight(character)
    if highlights[character] then
        highlights[character]:Destroy()
        highlights[character] = nil
    end
end

local function checkPlayers()
    for _, player in ipairs(Players:GetPlayers()) do
        if player ~= LocalPlayer and player.Character then
            local char = player.Character
            if char:FindFirstChild("HeadCanvas") or char:FindFirstChild("headcanvas") then
                highlightCharacter(char)
            else
                removeHighlight(char)
            end
        end
    end
end

local function setSwitch(state)
    local trackColor = state and ACCENT_ON or ACCENT_OFF
    local knobPos = state and UDim2.new(0, 23, 0.5, -9) or UDim2.new(0, 3, 0.5, -9)

    TweenService:Create(SwitchTrack, TweenInfo.new(0.18, Enum.EasingStyle.Quad), {BackgroundColor3 = trackColor}):Play()
    TweenService:Create(SwitchKnob, TweenInfo.new(0.18, Enum.EasingStyle.Quad), {Position = knobPos}):Play()
    TweenService:Create(AccentBar, TweenInfo.new(0.18), {BackgroundColor3 = trackColor}):Play()

    Subtitle.Text = state and "on" or "off"
    TweenService:Create(Subtitle, TweenInfo.new(0.18), {TextColor3 = state and ACCENT_ON or Color3.fromRGB(130, 130, 145)}):Play()
end

-- small press-in feedback on the knob
local function knobPulse()
    TweenService:Create(SwitchKnob, TweenInfo.new(0.08), {Size = UDim2.new(0, 15, 0, 15)}):Play()
    task.delay(0.08, function()
        TweenService:Create(SwitchKnob, TweenInfo.new(0.1), {Size = UDim2.new(0, 18, 0, 18)}):Play()
    end)
end

local function toggle()
    knobPulse()
    enabled = not enabled
    setSwitch(enabled)

    if enabled then
        checkPlayers()
        connection = RunService.Heartbeat:Connect(checkPlayers)
    else
        if connection then connection:Disconnect() connection = nil end
        for char, _ in pairs(highlights) do
            removeHighlight(char)
        end
    end
end

SwitchTrack.MouseButton1Click:Connect(toggle)

Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function()
        if enabled then
            task.wait(0.6)
            checkPlayers()
        end
    end)
end)

Features & Information

ok just esp for this game ok? fully free and no need key

Community Comments (0)

No comments yet for this script.