-- i wrote this shit with chatgpt but it works and it always deletes the fucking footprints so fucking whatever im not a coder
local Workspace = game:GetService("Workspace")
local REQUIRED_CHILDREN = {
ShadowAmbience = true,
PlayerAura = true
}
-- Check whether Shadow has all required children
local function hasRequiredChildren(shadow)
for name in pairs(REQUIRED_CHILDREN) do
if not shadow:FindFirstChild(name) then
return false
end
end
return true
end
-- Monitor a Shadow instance until it qualifies, then delete it
local function monitorShadow(shadow)
if not shadow:IsA("BasePart") or shadow.Name ~= "Shadow" then
return
end
-- Immediate check
if hasRequiredChildren(shadow) then
shadow:Destroy()
return
end
-- Watch for children being added later
local connection
connection = shadow.ChildAdded:Connect(function()
if hasRequiredChildren(shadow) then
connection:Disconnect()
shadow:Destroy()
end
end)
end
-- Scan existing Shadows
for _, obj in ipairs(Workspace:GetDescendants()) do
monitorShadow(obj)
end
-- DON'T DELETE THIS NIGGA, if you do it wont continue to delete
Workspace.DescendantAdded:Connect(function(obj)
monitorShadow(obj)
end)
Comments
i need this irl