Quick actions

cmd+k|ctrl+k

Navigation

Languages

Brookhaven house unban

Snippet info

Language

Lua

Visibility

public

Author

shashlik

Created

2025-08-10T11:51:39.752113Z

Updated

2025-08-10T11:51:39.752113Z

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Workspace = game:GetService("Workspace")

if ReplicatedStorage:FindFirstChild("BannedLots") then
    ReplicatedStorage.BannedLots:Destroy()
    warn("[Auto-Cleaner] BannedLots удален из ReplicatedStorage")
end

for _, obj in ipairs(Workspace:GetDescendants()) do
    if obj.Name == "BannedBlock" then
        obj:Destroy()
    end
end

Workspace.DescendantAdded:Connect(function(newPart)
    if newPart.Name == "BannedBlock" then
        task.defer(function()
            if newPart.Parent then
                newPart:Destroy()
                warn("[Auto-Cleaner] Удален новый BannedBlock")
            end
        end)
    end
end)

warn("[Auto-Cleaner] Система активна. Все BannedBlock будут удаляться автоматически.")
INFO