local LP = game:GetService('Players').LocalPlayer
local CachedClothing = {
'Jacket-TrenchCoat-White',
'Jacket-Leather-Brown',
'Jacket-Suit-Gray',
'Jacket-Denim-Blue-8516609675',
'Jacket-Hoodie-Orange_6984765766'
}
local function GetAccessory()
local LC = LP and LP.Character.Parent and LP.Character or nil
if LC then
for _, v in next, LC:GetChildren() do
if v:IsA('Accessory') and table.find(CachedClothing, v.Name) then
return v
end
end
end
end
local function ManipulateLayeredAccessories(Instruction)
local LC, Instruction = LP and LP.Character.Parent and LP.Character or nil, type(Instruction) == 'number' and Instruction or nil
if LC and Instruction then
if Instruction == 1 then
local Accessory = GetAccessory()
if Accessory and Accessory.Name == 'Jacket-TrenchCoat-White' then
local SurfaceAppearance = Accessory:FindFirstChild('SurfaceAppearance', true)
if SurfaceAppearance then
SurfaceAppearance:Destroy()
end
elseif Accessory and Accessory.Name ~= 'Jacket-TrenchCoat-White' then
error('invalid attempt to \'ManipulateLayeredAccessories\' (found layered accessory, but it is not the white trenchcoat)')
end
elseif Instruction == 2 then
local Accessory = GetAccessory()
local Handle = Accessory and Accessory:FindFirstChild('Handle') or nil
local AccessoryWeld = Handle and Handle:FindFirstChild('AccessoryWeld') or nil
if Accessory and AccessoryWeld then
AccessoryWeld:Destroy()
wait(.5)
for i = 1, 50 do
if Handle and Handle.Parent then
Handle.Velocity = Vector3.new(0, 1e9, 0); task.wait()
else
break
end
end
end
end
end
end
ManipulateLayeredAccessories(1) -- Makes your trench-coat red if you have one equipped.
wait(2)
ManipulateLayeredAccessories(2) -- Makes part of your torso and limbs invisible, and works with any layered clothing asset.