function cleanUp()
local search = game.Workspace:getChildren()
for i=1,#search do
if (search[i].className == "Tool") then
search[i]:remove()
print("Removed unused tools.")
script.Parent.Parent:remove()
end
end
else
script.Parent.Parent:remove()
end
end
end
script.Parent.MouseButton1Click:connect(cleanUp)
How many ends should it be, And where? |