Roblox Script | ANTI LAYERED CLOTHING CRASH

Created by cli

Features:

  • ANTI LAYERED CLOTHING CRASH
-- Anti Layered Clothing crash
-- Clears appearance whenever a motor is destroyed

local Players = game:GetService'Players'

function PlayerAdded(Player)
   if Player == Players.LocalPlayer then return end

   local Connection, Warned
   local function CharacterAdded(Character)
       if Connection then Connection:Disconnect() end
       Warned = false
       Connection = Character.DescendantRemoving:Connect(function(w)
           if w:isA'Motor6D' and w.Part0.Parent == Character and w.Part1.Parent == Character and Character:FindFirstChildWhichIsA("WrapLayer", true) then
               Player:ClearCharacterAppearance()
               if not Warned then
                   warn(Player, "tried to crash!")
                   Warned = true
               end
           end
       end)
   end
   if Player.Character then task.spawn(CharacterAdded, Player.Character) end

   Player.CharacterAdded:Connect(CharacterAdded)
end

for _, Player in pairs(Players:GetPlayers()) do
   task.spawn(PlayerAdded, Player)
end

Players.PlayerAdded:Connect(PlayerAdded)
  • OR v
-- Anti Layered Clothing crash
-- Removes layered clothing alltogether

local Players = game:GetService'Players'

function DescendantAdded(inst)
   if inst:isA'WrapLayer' then
       task.wait()
       inst.Parent:Destroy()
   end
end

function CharacterAdded(Character)
   for i,v in pairs(Character:GetDescendants()) do task.spawn(DescendantAdded, v) end
   Character.DescendantAdded:Connect(DescendantAdded)
end

function PlayerAdded(Player)
   if Player == Players.LocalPlayer then return end
   
   if Player.Character then task.spawn(CharacterAdded, Player.Character) end
   Player.CharacterAdded:Connect(CharacterAdded)
end

for i,v in pairs(Players:GetPlayers()) do task.spawn(PlayerAdded, v) end
Players.PlayerAdded:Connect(PlayerAdded)

ENJOY!

Warning: DO NOT DOWNLOAD anything from this page, you’re only here to copy the script!

More Scripts!

TOP 10 TRENDING SCRIPTS