Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local settings = {
- fillcolor = Color3.fromRGB(255, 255, 255),
- filltransparency = .75,
- outlinecolor = Color3.fromRGB(255, 255, 255),
- outlinetransparency = 0
- }
- local plr = game:service "Players".LocalPlayer
- local highlights = Instance.new("Folder", game:service "CoreGui")
- local function addhighlight(object)
- local highlight = Instance.new("Highlight", highlights)
- highlight.Adornee = object
- highlight.FillColor = settings.fillcolor
- highlight.FillTransparency = settings.filltransparency
- highlight.OutlineColor = settings.outlinecolor
- highlight.OutlineTransparency = settings.outlinetransparency
- highlight.Adornee.Changed:Connect(
- function()
- if not highlight.Adornee or not highlight.Adornee.Parent then
- highlight:Destroy()
- end
- end
- )
- return highlight
- end
- local function addtomodel(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
- addhighlight(head)
- addhighlight(torso)
- end
- end
- end
- for i, v in pairs(workspace:GetDescendants()) do
- addtomodel(v)
- end
- workspace.DescendantAdded:Connect(
- function(v)
- addtomodel(v)
- end
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement