2D ESP Script Configuration Guide
2D ESP Script Configuration Guide
2"
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 oldfuncs = {}
function IsAlive(plr)
if [Link] == "Model" then
return true
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
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
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
[Link] = IsAlive
[Link] = GetChar
[Link] = GetHealth
[Link] = GetTeam
[Link] = GetTeamColor
[Link] = IsFFA
----
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
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)
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
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)
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)
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)
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)
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)
[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
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
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
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] = 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 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
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 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
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