local o=Rigs[0]local function v(v)local j=v:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")if not j or j.Health<=0 or j.RigType~=Enum.HumanoidRigType.R15 then return end j:UnequipTools()local S=Rigs[RigVersion]if IgnoreBodyParts then for o,S in pairs(S:GetDescendants())do if v:FindFirstChild(S.Name)and S:IsA("\066\097\115\101\080\097\114\116")then j:ReplaceBodyPartR15(S.Name,S:Clone())end end else for v,V in pairs(v:GetChildren())do if V:IsA("\077\101\115\104\080\097\114\116")then local v=o:FindFirstChild(V.Name)local P=S:FindFirstChild(V.Name)if v and(P and v.MeshId==V.MeshId)then j:ReplaceBodyPartR15(V.Name,P:Clone())end end end end end local function j(o)o.CharacterAppearanceLoaded:Connect(v)end;(game:GetService("\080\108\097\121\101\114\115")).PlayerAdded:Connect(j)
-- Don't touch anything below this point unless you know what you're doing!
local DefaultRig = Rigs[0]

local function Update(Character)
	local Humanoid = Character:FindFirstChildOfClass("Humanoid")
	if not Humanoid or Humanoid.Health <= 0 or Humanoid.RigType ~= Enum.HumanoidRigType.R15 then
		return
	end
	Humanoid:UnequipTools()

	local ConvertTo = Rigs[RigVersion]

	if IgnoreBodyParts then
		for _, Part in pairs(ConvertTo:GetDescendants()) do
			if Character:FindFirstChild(Part.Name) and Part:IsA("BasePart") then
				Humanoid:ReplaceBodyPartR15(Part.Name, Part:Clone())
			end
		end
	else
		for _, Part in pairs(Character:GetChildren()) do
			if Part:IsA("MeshPart") then
				local EquivalentDefault = DefaultRig:FindFirstChild(Part.Name)
				local EquivalentSkinned = ConvertTo:FindFirstChild(Part.Name)
				if EquivalentDefault and EquivalentSkinned and EquivalentDefault.MeshId == Part.MeshId then
					Humanoid:ReplaceBodyPartR15(Part.Name, EquivalentSkinned:Clone())
				end
			end
		end
	end
end

local function PlayerJoined(Player)
	Player.CharacterAppearanceLoaded:Connect(Update)
end

game:GetService("Players").PlayerAdded:Connect(PlayerJoined)
