0% found this document useful (0 votes)
2K views4 pages

2D ESP Script for Lua Exploits

This document outlines a script for implementing ESP (Extra Sensory Perception), Tracers, and Chams in a game using the Drawing API, specifically for exploits like Synapse X. It includes features such as displaying player names, health, distance, and visual highlights, with controls for toggling the ESP on and off. The script also manages the creation and cleanup of visual elements based on player actions and game state.

Uploaded by

nm424294
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views4 pages

2D ESP Script for Lua Exploits

This document outlines a script for implementing ESP (Extra Sensory Perception), Tracers, and Chams in a game using the Drawing API, specifically for exploits like Synapse X. It includes features such as displaying player names, health, distance, and visual highlights, with controls for toggling the ESP on and off. The script also manages the creation and cleanup of visual elements based on player actions and game state.

Uploaded by

nm424294
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

--[[

ESP + Cham + Tracer usando Drawing API (para exploits como Synapse X)
- ESP com nome, vida, distância
- Tracer do centro inferior da tela ao player
- Chams (Highlight) via Highlight Instance
- Controle por botão na tela e tecla "X"
- Máxima eficiência visual
]]

local Players = game:GetService("Players")


local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local Camera = [Link]
local LocalPlayer = [Link]

-- CONFIGURAÇÕES
local MAX_DISTANCE = 500
local SHOW_CHAM = true
local ESP_TEXT_SIZE = 10
local TRACER_COLOR = [Link](255,255,0)
local ESP_COLOR = [Link](255,255,255)
local CHAM_FILL = [Link](20, 20, 20)
local CHAM_FILL_TRANSP = 0.1
local CHAM_OUTLINE = [Link](255,255,0)
local CHAM_OUTLINE_TRANSP = 0.1

-- Interface visual básica


local screenGui = [Link]("ScreenGui")
[Link] = "ESPControlUI"
[Link] = false
[Link] = LocalPlayer:WaitForChild("PlayerGui")
local toggleButton = [Link]("TextButton")
[Link] = [Link](0, 80, 0, 32)
[Link] = [Link](0, 20, 0, 120)
[Link] = "ESP ON"
toggleButton.BackgroundColor3 = [Link](30,30,30)
toggleButton.TextColor3 = [Link](255,255,255)
[Link] = [Link]
[Link] = 18
[Link] = screenGui
[Link] = true

local enabled = true


local function updateToggle()
[Link] = enabled and "ESP ON" or "ESP OFF"
toggleButton.BackgroundColor3 = enabled and [Link](30,30,30) or
[Link](80,30,30)
end
toggleButton.MouseButton1Click:Connect(function()
enabled = not enabled
updateToggle()
end)
[Link]:Connect(function(input,gp)
if gp then return end
if [Link] == [Link].X then
enabled = not enabled
updateToggle()
end
end)
updateToggle()

-- Utilidades para Drawing API


local function destroyDrawing(draw)
if draw and typeof(draw) == "table" then
for _,v in pairs(draw) do if typeof(v) == "Instance" then v:Remove() end
end
elseif draw then
pcall(function() draw:Remove() end)
end
end

-- Cham (Highlight)
local function applyCham(character)
if not SHOW_CHAM then return end
if character:FindFirstChild("Cham") then return end
local highlight = [Link]("Highlight")
[Link] = "Cham"
[Link] = CHAM_FILL
[Link] = CHAM_FILL_TRANSP
[Link] = CHAM_OUTLINE
[Link] = CHAM_OUTLINE_TRANSP
[Link] = [Link]
[Link] = character
[Link] = character
end
local function removeCham(character)
local highlight = character and character:FindFirstChild("Cham")
if highlight then highlight:Destroy() end
end

-- ESP principal usando Drawing API


local function CreateESP(player)
local drawings = {}
local running = true
local function cleanup()
running = false
for _,d in pairs(drawings) do destroyDrawing(d) end
drawings = {}
if [Link] then removeCham([Link]) end
end

local function step()


if not running then return end
local char = [Link]
local head = char and char:FindFirstChild("Head")
local hrp = char and char:FindFirstChild("HumanoidRootPart")
local hum = char and char:FindFirstChild("Humanoid")
if not (char and head and hrp and hum and [Link] > 0 and enabled) then
for _,d in pairs(drawings) do [Link] = false end
if char then removeCham(char) end
return
end
local dist = ([Link] - [Link]).Magnitude
if dist > MAX_DISTANCE then
for _,d in pairs(drawings) do [Link] = false end
removeCham(char)
return
end
-- ESP
local headPos, onScreen = Camera:WorldToViewportPoint([Link])
local hrpPos, onScreen2 = Camera:WorldToViewportPoint([Link])
if not (onScreen and onScreen2) then
for _,d in pairs(drawings) do [Link] = false end
removeCham(char)
return
end
-- Text ESP
if not [Link] then
[Link] = [Link]("Text")
[Link] = ESP_TEXT_SIZE
[Link] = true
[Link] = true
[Link] = ESP_COLOR
[Link] = true
end
[Link] = ("%s | %dm | %dHP"):format([Link],
[Link](dist), [Link]([Link]))
[Link] = [Link](headPos.X, headPos.Y - 24)
[Link] = true
-- Tracer ESP
if not [Link] then
[Link] = [Link]("Line")
[Link] = 2
[Link] = TRACER_COLOR
[Link] = true
end
local view = [Link]
[Link] = [Link](view.X/2, view.Y)
[Link] = [Link](hrpPos.X, hrpPos.Y)
[Link] = true

-- Cham
if SHOW_CHAM then applyCham(char) end
end

-- Loop de atualização
local conn
conn = [Link]:Connect(step)
-- Limpeza ao morrer/sair
local function disconnectAll()
if conn then conn:Disconnect() end
cleanup()
end
[Link]:Connect(function() disconnectAll() end)
[Link]:Connect(function(_,par) if not par then disconnectAll()
end end)
end

for _, player in ipairs(Players:GetPlayers()) do


if player ~= LocalPlayer then
CreateESP(player)
end
end
[Link]:Connect(function(player)
if player ~= LocalPlayer then
[Link]:Connect(function()
wait(0.5)
CreateESP(player)
end)
end
end)

-- Cleanup geral ao desligar ESP


[Link]:Connect(function()
if not enabled then
for _,player in ipairs(Players:GetPlayers()) do
if player ~= LocalPlayer and [Link] then
removeCham([Link])
end
end
end
end)

You might also like