AtlasLoader

CorpleESP

Dec 17th, 2025
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.64 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local runService = game:GetService("RunService")
  3. local corpsesFolder = workspace:WaitForChild("Corpses")
  4.  
  5. local espEnabled = false
  6. local espObjects = {}
  7. local updateConn
  8.  
  9. -- GUI
  10. local gui = Instance.new("ScreenGui")
  11. gui.Name = "CorpseESP_GUI"
  12. gui.ResetOnSpawn = false
  13. gui.Parent = player:WaitForChild("PlayerGui")
  14.  
  15. local frame = Instance.new("Frame", gui)
  16. frame.Size = UDim2.new(0, 200, 0, 110)
  17. frame.Position = UDim2.new(0.5, -100, 0.5, -55)
  18. frame.BackgroundColor3 = Color3.fromRGB(30,30,36)
  19. frame.BorderSizePixel = 0
  20. frame.Active = true
  21. frame.Draggable = true
  22. Instance.new("UICorner", frame).CornerRadius = UDim.new(0,10)
  23.  
  24. local title = Instance.new("TextLabel", frame)
  25. title.Size = UDim2.new(1, -32, 0, 28)
  26. title.Position = UDim2.new(0, 10, 0, 6)
  27. title.BackgroundTransparency = 1
  28. title.Text = "Corpse ESP"
  29. title.Font = Enum.Font.GothamBold
  30. title.TextSize = 14
  31. title.TextColor3 = Color3.fromRGB(240,240,240)
  32. title.TextXAlignment = Enum.TextXAlignment.Left
  33.  
  34. local closeBtn = Instance.new("TextButton", frame)
  35. closeBtn.Size = UDim2.new(0, 24, 0, 24)
  36. closeBtn.Position = UDim2.new(1, -30, 0, 6)
  37. closeBtn.Text = "✕"
  38. closeBtn.Font = Enum.Font.GothamBold
  39. closeBtn.TextSize = 14
  40. closeBtn.TextColor3 = Color3.fromRGB(255,140,140)
  41. closeBtn.BackgroundTransparency = 1
  42.  
  43. local toggleBtn = Instance.new("TextButton", frame)
  44. toggleBtn.Size = UDim2.new(0.8, 0, 0, 36)
  45. toggleBtn.Position = UDim2.new(0.1, 0, 0.55, 0)
  46. toggleBtn.BackgroundColor3 = Color3.fromRGB(46,46,56)
  47. toggleBtn.Text = "Enable ESP"
  48. toggleBtn.Font = Enum.Font.Gotham
  49. toggleBtn.TextSize = 14
  50. toggleBtn.TextColor3 = Color3.fromRGB(255,255,255)
  51. Instance.new("UICorner", toggleBtn).CornerRadius = UDim.new(0,6)
  52.  
  53. -- ESP
  54. local function getRoot(model)
  55. return model:FindFirstChild("HumanoidRootPart")
  56. or model.PrimaryPart
  57. or model:FindFirstChildWhichIsA("BasePart")
  58. end
  59.  
  60. local function createESP(model)
  61. if espObjects[model] then return end
  62. local root = getRoot(model)
  63. if not root then return end
  64.  
  65. local highlight = Instance.new("Highlight")
  66. highlight.Parent = model
  67. highlight.FillTransparency = 1
  68. highlight.OutlineTransparency = 0
  69. highlight.OutlineColor = Color3.fromRGB(200,200,255)
  70.  
  71. local bill = Instance.new("BillboardGui")
  72. bill.Parent = model
  73. bill.Adornee = root
  74. bill.Size = UDim2.new(0, 120, 0, 22)
  75. bill.StudsOffset = Vector3.new(0, 2, 0)
  76. bill.AlwaysOnTop = true
  77.  
  78. local text = Instance.new("TextLabel", bill)
  79. text.Size = UDim2.new(1,0,1,0)
  80. text.BackgroundTransparency = 1
  81. text.Font = Enum.Font.GothamBold
  82. text.TextSize = 12
  83. text.TextStrokeTransparency = 0.3
  84. text.TextColor3 = Color3.fromRGB(220,220,255)
  85. text.Text = model.Name
  86.  
  87. espObjects[model] = {highlight, bill}
  88. end
  89.  
  90. local function clearESP()
  91. for _, objs in pairs(espObjects) do
  92. for _, o in ipairs(objs) do
  93. if o then o:Destroy() end
  94. end
  95. end
  96. espObjects = {}
  97. end
  98.  
  99. local function updateESP()
  100. for _, corpse in ipairs(corpsesFolder:GetChildren()) do
  101. if corpse:IsA("Model") then
  102. createESP(corpse)
  103. end
  104. end
  105. end
  106.  
  107. toggleBtn.MouseButton1Click:Connect(function()
  108. espEnabled = not espEnabled
  109. toggleBtn.Text = espEnabled and "Disable ESP" or "Enable ESP"
  110.  
  111. if espEnabled then
  112. updateConn = runService.RenderStepped:Connect(updateESP)
  113. else
  114. if updateConn then updateConn:Disconnect() end
  115. clearESP()
  116. end
  117. end)
  118.  
  119. closeBtn.MouseButton1Click:Connect(function()
  120. if updateConn then updateConn:Disconnect() end
  121. clearESP()
  122. gui:Destroy()
  123. end)
Advertisement
Add Comment
Please, Sign In to add comment