Run it
Copy the script and paste it into your executor.
Players = :()
RunService = :()
lp = Players.LocalPlayer
character =
lp.Character
character = lp.Character
lp.CharacterAdded:((char)
character = char
)
Camera = .Workspace.CurrentCamera
settings = {}
settings.box = {}
settings.box.transparency =
settings.box.color = .(,,)
settings.box.thickness =
settings.boxoutline = {}
settings.boxoutline.transparency =
settings.boxoutline.color = .(,,)
settings.boxoutline.thickness =
settings.healthbar = {}
settings.healthbar.healthcolor = .(,,)
settings.healthbar.backgroundcolor = .(,,)
settings.healthbar.borderthickness =
settings.healthbar.width =
settings.healthbar.gap =
settings.text = {}
settings.text.spacing =
settings.text.priority = {}
settings.text.priority.top = {}
settings.text.priority.top.name =
settings.text.priority.bottom = {}
settings.text.priority.bottom.distance =
settings.text.priority.bottom.weapon =
settings.name = {}
settings.name.top =
settings.name.transparency =
settings.name.color = .(,,)
settings.name.size =
settings.name.outline =
settings.name.outlinecolor = .(,,)
settings.distance = {}
settings.distance.top =
settings.distance.transparency =
settings.distance.color = .(,,)
settings.distance.size =
settings.distance.outline =
settings.distance.outlinecolor = .(,,)
settings.weapon = {}
settings.weapon.top =
settings.weapon.transparency =
settings.weapon.color = .(,,)
settings.weapon.size =
settings.weapon.outline =
settings.weapon.outlinecolor = .(,,)
toggles = {}
toggles.healthcheck =
toggles.box =
toggles.boxoutline =
toggles.name =
toggles.distance =
toggles.healthbar =
toggles.healthbarbackground =
toggles.weapon =
whitelistedweapons = {}
entities = {}
entities.box = {}
entities.boxoutline = {}
entities.healthbar = {}
entities.healthbarbackground = {}
entities.text = {}
entities.text.top = {}
entities.text.bottom = {}
valid = {}
charconnections = {}
mins = {}
maxes = {}
onscreens = {}
Math = {}
Math.calculateExtent = (cf, size)
r = cf.RightVector
u = cf.UpVector
b = cf.LookVector
hx = size.X *
hy = size.Y *
hz = size.Z *
.(
.(r.X)*hx + .(u.X)*hy + .(b.X)*hz,
.(r.Y)*hx + .(u.Y)*hy + .(b.Y)*hz,
.(r.Z)*hx + .(u.Z)*hy + .(b.Z)*hz
)
Math.minMaxFromExtent = (cf, extent)
c = cf.Position
c - extent, c + extent
Math.getboundingbox = (instances: {BasePart}, orientation: ?)
orientation
orientation = .()
j =
j +=
instances[j] ==
.(), .()
instances[j]:()
orientation = .(instances[j].Position) * orientation
inversedOrientation = orientation:()
localCF = inversedOrientation * instances[j].CFrame
extent = Math.(localCF, instances[j].Size)
min, max = Math.(localCF, extent)
i = j + , #instances
part = instances[i]
part:()
cf = inversedOrientation * part.CFrame
e = Math.(cf, part.Size)
lmin, lmax = Math.(cf, e)
min = .(
.(min.X, lmin.X),
.(min.Y, lmin.Y),
.(min.Z, lmin.Z)
)
max = .(
.(max.X, lmax.X),
.(max.Y, lmax.Y),
.(max.Z, lmax.Z)
)
centerLocal = (min + max) *
size = max - min
centerWorld = orientation * .(centerLocal)
centerWorld, size
Math.getcorners = (char)
centerWorld, size = Math.(char:())
half = size/
pos = centerWorld.Position
minV = pos - half
maxV = pos + half
minScreen, minOnscreen = Camera:(minV)
maxScreen, maxOnscreen = Camera:(maxV)
onscreen = minOnscreen maxOnscreen
min = {
x = .(minScreen.X, maxScreen.X),
y = .(minScreen.Y, maxScreen.Y)
}
max = {
x = .(minScreen.X, maxScreen.X),
y = .(minScreen.Y, maxScreen.Y)
}
min, max, onscreen
util = {}
util.watchCharacter = (plr, id)
plr == lp
charconnections[id] = plr.CharacterAdded:((char)
valid[id] = char
)
check = {}
check.valid = (plr)
( plr) ( plr.Parent)
plr == lp
char = plr.Character
char
toggles.healthcheck
hum = char:()
hum
(hum.Health > )
check.exists = (Type, id, istext)
istext
entities[Type][id]
place =
settings[Type].top ==
place =
entities.text[place][Type][id]
create = {}
create.box = (id, min, max, onscreen)
outline = .()
outline.Visible = onscreen
outline.Transparency = settings.boxoutline.transparency
outline.Color = settings.boxoutline.color
outline.Thickness = settings.box.thickness + settings.boxoutline.thickness *
box = .()
box.Visible = onscreen
box.Transparency = settings.box.transparency
box.Color = settings.box.color
box.Thickness = settings.box.thickness
onscreen
pos = .(min.x, min.y)
outline.Position = pos
box.Position = pos
length = max.x - min.x
height = max.y - min.y
outline.Size = .(length, height)
box.Size = .(length, height)
entities.box[id] = box
entities.boxoutline[id] = outline
create.name = (id, plrname, min, max, onscreen)
text = .()
text.Visible = onscreen
place =
settings.name.top
place =
text.Transparency = settings.name.transparency
text.Color = settings.name.color
text.Size = settings.name.size
text.Outline = settings.name.outline
text.OutlineColor = settings.name.outlinecolor
text.Center =
text.Text = plrname
priority = settings.text.priority[place].name
location = priority
i,v (settings.text.priority[place])
v < priority
toggles[i] ==
location -=
onscreen
offset
place ==
offset = (settings.text.spacing + settings.name.size) * (location)
offset = settings.text.spacing + (settings.text.spacing + settings.name.size) * (location-)
yPos = place == (min.y - offset) (max.y + offset)
pos = .(min.x + (max.x - min.x) / , yPos)
text.Position = pos
entities.text[place].name[id] = text
create.distance = (id, min, max, onscreen)
text = .()
text.Visible = onscreen
place =
settings.distance.top
place =
priority = settings.text.priority[place].distance
location = priority
i,v (settings.text.priority[place])
v < priority
toggles[i] ==
location -=
text.Transparency = settings.distance.transparency
text.Color = settings.distance.color
text.Size = settings.distance.size
text.Outline = settings.distance.outline
text.OutlineColor = settings.distance.outlinecolor
text.Center =
text.Text =
onscreen
offset
place ==
offset = (settings.text.spacing + settings.distance.size) * (location)
offset = settings.text.spacing + (settings.text.spacing + settings.distance.size) * (location-)
yPos = place == (min.y - offset) (max.y + offset)
pos = .(min.x + (max.x - min.x) / , yPos)
text.Position = pos
entities.text[place].distance[id] = text
create.weapon = (id, min, max, onscreen)
text = .()
text.Visible = onscreen
place =
settings.weapon.top
place =
priority = settings.text.priority[place].weapon
location = priority
i,v (settings.text.priority[place])
v < priority
toggles[i] ==
location -=
text.Transparency = settings.weapon.transparency
text.Color = settings.weapon.color
text.Size = settings.weapon.size
text.Outline = settings.weapon.outline
text.OutlineColor = settings.weapon.outlinecolor
text.Center =
text.Text =
onscreen
offset
place ==
offset = (settings.text.spacing + settings.weapon.size) * (location)
offset = settings.text.spacing + (settings.text.spacing + settings.weapon.size) * (location-)
yPos = place == (min.y - offset) (max.y + offset)
pos = .(min.x + (max.x - min.x) / , yPos)
text.Position = pos
entities.text[place].weapon[id] = text
create.healthbar = (id, min, max, onscreen)
left = min.x - settings.healthbar.gap - settings.healthbar.width - settings.healthbar.borderthickness
height = max.y - min.y
background = .()
background.Visible = onscreen toggles.healthbarbackground toggles.healthbar
background.Transparency =
background.Color = settings.healthbar.backgroundcolor
background.Filled =
bar = .()
bar.Visible = onscreen toggles.healthbar
bar.Transparency =
bar.Color = settings.healthbar.healthcolor
bar.Filled =
onscreen toggles.healthbar
toggles.healthbarbackground
size = .(settings.healthbar.width + settings.healthbar.borderthickness * , height + settings.healthbar.borderthickness * )
pos = .(left - settings.healthbar.borderthickness, min.y - settings.healthbar.borderthickness)
background.Position = pos
background.Size = size
hum = valid[id]:()
health
hum
health = hum.Health
health =
healthchange = height * ( - health/)
size = .(settings.healthbar.width, height - healthchange)
pos = .(left, min.y + healthchange)
bar.Size = size
bar.Position = pos
entities.healthbar[id] = bar
entities.healthbarbackground[id] = background
update = {}
update.box = (id, min, max, onscreen)
box = entities.box[id]
outline = entities.boxoutline[id]
box.Visible = onscreen toggles.box
outline.Visible = onscreen toggles.boxoutline
onscreen toggles.box
box.Transparency = settings.box.transparency
box.Color = settings.box.color
box.Thickness = settings.box.thickness
pos = .(min.x, min.y)
box.Position = pos
length = max.x - min.x
height = max.y - min.y
size = .(length, height)
box.Size = size
toggles.boxoutline
outline.Transparency = settings.boxoutline.transparency
outline.Color = settings.boxoutline.color
outline.Thickness = settings.box.thickness + settings.boxoutline.thickness *
outline.Position = pos
outline.Size = size
update.name = (id, min, max, onscreen)
place =
settings.name.top
place =
text = entities.text[place].name[id]
text.Visible = onscreen toggles.name
priority = settings.text.priority[place].name
location = priority
i,v (settings.text.priority[place])
v < priority
toggles[i] ==
location -=
onscreen toggles.name
priority = settings.text.priority[place].name
location = priority
i,v (settings.text.priority[place])
v < priority
toggles[i] ==
location -=
offset
place ==
offset = (settings.text.spacing + settings.name.size) * (location)
offset = settings.text.spacing + (settings.text.spacing + settings.name.size) * (location-)
text.Transparency = settings.name.transparency
text.Color = settings.name.color
text.Size = settings.name.size
text.Outline = settings.name.outline
text.OutlineColor = settings.name.outlinecolor
yPos = place == (min.y - offset) (max.y + offset)
pos = .(min.x + (max.x - min.x) / , yPos)
text.Position = pos
update.distance = (id, min, max, onscreen)
place =
settings.distance.top
place =
text = entities.text[place].distance[id]
text.Visible = onscreen toggles.distance
onscreen toggles.distance
priority = settings.text.priority[place].distance
location = priority
i,v (settings.text.priority[place])
v < priority
toggles[i] ==
location -=
char = valid[id]
distance = (character:().Position - char:().Position).Magnitude
distance = .(distance)
text.Text = ..(distance)..
offset
place ==
offset = (settings.text.spacing + settings.distance.size) * (location)
offset = settings.text.spacing + (settings.text.spacing + settings.distance.size) * (location-)
text.Transparency = settings.distance.transparency
text.Color = settings.distance.color
text.Size = settings.distance.size
text.Outline = settings.distance.outline
text.OutlineColor = settings.distance.outlinecolor
yPos = place == (min.y - offset) (min.y + (max.y - min.y) + offset)
pos = .(min.x + (max.x - min.x) / , yPos)
text.Position = pos
update.weapon = (id, min, max, onscreen)
place =
settings.weapon.top
place =
text = entities.text[place].weapon[id]
text.Visible = onscreen toggles.weapon
onscreen toggles.weapon
priority = settings.text.priority[place].weapon
location = priority
i,v (settings.text.priority[place])
v < priority
toggles[i] ==
location -=
char = valid[id]
children = char:()
weapon =
_,child (children)
child:() (.(whitelistedweapons, child.Name) ~= )
weapon = child.Name
text.Text = ..weapon..
offset
place ==
offset = (settings.text.spacing + settings.weapon.size) * (location)
offset = settings.text.spacing + (settings.text.spacing + settings.weapon.size) * (location-)
text.Transparency = settings.weapon.transparency
text.Color = settings.weapon.color
text.Size = settings.weapon.size
text.Outline = settings.weapon.outline
text.OutlineColor = settings.weapon.outlinecolor
yPos = place == (min.y - offset) (max.y + offset)
pos = .(min.x + (max.x - min.x) / , yPos)
text.Position = pos
update.healthbar = (id, min, max, onscreen)
background = entities.healthbarbackground[id]
bar = entities.healthbar[id]
background.Visible = onscreen toggles.healthbarbackground toggles.healthbar
bar.Visible = onscreen toggles.healthbar
onscreen toggles.healthbar
left = min.x - settings.healthbar.gap - settings.healthbar.width - settings.healthbar.borderthickness
height = max.y - min.y
toggles.healthbarbackground
background.Transparency =
background.Color = settings.healthbar.backgroundcolor
size = .(settings.healthbar.width + settings.healthbar.borderthickness * , height + settings.healthbar.borderthickness * )
pos = .(left - settings.healthbar.borderthickness, min.y - settings.healthbar.borderthickness)
background.Position = pos
background.Size = size
bar.Transparency =
bar.Color = settings.healthbar.healthcolor
hum = valid[id]:()
health
hum
health = hum.Health
health =
healthchange = height * ( - health/)
size = .(settings.healthbar.width, height - healthchange)
pos = .(left, min.y + healthchange)
bar.Size = size
bar.Position = pos
remove = (Type, id)
isText
settings[Type]
isText = settings[Type].top
isText =
place =
isText ==
place =
isText ~=
entities.text[place][Type][id]
entities.text[place][Type][id]:()
index = .(entities.text[place][Type], id)
index
.(entities.text[place][Type], index)
isText ==
entities[Type][id]
entities[Type][id]:()
index = .(entities[Type], id)
index
.(entities[Type], index)
handler = {}
handler.box = (id, char)
toggles.box ~=
min = mins[id]
max = maxes[id]
onscreen = onscreens[id]
check.(, id, )
create.(id, min, max, onscreen)
update.(id, min, max, onscreen)
handler.name = (id, char)
toggles.name ~=
min = mins[id]
max = maxes[id]
onscreen = onscreens[id]
check.(, id, )
create.(id, char.Name, min, max, onscreen)
update.(id, min, max, onscreen)
handler.distance = (id, char)
toggles.distance ~=
min = mins[id]
max = maxes[id]
onscreen = onscreens[id]
check.(, id, )
create.(id, min, max, onscreen)
update.(id, min, max, onscreen)
handler.weapon = (id, char)
toggles.weapon ~=
min = mins[id]
max = maxes[id]
onscreen = onscreens[id]
check.(, id, )
create.(id, min, max, onscreen)
update.(id, min, max, onscreen)
handler.healthbar = (id, char)
toggles.healthbar ~=
min = mins[id]
max = maxes[id]
onscreen = onscreens[id]
check.(, id, )
create.(id, min, max, onscreen)
update.(id, min, max, onscreen)
text, _ (handler)
settings[text].top ==
entities.text.top[text] = {}
settings[text].top ==
entities.text.bottom[text] = {}
_, player (Players:())
id = player.UserId
util.(player, id)
check.(player)
valid[id] = player.Character
RunService:(, .RenderPriority.Camera.Value + , ()
id, char valid
min, max, onscreen = Math.(char)
mins[id] = min
maxes[id] = max
onscreens[id] = onscreen
_, func (handler)
(id, char)
)
Players.PlayerRemoving:((plr)
id = plr.UserId
.(valid, id)
Type, _ (entities)
Type ==
(Type, id)
Type, _ (entities.text.top)
(Type, id)
Type, _ (entities.text.bottom)
(Type, id)
)
Players.PlayerAdded:((player)
.() player.Character
id = player.UserId
check.(player)
valid[id] = player.Character
util.(player, id)
)box esp names distances weapons (currently only works for tools stored under the character, name of tool needs to be present in the whitelistedweapons table) healthbars if you want to update anything just update the functions in the create or update tables, ive tried to keep the code neat this time :p

Universal