The text below is selected, press Ctrl+C to copy to your clipboard. (⌘+C on Mac) No line numbers will be copied.
Guest
Anti-layered crash script pastebin roblox
By anti-layered crash on 2024-09-21 08:00 am | Syntax: LUA | Views: 8



New Script | Raw | Show/Hide line no. | Copy text to clipboard
  1. local LP, Players = game:GetService('Players').LocalPlayer, game:GetService('Players')
  2.  
  3. local function AttachAnti(Player)
  4.     local Player = assert(typeof(Player) == 'Instance' and Player:IsA('Player'), 'invalid argument #1 to \'AttachAnti\' (Instance [Player] expected, got: '..tostring(typeof(Player)..(tostring(typeof(Player) == 'Instance' and ', '..Player.ClassName or '')..')'))) and Player or nil
  5.     local Char = Player.Character and Player.Character.Parent and Player.Character or nil
  6.     local UpperTorso = Char and Char:FindFirstChild('UpperTorso') or nil
  7.    
  8.     if Char and UpperTorso then
  9.         for _, v in next, Char:GetChildren() do
  10.             if v:IsA('Accessory') and v:FindFirstChild('Handle') and v.Handle:FindFirstChild('SurfaceAppearance') --[[and v.Handle:FindFirstChild('AccessoryWeld')]] then
  11.                 local Accessory = v:Clone(); v:Destroy()
  12.                 Accessory.Parent = Char
  13.             end
  14.         end
  15.     end
  16.    
  17.     Player.CharacterAdded:Connect(function(Char)
  18.         local UpperTorso = Char and Char:FindFirstChild('UpperTorso') or Char:WaitForChild('UpperTorso', Players.RespawnTime) or nil
  19.        
  20.         if Char and UpperTorso then
  21.             for _, v in next, Char:GetChildren() do
  22.                 if v:IsA('Accessory') and v:FindFirstChild('Handle') and v.Handle:FindFirstChild('SurfaceAppearance') then
  23.                     local Accessory = v:Clone(); v:Destroy()
  24.                     Accessory.Parent = Char
  25.                 end
  26.             end
  27.         end
  28.     end)
  29. end
  30.  
  31. for _, v in next, Players:GetPlayers() do
  32.     if v ~= LP then
  33.        AttachAnti(v)
  34.     end
  35. end
  36.  
  37. Players.PlayerAdded:Connect(AttachAnti)