- local LP, Players = game:GetService('Players').LocalPlayer, game:GetService('Players')
- local function AttachAnti(Player)
- 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
- local Char = Player.Character and Player.Character.Parent and Player.Character or nil
- local UpperTorso = Char and Char:FindFirstChild('UpperTorso') or nil
- if Char and UpperTorso then
- for _, v in next, Char:GetChildren() do
- if v:IsA('Accessory') and v:FindFirstChild('Handle') and v.Handle:FindFirstChild('SurfaceAppearance') --[[and v.Handle:FindFirstChild('AccessoryWeld')]] then
- local Accessory = v:Clone(); v:Destroy()
- Accessory.Parent = Char
- end
- end
- end
- Player.CharacterAdded:Connect(function(Char)
- local UpperTorso = Char and Char:FindFirstChild('UpperTorso') or Char:WaitForChild('UpperTorso', Players.RespawnTime) or nil
- if Char and UpperTorso then
- for _, v in next, Char:GetChildren() do
- if v:IsA('Accessory') and v:FindFirstChild('Handle') and v.Handle:FindFirstChild('SurfaceAppearance') then
- local Accessory = v:Clone(); v:Destroy()
- Accessory.Parent = Char
- end
- end
- end
- end)
- end
- for _, v in next, Players:GetPlayers() do
- if v ~= LP then
- AttachAnti(v)
- end
- end
- Players.PlayerAdded:Connect(AttachAnti)