Advertisement
ColdSpecs

test 1

Oct 9th, 2023
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. local settings = {
  2. fillcolor = Color3.fromRGB(255, 255, 255),
  3. filltransparency = .75,
  4. outlinecolor = Color3.fromRGB(255, 255, 255),
  5. outlinetransparency = 0
  6. }
  7.  
  8. local plr = game:service "Players".LocalPlayer
  9. local highlights = Instance.new("Folder", game:service "CoreGui")
  10.  
  11. local function addhighlight(object)
  12. local highlight = Instance.new("Highlight", highlights)
  13. highlight.Adornee = object
  14.  
  15. highlight.FillColor = settings.fillcolor
  16. highlight.FillTransparency = settings.filltransparency
  17.  
  18. highlight.OutlineColor = settings.outlinecolor
  19. highlight.OutlineTransparency = settings.outlinetransparency
  20.  
  21. highlight.Adornee.Changed:Connect(
  22. function()
  23. if not highlight.Adornee or not highlight.Adornee.Parent then
  24. highlight:Destroy()
  25. end
  26. end
  27. )
  28.  
  29. return highlight
  30. end
  31.  
  32. local function addtomodel(object)
  33. if object:IsA "Model" and object.Parent.Name ~= tostring(plr.TeamColor) then
  34. local head = object:FindFirstChild("Head")
  35. local torso = object:FindFirstChild("Torso") or object:FindFirstChild("UpperTorso")
  36.  
  37. if head and torso then
  38. addhighlight(head)
  39. addhighlight(torso)
  40. end
  41. end
  42. end
  43.  
  44. for i, v in pairs(workspace:GetDescendants()) do
  45. addtomodel(v)
  46. end
  47.  
  48. workspace.DescendantAdded:Connect(
  49. function(v)
  50. addtomodel(v)
  51. end
  52. )
  53.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement