local rs = game:GetService("ReplicatedStorage") local ps = game:GetService("Players") local lp = ps.LocalPlayer local rc = Color3.new(1, 0.345098, 0.345098) local function sr() local r = rs.ZAP.COMBAT_RELIABLE local b = buffer.create(9) buffer.writeu8(b, 0, 1) buffer.writef64(b, 1, os.clock()) r:FireServer(b, {}) end local function irc(c) if not c then return false end local t = 0.01 return math.abs(c.R - rc.R) < t and math.abs(c.G - rc.G) < t and math.abs(c.B - rc.B) < t end local function gc() if not lp.Character or not lp.Character:FindFirstChild("HumanoidRootPart") then return nil end local mp = lp.Character.HumanoidRootPart.Position local cp = nil local sd = math.huge for _, p in pairs(ps:GetPlayers()) do if p ~= lp and p.Character and p.Character:FindFirstChild("HumanoidRootPart") then local d = (p.Character.HumanoidRootPart.Position - mp).Magnitude if d < sd then sd = d cp = p end end end return cp end local function mc(ch) if not ch then return end for _, pt in pairs(ch:GetDescendants()) do if pt:IsA("BasePart") then pt.ChildAdded:Connect(function(cd) if cd:IsA("BasePart") and cd.Name ~= pt.Name then if irc(cd.Color) then sr() end end end) end end ch.DescendantAdded:Connect(function(ds) if ds:IsA("BasePart") then task.wait(0.05) if irc(ds.Color) then sr() end end end) end local function sm() local cp = gc() if cp and cp.Character then mc(cp.Character) end task.spawn(function() while task.wait(2) do local ncp = gc() if ncp and ncp ~= cp then cp = ncp if cp.Character then mc(cp.Character) end end end end) end local function sl() if lp.Character then sm() end lp.CharacterAdded:Connect(function() task.wait(1) sm() end) end sl()