
Key Required

getgenv().config = {
esp = true;
}
local function clearHighlightsAndUIs(folder)
for _, v in ipairs(folder:GetChildren()) do
for _, child in ipairs(v:GetChildren()) do
if child:IsA("Highlight") or child:IsA("BillboardGui") then
child:Destroy()
end
end
end
end
local function highlightAI(v)
if getgenv().config.esp == false or not v:FindFirstChild("AI") then
for _, child in ipairs(v:GetChildren()) do
if child:IsA("Highlight") or child:IsA("BillboardGui") then
child:Destroy()
end
end
return
end
if v:FindFirstChildOfClass("Highlight") then
return
end
local highlight = Instance.new("Highlight")
highlight.Name = "AI_Highlight"
highlight.Adornee = v
highlight.FillColor = Color3.fromRGB(255, 0, 0)
highlight.OutlineColor = Color3.fromRGB(255, 255, 255)
highlight.OutlineTransparency = 1
highlight.Parent = v
local billboard = Instance.new("BillboardGui")
billboard.Name = "AI_HealthUI"
billboard.Adornee = v
billboard.Size = UDim2.new(0, 100, 0, 25)
billboard.StudsOffset = Vector3.new(0, 4, 0)
billboard.AlwaysOnTop = true
billboard.MaxDistance = 150
billboard.Parent = v
local textLabel = Instance.new("TextLabel")
textLabel.Parent = billboard
textLabel.Size = UDim2.new(1, 0, 1, 0)
textLabel.BackgroundTransparency = 1
textLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
textLabel.TextStrokeTransparency = 0
textLabel.TextScaled = true
textLabel.Font = Enum.Font.SourceSansBold
task.spawn(function()
local humanoid = v:FindFirstChildOfClass("Humanoid")
while v and v.Parent and humanoid do
if humanoid.Health <= 0 then
if highlight then highlight:Destroy() end
if billboard then billboard:Destroy() end
break
end
textLabel.Text = math.floor(humanoid.Health) .. " / " .. math.floor(humanoid.MaxHealth)
task.wait(0.2)
end
end)
end
clearHighlightsAndUIs(workspace.Characters)
for _, v in ipairs(workspace.Characters:GetChildren()) do
if v:FindFirstChild("AI") then
highlightAI(v)
end
end
workspace.Characters.ChildAdded:Connect(function(v)
task.wait(0.1)
if v:FindFirstChild("AI") then
highlightAI(v)
end
end)No comments yet for this script.



