0% found this document useful (0 votes)
13 views

ESP DrawingAPI Version2.Lua

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)
13 views

ESP DrawingAPI Version2.Lua

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
You are on page 1/ 4

--[[

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 = workspace.CurrentCamera
local LocalPlayer = Players.LocalPlayer

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

-- Interface visual básica


local screenGui = Instance.new("ScreenGui")
screenGui.Name = "ESPControlUI"
screenGui.ResetOnSpawn = false
screenGui.Parent = LocalPlayer:WaitForChild("PlayerGui")
local toggleButton = Instance.new("TextButton")
toggleButton.Size = UDim2.new(0, 80, 0, 32)
toggleButton.Position = UDim2.new(0, 20, 0, 120)
toggleButton.Text = "ESP ON"
toggleButton.BackgroundColor3 = Color3.fromRGB(30,30,30)
toggleButton.TextColor3 = Color3.fromRGB(255,255,255)
toggleButton.Font = Enum.Font.SourceSansBold
toggleButton.TextSize = 18
toggleButton.Parent = screenGui
toggleButton.Draggable = true

local enabled = true


local function updateToggle()
toggleButton.Text = enabled and "ESP ON" or "ESP OFF"
toggleButton.BackgroundColor3 = enabled and Color3.fromRGB(30,30,30) or
Color3.fromRGB(80,30,30)
end
toggleButton.MouseButton1Click:Connect(function()
enabled = not enabled
updateToggle()
end)
UserInputService.InputBegan:Connect(function(input,gp)
if gp then return end
if input.KeyCode == Enum.KeyCode.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 = Instance.new("Highlight")
highlight.Name = "Cham"
highlight.FillColor = CHAM_FILL
highlight.FillTransparency = CHAM_FILL_TRANSP
highlight.OutlineColor = CHAM_OUTLINE
highlight.OutlineTransparency = CHAM_OUTLINE_TRANSP
highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
highlight.Adornee = character
highlight.Parent = 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 player.Character then removeCham(player.Character) end
end

local function step()


if not running then return end
local char = player.Character
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 hum.Health > 0 and enabled) then
for _,d in pairs(drawings) do d.Visible = false end
if char then removeCham(char) end
return
end
local dist = (hrp.Position - Camera.CFrame.Position).Magnitude
if dist > MAX_DISTANCE then
for _,d in pairs(drawings) do d.Visible = false end
removeCham(char)
return
end
-- ESP
local headPos, onScreen = Camera:WorldToViewportPoint(head.Position)
local hrpPos, onScreen2 = Camera:WorldToViewportPoint(hrp.Position)
if not (onScreen and onScreen2) then
for _,d in pairs(drawings) do d.Visible = false end
removeCham(char)
return
end
-- Text ESP
if not drawings.text then
drawings.text = Drawing.new("Text")
drawings.text.Size = ESP_TEXT_SIZE
drawings.text.Center = true
drawings.text.Outline = true
drawings.text.Color = ESP_COLOR
drawings.text.Visible = true
end
drawings.text.Text = ("%s | %dm | %dHP"):format(player.Name,
math.floor(dist), math.floor(hum.Health))
drawings.text.Position = Vector2.new(headPos.X, headPos.Y - 24)
drawings.text.Visible = true
-- Tracer ESP
if not drawings.tracer then
drawings.tracer = Drawing.new("Line")
drawings.tracer.Thickness = 2
drawings.tracer.Color = TRACER_COLOR
drawings.tracer.Visible = true
end
local view = Camera.ViewportSize
drawings.tracer.From = Vector2.new(view.X/2, view.Y)
drawings.tracer.To = Vector2.new(hrpPos.X, hrpPos.Y)
drawings.tracer.Visible = true

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

-- Loop de atualização
local conn
conn = RunService.RenderStepped:Connect(step)
-- Limpeza ao morrer/sair
local function disconnectAll()
if conn then conn:Disconnect() end
cleanup()
end
player.CharacterRemoving:Connect(function() disconnectAll() end)
player.AncestryChanged: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
Players.PlayerAdded:Connect(function(player)
if player ~= LocalPlayer then
player.CharacterAdded:Connect(function()
wait(0.5)
CreateESP(player)
end)
end
end)

-- Cleanup geral ao desligar ESP


RunService.RenderStepped:Connect(function()
if not enabled then
for _,player in ipairs(Players:GetPlayers()) do
if player ~= LocalPlayer and player.Character then
removeCham(player.Character)
end
end
end
end)

You might also like