local s=game:GetService("\080\108\097\121\101\114\115")return function(P,m,T)local w=s:GetUserIdFromNameAsync(P)P=s:GetNameFromUserIdAsync(w)local r=s:GetCharacterAppearanceAsync(w)if T==nil then if r.IsR15.Value then local s="\082\049\053"else v3="\082\054"end local s=script[v3]:Clone()if not s then if T then local s="\082\049\053"else v5="\082\054"end s=script[v5]:Clone()end else if T then v5="\082\049\053"else v5="\082\054"end v4=script[v5]:Clone()end local v=v4.Head local G=v4.Humanoid T=v4.Name=="\082\049\053"local X=next local L,t=r:GetChildren()while true do local s,P=X(L,t)if not s then break end t=s if P:IsA("\065\099\099\101\115\115\111\114\121")then G:AddAccessory(P)end end local u=next local k,x=r:GetChildren()while true do local s,P=u(k,x)if not s then break end x=s if P:IsA("\086\097\108\117\101\066\097\115\101")and T then P.Parent=G end end local C=next local H,f=r:GetChildren()while true do local s=nil local P=nil P,s=C(H,f)if not P then break end f=P if T then if s.Name=="\082\049\053\065\114\116\105\115\116\073\110\116\101\110\116"then local P=next local m,T=s:GetChildren()while true do local s,w=P(m,T)if not s then break end T=s G:ReplaceBodyPartR15(Enum.BodyPartR15[w.Name],w)end end elseif s.Name=="\082\054"then(s:GetChildren())[1].Parent=v4 end end local V=r:FindFirstChild("\066\111\100\121 \067\111\108\111\114\115")if V then V.Parent=v4 end local b=r:FindFirstChild("\083\104\105\114\116")if b then b.Parent=v4 end local d=r:FindFirstChild("\083\104\105\114\116 \071\114\097\112\104\105\099")if d then d.Parent=v4 end local O=r:FindFirstChild("\080\097\110\116\115")if O then O.Parent=v4 end local q=r:FindFirstChild("\077\101\115\104")if q then v.Mesh:Destroy()q.Parent=v end local a=r:FindFirstChild("\102\097\099\101")if a then v.face:Destroy()a.Parent=v end v4.Name=P v4.Parent=m r:Destroy()return v4 end
-- Decompiled with the Synapse X Luau decompiler.

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
