--BROUGHT TO YOU BY RobloxScripter.com!--
repeat task.wait() until game:IsLoaded()
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local events = {}
function setup()
for _,v in pairs(Players:GetPlayers()) do
if not events[v.Name] and v ~= player then
coroutine.resume(coroutine.create(function(v)
for i,x in pairs(v.Character:GetChildren()) do
if x:IsA("BasePart") then
task.spawn(function()
local event = Instance.new("ClickDetector", x)
events[v.Name] = event
x.MouseClick:Connect(function()
setclipboard(v.Parent.Parent.Name)
game:GetService("StarterGui"):SetCore("SendNotification", {
Title = event.Parent.Parent.Name.." Copied To Clipboard",
Text = "Copied!",
Duration = 3
})
end)
end)
end
end
end), v)
end
end
end
Players.PlayerRemoving:Connect(function(plr) -- honestly its gonna wipe the character anyways so this is kinda pointless
if events[plr.Name] ~= nil then
events[plr.Name]:Destroy()
end
end)
while task.wait(1) do
setup()
end