-- ============================================================ -- DEADLINE ESP -- X = OFF/ON -- ============================================================ local Players = game:GetService("Players") local UIS = game:GetService("UserInputService") local WS = game:GetService("Workspace") local LP = Players.LocalPlayer local G = getgenv and getgenv() or _G if type(G.DeadlineESP_Cleanup) == "function" then pcall(G.DeadlineESP_Cleanup) end -- ============================================================ -- CONFIG -- ============================================================ local CFG = { ColorAlive = Color3.fromRGB(255, 50, 50), ColorDead = Color3.fromRGB(130, 130, 130), ColorStroke = Color3.fromRGB(255, 255, 255), FillAlpha = 0.6, StrokeAlpha = 0.2, ThroughWalls = true, SkipSelf = true, } -- ============================================================ -- STATE -- ============================================================ local enabled = false local active = {} local ignoreSelf = {} local myUserId = tostring(LP.UserId) local attrNames = {"userid", "UserId", "user_id", "PlayerId"} -- ============================================================ -- HELPERS -- ============================================================ local function isMyModel(model) if not CFG.SkipSelf then return false end local cached = ignoreSelf[model] if cached ~= nil then return cached end for i = 1, 4 do local v = model:GetAttribute(attrNames[i]) if v and tostring(v) == myUserId then ignoreSelf[model] = true return true end end for _, ch in ipairs(model:GetChildren()) do for i = 1, 4 do local v = ch:GetAttribute(attrNames[i]) if v and tostring(v) == myUserId then ignoreSelf[model] = true return true end end end ignoreSelf[model] = false return false end local function addESP(model, isDead) if active[model] then return end local hl = Instance.new("Highlight") hl.Name = "DL_HL" hl.FillColor = isDead and CFG.ColorDead or CFG.ColorAlive hl.OutlineColor = CFG.ColorStroke hl.FillTransparency = CFG.FillAlpha hl.OutlineTransparency = CFG.StrokeAlpha hl.DepthMode = CFG.ThroughWalls and Enum.HighlightDepthMode.AlwaysOnTop or Enum.HighlightDepthMode.Occluded hl.Parent = model active[model] = hl end local function removeESP(model) local hl = active[model] if hl then hl:Destroy() active[model] = nil end end local function clearAll() for model in pairs(active) do removeESP(model) end ignoreSelf = {} end -- ============================================================ -- FOLDERS -- ============================================================ local aliveFolder, deadFolder local function refreshFolders() aliveFolder = WS:FindFirstChild("characters") local ignore = WS:FindFirstChild("ignore") deadFolder = ignore and ignore:FindFirstChild("ragdolls") if not deadFolder then deadFolder = WS:FindFirstChild("ragdolls") end end refreshFolders() -- ============================================================ -- EVENTS -- ============================================================ local conns = {} local function onAdded(model, isDead) if not enabled then return end if not model:IsA("Model") then return end if isMyModel(model) then return end addESP(model, isDead) end local function onRemoved(model) if active[model] then removeESP(model) end ignoreSelf[model] = nil end local function unhook() for _, c in ipairs(conns) do pcall(function() c:Disconnect() end) end conns = {} end local function hookFolder(folder, isDead) if not folder then return end table.insert(conns, folder.ChildAdded:Connect(function(m) onAdded(m, isDead) end)) table.insert(conns, folder.ChildRemoved:Connect(onRemoved)) end local function rehook() unhook() hookFolder(aliveFolder, false) hookFolder(deadFolder, true) end rehook() -- ============================================================ -- SCAN -- ============================================================ local function scan() if not aliveFolder or not deadFolder then refreshFolders() rehook() end if aliveFolder then for _, m in ipairs(aliveFolder:GetChildren()) do if m:IsA("Model") and not isMyModel(m) then addESP(m, false) end end end if deadFolder then for _, m in ipairs(deadFolder:GetChildren()) do if m:IsA("Model") and not isMyModel(m) then addESP(m, true) end end end end -- ============================================================ -- TOGGLE -- ============================================================ local function turnOn() enabled = true scan() local n = 0 for _ in pairs(active) do n += 1 end print("[DeadlineESP] ON | " .. n) end local function turnOff() enabled = false clearAll() print("[DeadlineESP] OFF") end -- ============================================================ -- INPUT -- ============================================================ local inputConn = UIS.InputBegan:Connect(function(input, processed) if processed then return end if input.KeyCode == Enum.KeyCode.X then if enabled then turnOff() else turnOn() end end end) -- ============================================================ -- CLEANUP -- ============================================================ G.DeadlineESP_Cleanup = function() if inputConn then inputConn:Disconnect() inputConn = nil end unhook() turnOff() G.DeadlineESP_Cleanup = nil end print("[DeadlineESP] loaded | X = ON/OFF")