Description:
local ws = game.Workspace
local msg = Instance.new("Hint")
msg.Name = "DestroyHint"
msg.Parent = ws
msg.Text = "WARNING: Workspace self-destruct sequence started!"
wait(2)
for i = 5, 1, -1 do
msg.Text = string.format("Destroying workspace in %d", i)
print("Countdown:", i)
wait(1)
end
msg.Text = "BOOM!"
wait(1)
local children = ws:GetChildren()
local total = 0
for i = 1, #children do
local obj = children[i]
if obj ~= msg and obj.Name ~= "Camera" and obj.Name ~= "Terrain" then
print("Destroying:", obj.Name)
msg.Text = string.format("Destroying %s", obj.Name)
obj:Destroy()
total = total + 1
wait(0.2)
end
end
print("Total objects destroyed:", total)
msg.Text = "Workspace destroyed... just kidding, it was a prank!"
wait(3)
msg:Destroy()