local Z=game:GetService("\080\108\097\121\101\114\115")return function(x,s,F)local i=Z:GetUserIdFromNameAsync(x)x=Z:GetNameFromUserIdAsync(i)local o=Z:GetCharacterAppearanceAsync(i)if F==nil then if o.IsR15.Value then local Z="\082\049\053"else v3="\082\054"end local Z=script[v3]:Clone()if not Z then if F then local Z="\082\049\053"else v5="\082\054"end Z=script[v5]:Clone()end else if F then v5="\082\049\053"else v5="\082\054"end v4=script[v5]:Clone()end local L=v4.Head local G=v4.Humanoid F=v4.Name=="\082\049\053"local C=next local m,Y=o:GetChildren()while true do local Z,x=C(m,Y)if not Z then break end Y=Z if x:IsA("\065\099\099\101\115\115\111\114\121")then G:AddAccessory(x)end end local g=next local j,c=o:GetChildren()while true do local Z,x=g(j,c)if not Z then break end c=Z if x:IsA("\086\097\108\117\101\066\097\115\101")and F then x.Parent=G end end local y=next local X,Q=o:GetChildren()while true do local Z=nil local x=nil x,Z=y(X,Q)if not x then break end Q=x if F then if Z.Name=="\082\049\053\065\114\116\105\115\116\073\110\116\101\110\116"then local x=next local s,F=Z:GetChildren()while true do local Z,i=x(s,F)if not Z then break end F=Z G:ReplaceBodyPartR15(Enum.BodyPartR15[i.Name],i)end end elseif Z.Name=="\082\054"then(Z:GetChildren())[1].Parent=v4 end end local M=o:FindFirstChild("\066\111\100\121 \067\111\108\111\114\115")if M then M.Parent=v4 end local W=o:FindFirstChild("\083\104\105\114\116")if W then W.Parent=v4 end local b=o:FindFirstChild("\083\104\105\114\116 \071\114\097\112\104\105\099")if b then b.Parent=v4 end local V=o:FindFirstChild("\080\097\110\116\115")if V then V.Parent=v4 end local D=o:FindFirstChild("\077\101\115\104")if D then L.Mesh:Destroy()D.Parent=L end local B=o:FindFirstChild("\102\097\099\101")if B then L.face:Destroy()B.Parent=L end v4.Name=x v4.Parent=s o:Destroy()return v4 end


local l__Players__1 = game:GetService("Players");
return function(p1, p2, p3)
	local v1 = l__Players__1:GetUserIdFromNameAsync(p1);
	p1 = l__Players__1:GetNameFromUserIdAsync(v1);
	local v2 = l__Players__1:GetCharacterAppearanceAsync(v1);
	if p3 == nil then
		if v2.IsR15.Value then
			local v3 = "R15";
		else
			v3 = "R6";
		end;
		local v4 = script[v3]:Clone();
		if not v4 then
			if p3 then
				local v5 = "R15";
			else
				v5 = "R6";
			end;
			v4 = script[v5]:Clone();
		end;
	else
		if p3 then
			v5 = "R15";
		else
			v5 = "R6";
		end;
		v4 = script[v5]:Clone();
	end;
	local l__Head__6 = v4.Head;
	local l__Humanoid__7 = v4.Humanoid;
	p3 = v4.Name == "R15";
	local l__next__8 = next;
	local v9, v10 = v2:GetChildren();
	while true do
		local v11, v12 = l__next__8(v9, v10);
		if not v11 then
			break;
		end;
		v10 = v11;
		if v12:IsA("Accessory") then
			l__Humanoid__7:AddAccessory(v12);
		end;	
	end;
	local l__next__13 = next;
	local v14, v15 = v2:GetChildren();
	while true do
		local v16, v17 = l__next__13(v14, v15);
		if not v16 then
			break;
		end;
		v15 = v16;
		if v17:IsA("ValueBase") and p3 then
			v17.Parent = l__Humanoid__7;
		end;	
	end;
	local l__next__18 = next;
	local v19, v20 = v2:GetChildren();
	while true do
		local v21 = nil;
		local v22 = nil;
		v22, v21 = l__next__18(v19, v20);
		if not v22 then
			break;
		end;
		v20 = v22;
		if p3 then
			if v21.Name == "R15ArtistIntent" then
				local l__next__23 = next;
				local v24, v25 = v21:GetChildren();
				while true do
					local v26, v27 = l__next__23(v24, v25);
					if not v26 then
						break;
					end;
					v25 = v26;
					l__Humanoid__7:ReplaceBodyPartR15(Enum.BodyPartR15[v27.Name], v27);				
				end;
			end;
		elseif v21.Name == "R6" then
			v21:GetChildren()[1].Parent = v4;
		end;	
	end;
	local l__Body_Colors__28 = v2:FindFirstChild("Body Colors");
	if l__Body_Colors__28 then
		l__Body_Colors__28.Parent = v4;
	end;
	local l__Shirt__29 = v2:FindFirstChild("Shirt");
	if l__Shirt__29 then
		l__Shirt__29.Parent = v4;
	end;
	local l__Shirt_Graphic__30 = v2:FindFirstChild("Shirt Graphic");
	if l__Shirt_Graphic__30 then
		l__Shirt_Graphic__30.Parent = v4;
	end;
	local l__Pants__31 = v2:FindFirstChild("Pants");
	if l__Pants__31 then
		l__Pants__31.Parent = v4;
	end;
	local l__Mesh__32 = v2:FindFirstChild("Mesh");
	if l__Mesh__32 then
		l__Head__6.Mesh:Destroy();
		l__Mesh__32.Parent = l__Head__6;
	end;
	local l__face__33 = v2:FindFirstChild("face");
	if l__face__33 then
		l__Head__6.face:Destroy();
		l__face__33.Parent = l__Head__6;
	end;
	v4.Name = p1;
	v4.Parent = p2;
	v2:Destroy();
	return v4;
end;
