Advertisement
ColdSpecs

test X

Oct 9th, 2023
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. local plr = game:service "Players".LocalPlayer
  2. local highlights = Instance.new("Folder", game:service "CoreGui")
  3. local function addhighlight(object)
  4. if object:IsA "Model" and object.Parent.Name ~= tostring(plr.TeamColor) then
  5. local head = object:FindFirstChild("Head")
  6. local torso = object:FindFirstChild("Torso") or object:FindFirstChild("UpperTorso")
  7. if head and torso then
  8. for _, part in pairs({head, torso}) do
  9. local highlight = Instance.new("Highlight", highlights)
  10. highlight.Adornee = part
  11. highlight.FillColor = Color3.new(1, 1, 1)
  12. highlight.FillTransparency = .75
  13. highlight.OutlineTransparency = 0
  14. part.AncestryChanged:Connect(function() highlight:Destroy() end)
  15. end
  16. end
  17. end
  18. end
  19. for _, v in pairs(workspace:GetDescendants()) do addhighlight(v) end
  20. workspace.DescendantAdded:Connect(addhighlight)
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement