0% found this document useful (0 votes)
30 views35 pages

2D ESP Script Configuration Guide

The document contains a Lua script for an ESP (Extra Sensory Perception) settings configuration in a game, defining various visual elements such as boxes, tracers, names, and health bars for players and NPCs. It includes settings for visibility, colors, transparency, and outlines, as well as functionalities for mouse visibility and highlights. Additionally, it checks for compatibility with different game IDs and includes functions to retrieve player information such as health and team status.
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)
30 views35 pages

2D ESP Script Configuration Guide

The document contains a Lua script for an ESP (Extra Sensory Perception) settings configuration in a game, defining various visual elements such as boxes, tracers, names, and health bars for players and NPCs. It includes settings for visibility, colors, transparency, and outlines, as well as functionalities for mouse visibility and highlights. Additionally, it checks for compatibility with different game IDs and includes functions to retrieve player information such as health and team status.
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

local VERSION = "v1.7.

2"

if not EspSettings then


getgenv().EspSettings = {
TeamCheck = false,
ToggleKey = "RightAlt",
RefreshRate = 10, -- how fast the esp updates (milliseconds)
MaximumDistance = 500, -- only renders players within this distance
FaceCamera = false, -- Makes esp appear 2D
AlignPoints = false, -- Improves 2D effect; only works while FaceCamera
is enabled
-- AlignPoints: This may cause esp to have abnormal behavior when
looking from certain angles
MouseVisibility = {
Enabled = true, -- makes any drawing objects transparent when
they are near your mouse
Radius = 60,
Transparency = 0.3,
Method = "Hover", -- "Radius" or "Hover" | Hover is newest method
and is a lot more accurate than Radius
HoverRadius = 50,
Selected = { -- set any of these to false to ignore them
Boxes = true,
Tracers = true,
Names = true,
Skeletons = true,
HealthBars = true,
HeadDots = true,
LookTracers = true
}
},
Highlights = {
Enabled = false,
Players = {}, -- put player usernames into this table to
'highlight' them
Transparency = 1,
Color = [Link](255, 150, 0),
AlwaysOnTop = true
},
NPC = {
Color = [Link](150,150,150),
Transparency = 1,
RainbowColor = false,
Overrides = {
Boxes = true,
Tracers = true,
Names = true,
Skeletons = true,
HealthBars = true,
HeadDots = true,
LookTracers = true
}
},
Boxes = {
Enabled = false,
Transparency = 1,
Color = [Link](255,255,255),
UseTeamColor = true,
RainbowColor = false,
Outline = true,
OutlineColor = [Link](0,0,0),
OutlineThickness = 1,
Thickness = 1
},
Tracers = {
Enabled = false,
Transparency = 1,
Color = [Link](255,255,255),
UseTeamColor = true,
RainbowColor = false,
Outline = true,
OutlineColor = [Link](0,0,0),
OutlineThickness = 1,
Origin = "Top", -- "Top" or "Center" or "Bottom" or "Mouse"
Thickness = 1
},
Names = {
Enabled = false,
Transparency = 1,
Color = [Link](255,255,255),
UseTeamColor = true,
RainbowColor = false,
Outline = true,
OutlineColor = [Link](0,0,0),
Font = [Link], -- UI or System or Plex or Monospace
Size = 18,
ShowDistance = false,
ShowHealth = true,
UseDisplayName = false,
DistanceDataType = "m", -- what it says after the distance (ex.
100m)
HealthDataType = "Percentage" -- "Percentage" or "Value"
},
Skeletons = {
Enabled = false,
Transparency = 1,
Color = [Link](255,255,255),
UseTeamColor = true,
RainbowColor = false,
Outline = true,
OutlineColor = [Link](0,0,0),
OutlineThickness = 1,
Thickness = 1
},
HealthBars = {
Enabled = false,
Transparency = 1,
Color = [Link](0,255,0),
UseTeamColor = true,
RainbowColor = false,
Outline = true,
OutlineColor = [Link](0,0,0),
OutlineThickness = 1,
Origin = "None", -- "None" or "Left" or "Right"
OutlineBarOnly = true
},
HeadDots = {
Enabled = false,
Transparency = 1,
Color = [Link](255,255,255),
UseTeamColor = true,
RainbowColor = false,
Outline = true,
OutlineColor = [Link](0,0,0),
OutlineThickness = 1,
Thickness = 1,
Filled = false,
Scale = 1
},
LookTracers = {
Enabled = false,
Transparency = 1,
Color = [Link](255,255,255),
UseTeamColor = true,
RainbowColor = false,
Outline = true,
OutlineColor = [Link](0,0,0),
OutlineThickness = 1,
Thickness = 1,
Length = 5
}
}
end

if [Link] == nil then


local bind = [Link]("BindableFunction")
[Link] = function()
setclipboard("[Link]
end
end
getgenv().[Link] = 0 -- to make setall work

if not Drawing then


game:GetService("Players").LocalPlayer:Kick("\nYour exploit does not have a
drawing library.")
return
end
if UESP then
UESP:Destroy()
end
local ZIndexEnabled = pcall(function()
local a = [Link]("Square")
[Link] = false
[Link](0.1, function()
a:Remove()
end)
[Link] = 1
end)

local players = game:GetService("Players")


local player = [Link]
local camera = [Link]
local uis = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local Drawingnew = [Link]
local Fonts = [Link]
local tableinsert = [Link]
local tablesort = [Link]
local tablefind = [Link]
local WorldToViewportPoint = [Link]
local CFramenew = [Link]
local Vector2new = [Link]
local fromRGB = [Link]
local fromHSV = [Link]
local mathfloor = [Link]
local mathclamp = [Link]
local mathhuge = [Link]
local mathabs = [Link]
local mathmin = [Link]
local mathmax = [Link]
local lower = [Link]
local find = [Link]
local osclock = [Link]
local next = next
local tick = tick
local typeof = typeof
local taskspawn = [Link]
local taskwait = [Link]
local profbegin = debug and [Link] or function() end
local profend = debug and [Link] or function() end
local GetMouseLocation = [Link]

local GameId = [Link]


local ss, mousevis, highlights, npcs = getgenv().EspSettings,
getgenv().[Link], getgenv().[Link],
getgenv().[Link]
local OBJECTS, VISIBLE, ID, OUTLINES = {}, true, 0, true
--[[local bodyparts = {
"Head","UpperTorso","LowerTorso","LeftUpperArm","LeftLowerArm","LeftHand","Ri
ghtUpperArm","RightLowerArm","RightHand","LeftUpperLeg","LeftLowerLeg","LeftFoot","
RightUpperLeg","RightLowerLeg","RightFoot",
"Torso","Left Arm","Right Arm","Left Leg","Right Leg",
"Chest","Hips","LeftArm","LeftForearm","RightArm","RightForearm","LeftLeg","L
eftForeleg","RightLeg","RightForeleg"
}]]
local gids = { -- game ids
['arsenal'] = 111958650,
['pf'] = 113491250,
['pft'] = 115272207, -- pf test place
['pfu'] = 1256867479, -- pf unstable branch
['bb'] = 1168263273,
['rp'] = 2162282815, -- rush point
['mm2'] = 66654135
}
local zindex = {
['Boxes'] = 2,
['Tracers'] = 3,
['Names'] = 6,
['Skeletons'] = 2,
['HealthBars'] = 4,
['HeadDots'] = 3,
['LookTracers'] = 3,
['Labels'] = 5,
['Chams'] = 0
}
local zindex_ontop = { -- zindex for always on top objects
['Boxes'] = 12,
['Tracers'] = 13,
['Names'] = 16,
['Skeletons'] = 12,
['HealthBars'] = 14,
['HeadDots'] = 13,
['LookTracers'] = 13,
['Labels'] = 15,
['Chams'] = 10
}
local Base = {
"Enabled",
"Transparency",
"Color",
"UseTeamColor",
"RainbowColor",
"Outline",
"OutlineColor"
}
local white, black = fromRGB(255,255,255), fromRGB(0,0,0)
local getEntry, ts, characters, teams, rp
if (GameId == [Link]) or (GameId == [Link]) or (GameId == [Link]) then
local require = rawget(getrenv().shared, "require")
if require == nil then

setclipboard('loadstring(game:HttpGet("[Link]
Spoorloos/scripts/main/[Link]"))()')
local a = [Link]("Message", [Link])
[Link] = "\nA script has been copied to your clipboard.\nPlease put
this script in your exploit's autoexec folder and rejoin the game.\n(this script is
required to bypass the new update.)"
return
else
local _cache = rawget([Link](require, 1), "_cache")
local ReplicationInterface = rawget(rawget(_cache,
"ReplicationInterface"), "module")
getEntry = rawget(ReplicationInterface, "getEntry")
end
elseif GameId == [Link] then
for _,v in next, getgc(true) do
if typeof(v) == "table" and rawget(v, "InitProjectile") and rawget(v,
"TS") then
ts = rawget(v, "TS")
characters = [Link]
teams = [Link]
end
end
elseif GameId == [Link] then
rp = true
-- CREDIT TO THIS DUDE FOR CRASH FIX [Link]
pid=8248169#pid8248169
--loadstring(game:HttpGet("[Link]
39021832/Rush-Point-Fix-Crash/main/[Link]"))()
end
local From = {
UpperTorso = "Head",
LowerTorso = "UpperTorso",
LeftUpperArm = "UpperTorso",
RightUpperArm = "UpperTorso",
LeftLowerArm = "LeftUpperArm",
RightLowerArm = "RightUpperArm",
LeftHand = "LeftLowerArm",
RightHand = "RightLowerArm",
LeftUpperLeg = "LowerTorso",
RightUpperLeg = "LowerTorso",
LeftLowerLeg = "LeftUpperLeg",
RightLowerLeg = "RightUpperLeg",
LeftFoot = "LeftLowerLeg",
RightFoot = "RightLowerLeg",

Torso = "Head",
['Left Arm'] = "Torso",
['Right Arm'] = "Torso",
['Left Leg'] = "Torso",
['Right Leg'] = "Torso",

Chest = "Head",
Hips = "Chest",
LeftArm = "Chest",
LeftForearm = "LeftArm",
RightArm = "Chest",
RightForearm = "RightArm",
LeftLeg = "Hips",
LeftForeleg = "LeftLeg",
RightLeg = "Hips",
RightForeleg = "RightLeg"
}
if ts then
[Link] = "LeftForearm"
[Link] = "RightForearm"
[Link] = "LeftForeleg"
[Link] = "RightForeleg"
end
local supportedparts = {
"CornerWedgePart",
"Model",
"NegateOperation",
"Part",
"TrussPart",
"UnionOperation",
"WedgePart",
"MeshPart"
}

local PlayerObjects = {}

local setidentity = setidentity or setthreadidentity or set_thread_identity or


setthreadcontext or set_thread_context or (syn and syn.set_thread_identity) or nil
function safecall(func, env, ...)
if not setidentity then
return func(...)
end

local suc, env = pcall(getsenv, env)


return [Link](function(...)
setidentity(2)
if suc then
setfenv(0, env)
setfenv(1, env)
end
return func(...)
end)(...)
end

local oldfuncs = {}

function IsAlive(plr)
if [Link] == "Model" then
return true
end

local humanoid = [Link] and [Link]:FindFirstChild("Humanoid")


or nil
if humanoid and [Link] > 0 then
return true
end
return false
end

function GetChar(plr)
if [Link] == "Model" then
return plr
end
return [Link]
end

function GetHealth(plr)
if [Link] == "Model" then
local a = [Link]
return {mathfloor([Link]), mathfloor([Link])}
end

local a = [Link] and [Link]:FindFirstChild("Humanoid") or nil


if a then
return {mathfloor([Link]), mathfloor([Link])}
end
return {100,100}
end

function GetTeam(plr)
if [Link] == "Model" then
return "NPC"
end
return [Link]
end

function GetTeamColor(plr)
if [Link] == "Model" then
return [Link]
end
return [Link]
end

function IsFFA()
local t = {}
for _,v in next, players:GetPlayers() do
local team = GetTeam(v)
if team == nil then
return true
end

team = [Link] or team


if t[team] then
return true
else
tableinsert(t, team)
end
end
return #t == 1
end

do -- compatibility
if getEntry then -- phantom forces
local cache = {}
GetChar = function(plr)
local obj = getEntry(plr)
if obj ~= nil then
local char = [Link]
if char and [Link] ~= nil then
return char
end
end
return nil
end
IsAlive = GetChar
GetHealth = function(plr)
local obj = getEntry(plr)
if obj ~= nil then
return {mathfloor([Link]), 100}
end
return nil
end
end

if ts then -- bad business


local settings =
game:GetService("ReplicatedStorage"):WaitForChild("PlayerData"):WaitForChild(player
.Name):WaitForChild("Settings")
local function getcolor(a)
local b = settings:WaitForChild([Link]("Team%sColor",
a)).Value:split(",")
for i,v in next, b do
b[i] = tonumber(v) / 100
end
return fromHSV(unpack(b))
end
local teamcolors = {
Survivors = getcolor("Survivors"),
Infected = getcolor("Infected"),
FFA = getcolor("FFA"),
Beta = getcolor("Beta"),
Omega = getcolor("Omega")
}
hookfunction(PluginManager, error) -- prevent crash
GetChar = function(plr)
return characters:GetCharacter(plr)
end
IsAlive = GetChar
GetHealth = function(plr)
local a = GetChar(plr)
local hp = a:FindFirstChild("Health")
if hp then
return {mathfloor([Link]), mathfloor([Link])}
end
return {100, 100}
end
GetTeam = function(plr)
return teams:GetPlayerTeam(plr, plr)
end
GetTeamColor = function(plr)
local team = GetTeam(plr)
return (team and teamcolors[team]) or white
end
end

if GameId == [Link] then -- arsenal


GetHealth = function(plr)
local a = [Link]
return {mathfloor([Link]), mathfloor([Link])}
end
local ffa =
game:GetService("ReplicatedStorage"):WaitForChild("wkspc"):WaitForChild("FFA")
IsFFA = function()
return [Link]
end
end

if rp then -- rush point


local mapfolder = workspace:WaitForChild("MapFolder")
local playerfolder = mapfolder:WaitForChild("Players")
local gamestats = mapfolder:WaitForChild("GameStats")
GetChar = function(plr)
return playerfolder:FindFirstChild([Link])
end
IsAlive = GetChar
GetHealth = function(plr)
local char = GetChar(plr) if not char then return {0, 100} end
local humanoid = char:FindFirstChildOfClass("Humanoid") if not
humanoid then return {0, 100} end
return {mathfloor([Link]),
mathfloor([Link])}
end
GetTeam = function(plr)
local char = GetChar(plr) if not char then return "" end
local team = char:FindFirstChild("Team") if not team then return
"" end
return [Link]
end
GetTeamColor = function(plr)
local char = GetChar(plr) if not char then return white end
local outline = char:FindFirstChild("OutlineESP") if not outline
then return white end
return [Link]
end
IsFFA = function()
return [Link] == "Deathmatch"
end
end

if GameId == gids.mm2 then


local sheriff = [Link](0, 0, 1)
local murderer = [Link](1, 0, 0)
local innocent = [Link](0, 1, 0)
GetTeam = function(plr)
local backpack = [Link]
local char = GetChar(plr)
if (backpack and backpack:FindFirstChild("Gun")) or (char and
char:FindFirstChild("Gun")) then
return "Sheriff"
elseif (backpack and backpack:FindFirstChild("Knife")) or (char
and char:FindFirstChild("Knife")) then
return "Murderer"
end
return "Innocent"
end
GetTeamColor = function(plr)
local backpack = [Link]
local char = GetChar(plr)
if (backpack and backpack:FindFirstChild("Gun")) or (char and
char:FindFirstChild("Gun")) then
return sheriff
elseif (backpack and backpack:FindFirstChild("Knife")) or (char
and char:FindFirstChild("Knife")) then
return murderer
end
return innocent
end
end
end

[Link] = IsAlive
[Link] = GetChar
[Link] = GetHealth
[Link] = GetTeam
[Link] = GetTeamColor
[Link] = IsFFA

----

function ternary(condition, truevalue, falsevalue)


if condition then
return truevalue
end
return falsevalue
end

function ApplyZIndex(obj, name, ontop)


if ZIndexEnabled then
local idx = (ontop and zindex_ontop[name]) or zindex[name]
for i,v in next, obj do
[Link] = (find(i, "Outline") and idx - 1) or idx
end
end
end
function SetProp(obj, prop, value, outline)
for i,v in next, obj do
if (OUTLINES and outline and find(i, "Outline")) or (not outline and
OUTLINES) then
v[prop] = value
end
end
end
local Object = {
Boxes = function()
return {
Outline = Drawingnew("Quad"),
Box = Drawingnew("Quad")
}
end,
Tracers = function()
return {
Outline = Drawingnew("Line"),
Tracer = Drawingnew("Line")
}
end,
Names = function()
return {
Name = Drawingnew("Text"),
Data = Drawingnew("Text")
}
end,
Skeletons = function()
return (ts and { -- bad business
ChestOutline = Drawingnew("Line"),
HipsOutline = Drawingnew("Line"),
LeftArmOutline = Drawingnew("Line"),
LeftForearmOutline = Drawingnew("Line"),
LeftHandOutline = Drawingnew("Line"),
RightArmOutline = Drawingnew("Line"),
RightForearmOutline = Drawingnew("Line"),
RightHandOutline = Drawingnew("Line"),
LeftLegOutline = Drawingnew("Line"),
LeftForelegOutline = Drawingnew("Line"),
LeftFootOutline = Drawingnew("Line"),
RightLegOutline = Drawingnew("Line"),
RightForelegOutline = Drawingnew("Line"),
RightFootOutline = Drawingnew("Line"),

Chest = Drawingnew("Line"),
Hips = Drawingnew("Line"),
LeftArm = Drawingnew("Line"),
LeftForearm = Drawingnew("Line"),
LeftHand = Drawingnew("Line"),
RightArm = Drawingnew("Line"),
RightForearm = Drawingnew("Line"),
RightHand = Drawingnew("Line"),
LeftLeg = Drawingnew("Line"),
LeftForeleg = Drawingnew("Line"),
LeftFoot = Drawingnew("Line"),
RightLeg = Drawingnew("Line"),
RightForeleg = Drawingnew("Line"),
RightFoot = Drawingnew("Line")
}) or { -- 42 objects btw
-- R15
UpperTorsoOutline = Drawingnew("Line"),
LowerTorsoOutline = Drawingnew("Line"),
LeftUpperArmOutline = Drawingnew("Line"),
LeftLowerArmOutline = Drawingnew("Line"),
LeftHandOutline = Drawingnew("Line"),
RightUpperArmOutline = Drawingnew("Line"),
RightLowerArmOutline = Drawingnew("Line"),
RightHandOutline = Drawingnew("Line"),
LeftUpperLegOutline = Drawingnew("Line"),
LeftLowerLegOutline = Drawingnew("Line"),
LeftFootOutline = Drawingnew("Line"),
RightUpperLegOutline = Drawingnew("Line"),
RightLowerLegOutline = Drawingnew("Line"),
RightFootOutline = Drawingnew("Line"),

UpperTorso = Drawingnew("Line"),
LowerTorso = Drawingnew("Line"),
LeftUpperArm = Drawingnew("Line"),
LeftLowerArm = Drawingnew("Line"),
LeftHand = Drawingnew("Line"),
RightUpperArm = Drawingnew("Line"),
RightLowerArm = Drawingnew("Line"),
RightHand = Drawingnew("Line"),
LeftUpperLeg = Drawingnew("Line"),
LeftLowerLeg = Drawingnew("Line"),
LeftFoot = Drawingnew("Line"),
RightUpperLeg = Drawingnew("Line"),
RightLowerLeg = Drawingnew("Line"),
RightFoot = Drawingnew("Line"),
-- R6
TorsoOutline = Drawingnew("Line"),
["Left ArmOutline"] = Drawingnew("Line"),
["Right ArmOutline"] = Drawingnew("Line"),
["Left LegOutline"] = Drawingnew("Line"),
["Right LegOutline"] = Drawingnew("Line"),

Torso = Drawingnew("Line"),
["Left Arm"] = Drawingnew("Line"),
["Right Arm"] = Drawingnew("Line"),
["Left Leg"] = Drawingnew("Line"),
["Right Leg"] = Drawingnew("Line")
}
end,
HealthBars = function()
return {
Outline = Drawingnew("Quad"),
Bar = Drawingnew("Quad")
}
end,
HeadDots = function()
return {
Outline = Drawingnew("Circle"),
Dot = Drawingnew("Circle")
}
end,
LookTracers = function()
return {
Outline = Drawingnew("Line"),
Tracer = Drawingnew("Line")
}
end,
Labels = function()
return {
Label = Drawingnew("Text")
}
end,
Chams = function()
return {
Top = Drawingnew("Quad"),
Bottom = Drawingnew("Quad"),
Left = Drawingnew("Quad"),
Right = Drawingnew("Quad"),
Front = Drawingnew("Quad"),
Back = Drawingnew("Quad")
}
end
}
local RemoveFunction = {
Boxes = function(self)
if [Link] then return end
[Link]:Remove()
[Link]:Remove()
[Link] = true
end,
Tracers = function(self)
if [Link] then return end
[Link]:Remove()
[Link]:Remove()
[Link] = true
end,
Names = function(self)
if [Link] then return end
[Link]:Remove()
[Link]:Remove()
[Link] = true
end,
Skeletons = function(self)
if [Link] then return end
for _,v in next, [Link] do
v:Remove()
end
[Link] = true
end,
HealthBars = function(self)
if [Link] then return end
[Link]:Remove()
[Link]:Remove()
[Link] = true
end,
HeadDots = function(self)
if [Link] then return end
[Link]:Remove()
[Link]:Remove()
[Link] = true
end,
LookTracers = function(self)
if [Link] then return end
[Link]:Remove()
[Link]:Remove()
[Link] = true
end,
Labels = function(self)
if [Link] then return end
[Link]:Remove()
[Link]:Disconnect()
[Link] = true
end,
Chams = function(self)
if [Link] then return end
[Link]:Remove()
[Link]:Remove()
[Link]:Remove()
[Link]:Remove()
[Link]:Remove()
[Link]:Remove()
[Link]:Disconnect()
[Link] = true
end
}
function NewObject(type) -- create the actual drawing objects
local obj = Object[type]()
SetProp(obj, "Visible", false)
ApplyZIndex(obj, type)
return obj
end
function NewCharacterObject(objs, type, plr) -- create data object for players and
npcs
ID += 1

local t = {
Object = objs,
Type = type,
Player = plr,
NPC = [Link] ~= "Player",
Destroyed = false,
Id = ID,
Remove = RemoveFunction[type]
}

OBJECTS[ID] = t

return t
end
local props = {
Labels = {
Text = "string",
Transparency = "number",
Color = "Color3",
RainbowColor = "boolean",
Size = "number",
Outline = "boolean",
OutlineColor = "Color3",
Font = "number",
Offset = "Vector2"
},
Chams = {
Transparency = "number",
Color = "Color3",
RainbowColor = "boolean",
Thickness = "number",
Filled = "boolean"
}
}
function PartSetPart(self, p) -- SetPart function for labels and chams
assert(typeof(p) == "Instance", ("Universal Esp: bad argument #1 to 'SetPart'
(Instance expected, got %s)"):format(typeof(p)))
assert(tablefind(supportedparts, [Link]), ("Universal Esp: bad argument
#1 to 'SetPart' (BasePart or Model expected, got %s)"):format([Link]))
[Link] = p
end
function PartSetProp(self, prop, value) -- SetProp function for labels and chams
assert(prop ~= nil, "Universal Esp: bad argument #1 to 'SetProp' (property is
nil)")
assert([Link][prop] ~= nil, "Universal Esp: bad argument #1 to
'SetProp' (invalid property)")
local expected, got = props[[Link]][prop], typeof(value)
assert(expected == got,("Universal Esp: bad argument to #2 'SetProp' (%s
expected, got %s)"):format(expected, got))
[Link][prop] = value
end
function NewPartObject(objs, type, part, options) -- create data object for parts
and models
ID += 1

local t = {
Object = objs,
Type = type,
Part = part,
Options = options,
Destroyed = false,
Id = ID,
AncestryChanged = nil,
SetPart = PartSetPart,
SetProp = PartSetProp,
Remove = RemoveFunction[type]
}
[Link] = [Link]:Connect(function(_, parent)
if parent == nil then
t:Remove()
return
end
t:SetPart(parent:FindFirstChild([Link]))
end)

OBJECTS[ID] = t

return t
end

local ss = getgenv().EspSettings
local origins = {}
local mousepos = [Link]
local ffa = IsFFA()
local myteam = GetTeam(player)
local ccf = [Link]
local camfov = [Link]
local rainbow = fromHSV(tick() % 5 / 5, 1, 1)
local teamcheck = [Link]
local maxdist = [Link]
local facecamera = [Link]
local alignpoints = [Link]
local refreshrate = [Link] / 1000

local mv_enabled = [Link]


local mv_selected = [Link]
local mv_transparency = [Link]
local mv_method = [Link] and lower([Link]) or nil
local mv_radius = [Link]
local mv_hoverradius = [Link] or 10

local hl_enabled = [Link]


local hl_players = [Link]
local hl_color = [Link]
local hl_transparency = [Link]
local hl_ontop = [Link]

local npc_overrides = [Link]


local npc_color = [Link]
local npc_transparency = [Link]
local npc_rainbow = [Link]

local Boxes = [Link]


local Tracers = [Link]
local Names = [Link]
local Skeletons = [Link]
local HealthBars = [Link]
local HeadDots = [Link]
local LookTracers = [Link]
function UpdateVariables() -- set variables once per frame so it doesnt have to do
it multiple times
ss = getgenv().EspSettings
mousepos = GetMouseLocation(uis)
local x, y = [Link].X, [Link].Y
origins = {
top = Vector2new(x / 2, 0),
center = Vector2new(x / 2, y / 2),
bottom = Vector2new(x / 2, y),
mouse = mousepos
}
ffa = IsFFA()
myteam = GetTeam(player)
ccf = [Link]
camfov = [Link]
rainbow = fromHSV(tick() % 5 / 5, 1, 1)
teamcheck = [Link]
maxdist = [Link]
facecamera = [Link]
alignpoints = [Link]
refreshrate = [Link] / 1000
mv_enabled = [Link]
mv_selected = [Link]
mv_transparency = [Link]
mv_method = [Link] and lower([Link]) or nil
mv_radius = [Link]
mv_hoverradius = [Link]
hl_enabled = [Link]
hl_players = [Link]
hl_color = [Link]
hl_transparency = [Link]
hl_ontop = [Link]
npc_overrides = [Link]
npc_color = [Link]
npc_transparency = [Link]
npc_rainbow = [Link]
ss = getgenv().EspSettings
Boxes = [Link]
Tracers = [Link]
Names = [Link]
Skeletons = [Link]
HealthBars = [Link]
HeadDots = [Link]
LookTracers = [Link]
end
UpdateVariables()
local conn2 = [Link]:Connect(UpdateVariables)
function UpdateObjects(self) -- update esp objects for players and npcs
local plr, isnpc = [Link], [Link]
local cf, size, mid, inViewport, tl, tr, bl, br
local tlx, tly, tlz, trx, try, blx, bly, brx, bry, z
local head, ltracerto
local team, teamcolor
local health, maxhealth, mag, overlapping, render
local char = plr and GetChar(plr)

local objs = [Link]


local box = [Link]
local tracer = [Link]
local name = [Link]
local skeleton = [Link]
local bar = [Link]
local dot = [Link]
local ltracer = [Link]

if VISIBLE and char then


local hp = GetHealth(plr)
health, maxhealth = hp[1], hp[2]
cf, size = char:GetBoundingBox()
team, teamcolor = GetTeam(plr), GetTeamColor(plr)
mag = (ccf - [Link]).Magnitude
render = (ffa or (not teamcheck or (not ffa and teamcheck and team ~=
myteam))) and mag <= maxdist
mid, inViewport = WorldToViewportPoint(camera, [Link])

local BOXES = [Link]


local TRACERS = [Link]
local NAMES = [Link]
local SKELETONS = [Link]
local HEALTHBARS = [Link]
local HEADDOTS = [Link]
local LOOKTRACERS = [Link]

SetProp(box, "Visible", render and inViewport and BOXES)


SetProp(tracer, "Visible", render and inViewport and TRACERS)
SetProp(name, "Visible", render and inViewport and NAMES)
SetProp(skeleton, "Visible", render and inViewport and SKELETONS)
SetProp(bar, "Visible", render and inViewport and HEALTHBARS)
SetProp(dot, "Visible", render and inViewport and HEADDOTS)
SetProp(ltracer, "Visible", render and inViewport and LOOKTRACERS)

if render and inViewport then


do
if facecamera then
cf = CFramenew([Link], ccf)
end
size /= 2
local x, y = size.X, size.Y
--mid, inViewport = WorldToViewportPoint(camera,
[Link])
tl = WorldToViewportPoint(camera, (cf * CFramenew(-x, y,
0)).Position)
tr = WorldToViewportPoint(camera, (cf * CFramenew( x, y,
0)).Position)
bl = WorldToViewportPoint(camera, (cf * CFramenew(-x, -y,
0)).Position)
br = WorldToViewportPoint(camera, (cf * CFramenew( x, -y,
0)).Position)

tlx, tly, tlz = tl.X, tl.Y, tl.Z


trx, try = tr.X, tr.Y
blx, bly = bl.X, bl.Y
brx, bry = br.X, br.Y
z = mathclamp(1000 / tlz, 8, 12)

if facecamera and alignpoints then


if tly < try then
tly += mathabs(tly - try) / 2
else
tly += mathabs(try - tly) / 2
end
try = tly

if bly < bry then


bly += mathabs(bly - bry) / 2
else
bly += mathabs(bry - bly) / 2
end
bry = bly
end

if ts and char:FindFirstChild("Body") then -- BAD BUSINESS


char = [Link]
end

if mv_enabled then
local method = mv_method
if method == "radius" or not method then
local mags = {}
tableinsert(mags, (mousepos - Vector2new(mid.X,
mid.Y)).Magnitude)
tableinsert(mags, (mousepos - Vector2new(tlx,
tly)).Magnitude)
tableinsert(mags, (mousepos - Vector2new(trx,
try)).Magnitude)
tableinsert(mags, (mousepos - Vector2new(blx,
bly)).Magnitude)
tableinsert(mags, (mousepos - Vector2new(brx,
bry)).Magnitude)

tablesort(mags, function(a,b)
return a < b
end)

overlapping = mags[1] <= mv_radius


elseif method == "hover" then
local x_min = mathmin(tlx, trx, blx, brx) -
mv_hoverradius
local x_max = mathmax(tlx, trx, blx, brx) +
mv_hoverradius

local y_min_offset = 0
local y_max_offset = 0
if [Link] then
y_min_offset = [Link] - 2
if [Link] or [Link]
then
y_max_offset += [Link] + 2
end
end
if [Link] then
y_max_offset += z
end
local y_min = mathmin(tly, try, bly, bry) -
y_min_offset - mv_hoverradius
local y_max = mathmax(tly, try, bly, bry) +
y_max_offset + mv_hoverradius

local mousex = mousepos.X


local mousey = mousepos.Y

overlapping = mousex > x_min and mousex < x_max


and mousey > y_min and mousey < y_max
end
end
end

local highlight = hl_enabled and tablefind(hl_players, [Link])

if BOXES then
local type = "Boxes"
local certified_npc = isnpc and npc_overrides[type]
local color = (highlight and hl_color) or
(certified_npc and
(npc_rainbow and rainbow or npc_color)) or
([Link] and
rainbow) or
([Link] and
teamcolor) or
[Link]
local transparency = (mv_enabled and mv_selected[type] and
overlapping and mv_transparency) or
(certified_npc and
npc_transparency) or
(highlight and
hl_transparency) or
[Link]
ApplyZIndex(box, type, highlight and hl_ontop)
SetProp(box, "Color", color)
SetProp(box, "Transparency", transparency)

local box, out = [Link], [Link]


[Link] = [Link]
[Link] = Vector2new(trx, try)
[Link] = Vector2new(tlx, tly)
[Link] = Vector2new(blx, bly)
[Link] = Vector2new(brx, bry)

if OUTLINES then
[Link] = [Link] and [Link]
if [Link] then
[Link] = [Link]
[Link] = [Link] +
([Link] * 2)
[Link] = [Link]
[Link] = [Link]
[Link] = [Link]
[Link] = [Link]
end
end
end

if TRACERS then
local type = "Tracers"
local certified_npc = isnpc and npc_overrides[type]
local color = (highlight and hl_color) or
(certified_npc and
(npc_rainbow and rainbow or npc_color)) or
([Link] and
rainbow) or
([Link] and
teamcolor) or
[Link]
local transparency = (mv_enabled and mv_selected[type] and
overlapping and mv_transparency) or
(certified_npc and
npc_transparency) or
(highlight and
hl_transparency) or
[Link]
ApplyZIndex(tracer, type, highlight and hl_ontop)
SetProp(tracer, "Color", color)
SetProp(tracer, "Transparency", transparency)

local thickness, outline, origin = [Link],


[Link], lower([Link])
local tracer, out = [Link], [Link]
[Link] = thickness
local from = origins[origin]
local to = Vector2new(tlx + (trx - tlx) / 2, tly + (try -
tly) / 2)
[Link] = from
[Link] = to
if origin == "bottom" then
to = Vector2new(blx + (brx - blx) / 2, bly + (bry -
bly) / 2)
[Link] = to
end

if OUTLINES then
[Link] = outline and [Link]
if outline then
[Link] = [Link]
[Link] = thickness +
([Link] * 2)
[Link] = from
[Link] = to
end
end
end

if NAMES then
local type = "Names"
local certified_npc = isnpc and npc_overrides[type]
local color = (highlight and hl_color) or
(certified_npc and
(npc_rainbow and rainbow or npc_color)) or
([Link] and
rainbow) or
([Link] and
teamcolor) or
[Link]
local transparency = (mv_enabled and mv_selected[type] and
overlapping and mv_transparency) or
(certified_npc and
npc_transparency) or
(highlight and
hl_transparency) or
[Link]
ApplyZIndex(name, type, highlight and hl_ontop)
SetProp(name, "Color", color)
SetProp(name, "Transparency", transparency)

SetProp(name, "Size", [Link])


SetProp(name, "Outline", [Link])
SetProp(name, "OutlineColor", [Link])
SetProp(name, "Font", [Link])
local name, data = [Link], [Link]
local h,l = (tly > try and tly) or try, (tly < try and tly)
or try

[Link] = Vector2new(tlx + (trx - tlx) / 2, (h + (l -


h) / 2) - ([Link] + 2))
[Link] = Vector2new(blx + (brx - blx) / 2, bly +
(bry - bly) / 2)
if [Link] then
[Link] = Vector2new([Link].X,
[Link].Y + z)
end

if isnpc then
[Link] = "[NPC] "
end
[Link] = ([Link] and [Link]) or
[Link]

[Link] = ""
if [Link] then
[Link] =
"[ "..mathfloor(mag)..[Link].." ]"
end
if [Link] then
local a = lower([Link])
if a == "percentage" then
[Link] = [Link].." [ "..mathfloor((health
/ maxhealth) * 100).."% ]"
elseif a == "value" then
[Link] = [Link].."
[ "..mathfloor(health).."/"..mathfloor(maxhealth).." ]"
end
end
end

if SKELETONS then
local type = "Skeletons"
local certified_npc = isnpc and npc_overrides[type]
local color = (highlight and hl_color) or
(certified_npc and
(npc_rainbow and rainbow or npc_color)) or
([Link] and
rainbow) or
([Link] and
teamcolor) or
[Link]
local transparency = (mv_enabled and mv_selected[type] and
overlapping and mv_transparency) or
(certified_npc and
npc_transparency) or
(highlight and
hl_transparency) or
[Link]
ApplyZIndex(skeleton, type, highlight and hl_ontop)
SetProp(skeleton, "Color", color)
SetProp(skeleton, "Transparency", transparency)

local thickness, othickness, outline = [Link],


[Link], [Link]
SetProp(skeleton, "Thickness", thickness)

for i2,v2 in next, skeleton do


local from = char:FindFirstChild(From[i2] or "")
local to = char:FindFirstChild(i2 or "")
local isoutline = find(i2, "Outline")
if not isoutline and from and find([Link],
"Part") and to and find([Link], "Part") then
local pos1, in1 = WorldToViewportPoint(camera,
[Link])
local pos2, in2 = WorldToViewportPoint(camera,
[Link])
[Link] = in1 and in2
if in1 and in2 then
[Link] = Vector2new(pos1.X, pos1.Y)
[Link] = Vector2new(pos2.X, pos2.Y)
end
end
end
if OUTLINES then
for i2,v2 in next, skeleton do
if find(i2, "Outline") then
local name = i2:gsub("Outline","")
local v3 = skeleton[name]
[Link] = outline and [Link]
if [Link] then
[Link] = [Link]
[Link] = thickness +
(othickness * 2)
[Link] = [Link]
[Link] = [Link]
end
end
end
end
end

if HEALTHBARS then
local type = "HealthBars"
local certified_npc = isnpc and npc_overrides[type]
local color = (highlight and hl_color) or
(certified_npc and
(npc_rainbow and rainbow or npc_color)) or
([Link] and
rainbow) or
([Link] and
teamcolor) or
[Link]
local transparency = (mv_enabled and mv_selected[type] and
overlapping and mv_transparency) or
(certified_npc and
npc_transparency) or
(highlight and
hl_transparency) or
[Link]
ApplyZIndex(bar, type, highlight and hl_ontop)
SetProp(bar, "Color", color)
SetProp(bar, "Transparency", transparency)

local outline, origin, baronly = [Link],


[Link]:lower(), [Link]
local bar, out = [Link], [Link]
health = mathclamp(health, 0, maxhealth) / maxhealth
local left, right = blx, brx
local lefty, righty = bly, bry

if origin == "left" then


left = (blx < brx and blx) or brx
right = (blx > brx and blx) or brx

lefty = (blx < brx and bly) or bry


righty = (blx > brx and bly) or bry
elseif origin == "right" then
left = (blx < brx and brx) or blx
right = (blx > brx and brx) or blx

lefty = (blx < brx and bry) or bly


righty = (blx > brx and bry) or bly
end

[Link] = Vector2new(
left + (right - left) * health,
(lefty + (righty - lefty) * health) + 5
)
[Link] = Vector2new(
left,
lefty + 5
)
[Link] = Vector2new(
left,
lefty + z
)
[Link] = Vector2new(
left + (right - left) * health,
(lefty + (righty - lefty) * health) + z
)

if OUTLINES then
[Link] = outline and [Link]
if outline then
[Link] = [Link]
[Link] = [Link] * 2
[Link] = (baronly and [Link]) or
Vector2new(brx, bry + 5)
[Link] = (baronly and [Link]) or
Vector2new(blx, bly + 5)
[Link] = (baronly and [Link]) or
Vector2new(blx, bly + z)
[Link] = (baronly and [Link]) or
Vector2new(brx, bry + z)
end
end
end

if HEADDOTS then
local type = "HeadDots"
local certified_npc = isnpc and npc_overrides[type]
local color = (highlight and hl_color) or
(certified_npc and
(npc_rainbow and rainbow or npc_color)) or
([Link] and
rainbow) or
([Link] and
teamcolor) or
[Link]
local transparency = (mv_enabled and mv_selected[type] and
overlapping and mv_transparency) or
(certified_npc and
npc_transparency) or
(highlight and
hl_transparency) or
[Link]
ApplyZIndex(dot, type, highlight and hl_ontop)
SetProp(dot, "Color", color)
SetProp(dot, "Transparency", transparency)

head = char:FindFirstChild("Head")
if head then
local headcf = [Link]
head = WorldToViewportPoint(camera, [Link])
end

if head then
local thickness, outline, filled =
[Link], [Link], [Link]
local dot, out = [Link], [Link]
[Link] = thickness
[Link] = filled

local pos = Vector2new(head.X, head.Y)


local radius = z / ((mag / 60) * (camfov / 70)) *
[Link]
[Link] = pos
[Link] = radius

if OUTLINES then
[Link] = outline and [Link]
if outline then
local othickness = thickness +
([Link] * 2)
[Link] = [Link]
[Link] = (filled and thickness +
(othickness - 1)) or othickness
[Link] = pos
[Link] = (filled and radius + 1) or
radius
end
end
else
SetProp(dot, "Visible", false)
end
end

if LOOKTRACERS then
local type = "LookTracers"
local certified_npc = isnpc and npc_overrides[type]
local color = (highlight and hl_color) or
(certified_npc and
(npc_rainbow and rainbow or npc_color)) or
([Link]
and rainbow) or
([Link]
and teamcolor) or
[Link]
local transparency = (mv_enabled and mv_selected[type] and
overlapping and mv_transparency) or
(certified_npc and
npc_transparency) or
(highlight and
hl_transparency) or
[Link]
ApplyZIndex(ltracer, type, highlight and hl_ontop)
SetProp(ltracer, "Color", color)
SetProp(ltracer, "Transparency", transparency)

head = char:FindFirstChild("Head")
if head then
local headcf = [Link]
head = WorldToViewportPoint(camera, [Link])
ltracerto = WorldToViewportPoint(camera, (headcf *
CFramenew(0, 0, -[Link])).Position)
end

if head then
local thickness, outline = [Link],
[Link]
local tracer, out = [Link], [Link]
[Link] = thickness

local from = Vector2new(head.X, head.Y)


local to = Vector2new(ltracerto.X, ltracerto.Y)
[Link] = from
[Link] = to

if OUTLINES then
[Link] = outline and [Link]
if outline then
[Link] = [Link]
[Link] = thickness +
([Link] * 2)
[Link] = from
[Link] = to
end
end
else
SetProp(ltracer, "Visible", false)
end
end
end
else
SetProp(box, "Visible", false)
SetProp(tracer, "Visible", false)
SetProp(name, "Visible", false)
SetProp(skeleton, "Visible", false)
SetProp(bar, "Visible", false)
SetProp(dot, "Visible", false)
SetProp(ltracer, "Visible", false)
end
end
function UpdatePartObjects(self) -- update esp objects for parts and models
local part = [Link]
local type = [Link]
local obj = [Link]
local s = [Link]
local cf, size, inViewport
local c0, c1, c2, c3, c4, c5, c6, c7, c8

if VISIBLE then
local class = [Link]
if find(class, "Part") or find(class, "Operation") then
cf, size = [Link], [Link] / 2
elseif class == "Model" then
cf, size = part:GetBoundingBox()
size /= 2
end
local x, y, z = size.X, size.Y, size.Z
c0, inViewport = WorldToViewportPoint(camera,[Link])
if type == "Chams" and inViewport then
c1 = WorldToViewportPoint(camera, (cf * CFramenew( x, y,
z)).Position)
c2 = WorldToViewportPoint(camera, (cf * CFramenew(-x, y,
z)).Position)
c3 = WorldToViewportPoint(camera, (cf * CFramenew(-x, -y,
z)).Position)
c4 = WorldToViewportPoint(camera, (cf * CFramenew( x, -y,
z)).Position)
c5 = WorldToViewportPoint(camera, (cf * CFramenew( x, y, -
z)).Position)
c6 = WorldToViewportPoint(camera, (cf * CFramenew(-x, y, -
z)).Position)
c7 = WorldToViewportPoint(camera, (cf * CFramenew(-x, -y, -
z)).Position)
c8 = WorldToViewportPoint(camera, (cf * CFramenew( x, -y, -
z)).Position)

c1 = Vector2new(c1.X, c1.Y)
c2 = Vector2new(c2.X, c2.Y)
c3 = Vector2new(c3.X, c3.Y)
c4 = Vector2new(c4.X, c4.Y)
c5 = Vector2new(c5.X, c5.Y)
c6 = Vector2new(c6.X, c6.Y)
c7 = Vector2new(c7.X, c7.Y)
c8 = Vector2new(c8.X, c8.Y)
end

SetProp(obj, "Visible", inViewport)

if inViewport then
local color = ([Link] and rainbow) or [Link]
SetProp(obj, "Transparency", [Link])
SetProp(obj, "Color", color)
if type == "Labels" then
local label = [Link]
[Link] = [Link]
[Link] = [Link]
[Link] = [Link]
[Link] = [Link]
[Link] = [Link]

[Link] = Vector2new(c0.X, c0.Y - ([Link]) / 2) +


[Link]
elseif type == "Chams" then
local t, b, l, r, f, bb = [Link], [Link], [Link],
[Link], [Link], [Link]
SetProp(obj, "Filled", [Link])
SetProp(obj, "Thickness", [Link])

[Link] = c5
[Link] = c6
[Link] = c2
[Link] = c1

[Link] = c4
[Link] = c3
[Link] = c7
[Link] = c8

[Link] = c2
[Link] = c6
[Link] = c7
[Link] = c3

[Link] = c5
[Link] = c1
[Link] = c4
[Link] = c8

[Link] = c1
[Link] = c2
[Link] = c3
[Link] = c4

[Link] = c5
[Link] = c6
[Link] = c7
[Link] = c8
end
end
else
SetProp(obj, "Visible", false)
end
end
function UpdateParallel(self) -- begin the loop that calls the update function
taskspawn(function()
while true do
local clock = osclock()
if refreshrate > 0 and (clock - [Link]) < refreshrate
then
taskwait()
continue
end
[Link] = clock

if [Link] then
break
end
self:Update()
taskwait()
end
end)
end
function NewDrawing(type, target, options) -- create esp objects and data objects
local drawobjs = NewObject(type)
local obj = (options ~= nil and NewPartObject(drawobjs, type, target,
options)) or NewCharacterObject(drawobjs, type, target)
return drawobjs, obj
end
function NewPlayer(plr)
local Box, BoxObj = NewDrawing("Boxes", plr)
SetProp(Box, "Filled", false)

local Tracer, TracerObj = NewDrawing("Tracers", plr)

local Name, NameObj = NewDrawing("Names", plr)


SetProp(Name, "Center", true)

local Skeleton, SkeletonObj = NewDrawing("Skeletons", plr)

local HealthBar, HealthBarObj = NewDrawing("HealthBars", plr)


SetProp(HealthBar, "Thickness", 1)
[Link] = true
[Link] = false

local HeadDot, HeadDotObj = NewDrawing("HeadDots", plr)

local LookTracer, LookTracerObj = NewDrawing("LookTracers", plr)

local t = {}
[Link] = false
[Link] = plr
[Link] = [Link] ~= "Player"
[Link] = {
Box = BoxObj,
Tracer = TracerObj,
Name = NameObj,
Skeleton = SkeletonObj,
HealthBar = HealthBarObj,
HeadDot = HeadDotObj,
LookTracer = LookTracerObj
}
[Link] = UpdateObjects
[Link] = osclock()
[Link] = function(self)
if [Link] then return end
[Link] = true
for _,v in next, [Link] do
v:Remove()
end
end

PlayerObjects[plr] = t

UpdateParallel(t)
end

function NewLabel(part, options)


local o = {
Text = [Link] or [Link],
Transparency = [Link] or 1,
Color = [Link] or white,
RainbowColor = ternary([Link] ~= nil,
[Link], false),
Size = [Link] or 18,
Outline = ternary([Link] ~= nil, [Link], true),
OutlineColor = [Link] or black,
Font = [Link] or [Link],
Offset = [Link] or Vector2new()
}

local Label, LabelObj = NewDrawing("Labels", part, o)


[Link] = false
[Link] = true

local t = {}
[Link] = false
[Link] = part
[Link] = o
[Link] = [Link]
[Link] = "Labels"
[Link] = UpdatePartObjects
[Link] = osclock()
[Link] = function(self)
if [Link] then return end
[Link] = true
for _,v in next, [Link] do
v:Remove()
end
end

PlayerObjects[part] = t
UpdateParallel(t)

return LabelObj
end
function NewCham(part, options)
local o = {
Transparency = [Link] or 1,
Color = [Link] or white,
RainbowColor = ternary([Link] ~= nil,
[Link], false),
Thickness = [Link] or 3,
Filled = ternary([Link] ~= nil, [Link], true)
}

local Cham, ChamObj = NewDrawing("Chams", part, o)

local t = {}
[Link] = false
[Link] = part
[Link] = o
[Link] = "Chams"
[Link] = [Link]
[Link] = UpdatePartObjects
[Link] = osclock()
[Link] = function(self)
if [Link] then return end
[Link] = true
for _,v in next, [Link] do
v:Remove()
end
end

PlayerObjects[part] = t
UpdateParallel(t)

return ChamObj
end

if typeof([Link]) == "EnumItem" then


[Link] = [Link]
end
local conn3 = [Link]:Connect(function(i,gp)
if not gp and [Link] == [Link][[Link]] then
VISIBLE = not VISIBLE
end
end)
for _,v in next, players:GetPlayers() do
if v ~= player then
NewPlayer(v)
end
end
local conn4 = [Link]:Connect(NewPlayer)

local esp = {Version = VERSION}


local destroyed = false

function ValidType(type)
return type == "Other" or ss[type] ~= nil
end
function ValidOption(type,option)
return (type == "Other" and ss[option] ~= nil) or ss[type][option] ~= nil
end
function esp:Toggle(type)
assert(ValidType(type),"Universal Esp: bad argument to #1 'Toggle' (Invalid
Type)")
if ss[type].Enabled == nil then
ss[type] = not ss[type]
else
ss[type].Enabled = not ss[type].Enabled
end
end
function esp:Get(type,option)
assert(ValidType(type),"Universal Esp: bad argument to #1 'Get' (Invalid
Type)")
assert(ValidOption(type, option),"Universal Esp: bad argument to #2 'Get'
(Invalid Option)")
if type == "Other" then
return ss[option]
end
return ss[type][option]
end
function esp:Set(type,option,value)
assert(ValidType(type),"Universal Esp: bad argument to #1 'Set' (Invalid
Type)")
assert(ValidOption(type, option),"Universal Esp: bad argument to #2 'Set'
(Invalid Option)")
assert(value ~= nil,"Universal Esp: bad argument to #3 'Set'")
if type == "Other" then
ss[option] = value
else
ss[type][option] = value
end
end
function esp:SetAll(option,value)
assert(Base[option] == nil,"Universal Esp: bad argument to #1 'SetAll'
(Invalid Option)")
assert(value ~= nil,"Universal Esp: bad argument to #2 'SetAll'")
for i,v in next, ss do
if typeof(v) == "table" and zindex[i] ~= nil then
v[option] = value
end
end
end
function [Link](part,options)
assert(typeof(part) == "Instance", ("Universal Esp: bad argument to #1
'Label' (Instance expected, got %s)"):format(typeof(part)))
assert([Link](supportedparts, [Link]),("Universal Esp: bad
argument to #1 'Label' (Part or Model expected, got %s)"):format([Link]))
return NewLabel(part, options or {})
end
function [Link](part,options)
assert(typeof(part) == "Instance",("Universal Esp: bad argument to #1 'Cham'
(Instance expected, got %s)"):format(typeof(part)))
assert([Link](supportedparts, [Link]),("Universal Esp: bad
argument to #1 'Cham' (Part or Model expected, got %s)"):format([Link]))
return NewCham(part, options or {})
end
function esp:GetObjects(a)
a = a or ""
local t = typeof(a)
if (t == "Instance" and [Link] == "Player") or (t == "string" and
players:FindFirstChild(a)) then
local plr = (t == "string" and players[a]) or a
local objects = {
['Boxes'] = nil,
['Tracers'] = nil,
['Names'] = nil,
['Skeletons'] = nil,
['HealthBars'] = nil,
['HeadDots'] = nil,
['LookTracers'] = nil
}
for _,v in next, OBJECTS do
if [Link] == plr then
objects[[Link]] = v
end
end
return objects
elseif typeof(a) == "string" then
if zindex[a] ~= nil then
local objects = {}
for _,v in next, OBJECTS do
if [Link] == a then
tableinsert(objects, v)
end
end
return objects
elseif a == "" then
return OBJECTS
end
end
return {}
end
function esp:GetTotalObjects()
local data = {
DrawingObjects = 0,
VisibleObjects = 0,
DestroyedObjects = 0,
NPCObjects = 0,
Boxes = 0,
Tracers = 0,
Names = 0,
Skeletons = 0,
HealthBars = 0,
HeadDots = 0,
LookTracers = 0,
Labels = 0,
Chams = 0,
Outlines = 0
}
for _,v in next, OBJECTS do
for i2,v2 in next, [Link] do
if not [Link] then
[Link] += 1
if [Link] then
[Link] += 1
end
if [Link] then
[Link] += 1
end
if find(i2, "Outline") then
[Link] += 1
else
data[[Link]] += 1
end
else
[Link] += 1
end
end
end
return data
end
function esp:GetObjectFromId(id)
return OBJECTS[id]
end
function hasesp(a)
for _,v in next, OBJECTS do
if ([Link] ~= nil or [Link]) and [Link] == a and not [Link]
then
return true
end
end
return false
end
function esp:Add(a)
a = a or ""
local t = typeof(a)
if (t == "Instance" and [Link] == "Player" or [Link] == "Model") or
(t == "string" and players:FindFirstChild(a)) then
local plr = (t == "string" and players[a]) or a
if not hasesp(plr) then
NewPlayer(plr)
end
end
end
function esp:Remove(a)
a = a or ""
local t = typeof(a)
if (t == "Instance" and [Link] == "Player" or [Link] == "Model") or
(t == "string" and players:FindFirstChild(a)) then
local plr = (t == "string" and players[a]) or a
if hasesp(plr) then
for _,v in next, OBJECTS do
if [Link] ~= nil and [Link] == plr then
v:Remove()
end
end
end
end
end
--[[function esp:DisableOutlines()
OUTLINES = false
for _,v in next, OBJECTS do
for i2,v2 in next, [Link] do
if i2:find("Outline") then
v2:Remove()
end
end
end
end]]
function esp:SetFunction(a,f)
assert(typeof(a) == "string",("Universal Esp: bad argument to #1
'SetFunction' (string expected, got %s)"):format(typeof(a)))
assert(typeof(f) == "function",("Universal Esp: bad argument to #2
'SetFunction' (function expected, got %s)"):format(typeof(f)))
a = lower(a)
assert(oldfuncs[a] ~= nil,"Universal Esp: bad argument to #1 'SetFunction'
(invalid function)")
if a == "alive" then -- ik it looks like shit stfu
IsAlive = f
elseif a == "character" then
GetChar = f
elseif a == "health" then
GetHealth = f
elseif a == "team" then
GetTeam = f
elseif a == "teamcolor" then
GetTeamColor = f
elseif a == "ffa" then
IsFFA = f
end
end
function esp:ResetFunction(a)
assert(typeof(a) == "string",("Universal Esp: bad argument to #1
'ResetFunction' (string expected, got %s)"):format(typeof(a)))
a = lower(a)
assert(oldfuncs[a] ~= nil,"Universal Esp: bad argument to #1 'ResetFunction'
(invalid function)")
local f = oldfuncs[a]
if a == "alive" then
IsAlive = f
elseif a == "character" then
GetChar = f
elseif a == "health" then
GetHealth = f
elseif a == "team" then
GetTeam = f
elseif a == "teamcolor" then
GetTeamColor = f
elseif a == "ffa" then
IsFFA = f
end
end
function esp:Destroy()
if destroyed then return end
conn2:Disconnect()
conn3:Disconnect()
conn4:Disconnect()
for _,v in next, PlayerObjects do
v:Destroy()
end
for _,v in next, OBJECTS do
--v:Remove()
end
destroyed = true
end
getgenv().UESP = esp
return esp

You might also like