Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game:service "Players".LocalPlayer
- local highlights = Instance.new("Folder", game:service "CoreGui")
- local function addhighlight(object)
- if object:IsA "Model" and object.Parent.Name ~= tostring(plr.TeamColor) then
- local head = object:FindFirstChild("Head")
- local torso = object:FindFirstChild("Torso") or object:FindFirstChild("UpperTorso")
- if head and torso then
- for _, part in pairs({head, torso}) do
- local highlight = Instance.new("Highlight", highlights)
- highlight.Adornee = part
- highlight.FillColor = Color3.new(1, 1, 1)
- highlight.FillTransparency = .75
- highlight.OutlineTransparency = 0
- part.AncestryChanged:Connect(
- function()
- highlight:Destroy()
- end
- )
- end
- end
- end
- end
- for _, v in pairs(workspace:GetDescendants()) do
- addhighlight(v)
- end
- workspace.DescendantAdded:Connect(addhighlight)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement