13 lines
259 B
Plaintext

function gui:Destroy()
check=self.Parent:getChildren()
local cc=0
for cc=1,#check do
if check[cc]==self then
table.remove(self.Parent.Children,cc)
end
end
self.Destroyed = true
if #self.Parent.Children==0 then
self.Parent.isLeaf = true
end
end