Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Workspace cleanup script (run with your executor)
- local Workspace = game:GetService("Workspace")
- -- Helper to safely destroy an instance if it exists
- local function destroyIfExists(parent, name)
- local obj = parent:FindFirstChild(name)
- if obj then
- obj:Destroy()
- end
- end
- -- Direct children of Workspace
- destroyIfExists(Workspace, "__DEBRIS")
- destroyIfExists(Workspace, "__VARIABLES")
- -- Inside __THINGS
- local thingsFolder = Workspace:FindFirstChild("__THINGS")
- if thingsFolder then
- local thingsToDelete = {
- "Cannons", "Coins Comets", "ExclusiveEggPets", "ExclusiveEggs",
- "Flags", "Hoverboards", "Items", "Lootbags", "Lootboxes", "Orbs"
- }
- for _, name in ipairs(thingsToDelete) do
- destroyIfExists(thingsFolder, name)
- end
- end
- -- Inside __MAP
- local mapFolder = Workspace:FindFirstChild("__MAP")
- if mapFolder then
- -- First level folders
- local mapDeletions = {
- "Audio", "Boxes", "Cannons", "Gates", "Interactive",
- "Lucky Block", "PlayerSpawns", "Rockets", "Scavenger",
- "Statues", "Teleports"
- }
- for _, name in ipairs(mapDeletions) do
- destroyIfExists(mapFolder, name)
- end
- -- Inside __MAP / Areas
- local areasFolder = mapFolder:FindFirstChild("Areas")
- if areasFolder then
- local areaDeletions = {
- "Beach", "Cave", "Desert", "Easter", "Easter Bunny Hut",
- "Forest", "Glacier", "Mine", "Tech", "VIP", "Volcano", "Winter"
- }
- for _, name in ipairs(areaDeletions) do
- destroyIfExists(areasFolder, name)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment