local c=script.Parent local A=c.Configuration local p=A.Username.Value local function l()for c,A in pairs(c:GetChildren())do if A:IsA("\067\104\097\114\097\099\116\101\114\077\101\115\104")or A:IsA("\083\104\105\114\116")or A:IsA("\080\097\110\116\115")or A:IsA("\065\099\099\101\115\115\111\114\121")or A:IsA("\083\104\105\114\116\071\114\097\112\104\105\099")then A:Destroy()end end if c.Head:findFirstChild("\077\101\115\104")then c.Head.Mesh:Destroy()end end local function u()local A=game.Players:GetCharacterAppearanceAsync(game.Players:GetUserIdFromNameAsync(p))for A,p in pairs(A:GetChildren())do if p:IsA("\083\112\101\099\105\097\108\077\101\115\104")or p:IsA("\066\108\111\099\107\077\101\115\104")or p:IsA("\067\121\108\105\110\100\101\114\077\101\115\104")then p.Parent=c.Head elseif p:IsA("\068\101\099\097\108")then c.Head.face.Texture=p.Texture elseif p:IsA("\066\111\100\121\067\111\108\111\114\115")or p:IsA("\067\104\097\114\097\099\116\101\114\077\101\115\104")or p:IsA("\083\104\105\114\116")or p:IsA("\080\097\110\116\115")or p:IsA("\083\104\105\114\116\071\114\097\112\104\105\099")then if c:findFirstChild("\066\111\100\121 \067\111\108\111\114\115")then c["\066\111\100\121 \067\111\108\111\114\115"]:Destroy()end p.Parent=c elseif p:IsA("\065\099\099\101\115\115\111\114\121")then p.Parent=c p.Handle.CFrame=(c.Head.CFrame*CFrame.new(0,c.Head.Size.Y/2,0))*p.AttachmentPoint:inverse()else print("\079\098\106\101\099\116\058 "..(p.Name..(" \105\115 \110\111\116 \114\101\099\111\103\110\105\115\101\100\044 \116\121\112\101\058 "..p.ClassName)))end end if not c.Head:FindFirstChild("\077\101\115\104")then local A=Instance.new("\083\112\101\099\105\097\108\077\101\115\104",c.Head)A.MeshType=Enum.MeshType.Head A.Scale=Vector3.new(1.25,1.25,1.25)end end wait(2)u()
--By Thomasthered

local Model = script.Parent
local Config = Model.Configuration
local Username = Config.Username.Value

local function resetModel()
	for i, v in pairs(Model:GetChildren()) do
		if
			v:IsA("CharacterMesh")
			or v:IsA("Shirt")
			or v:IsA("Pants")
			or v:IsA("Accessory")
			or v:IsA("ShirtGraphic")
		then
			v:Destroy()
		end
	end
	if Model.Head:findFirstChild("Mesh") then
		Model.Head.Mesh:Destroy()
	end
end

local function updateModel()
	local AppModel = game.Players:GetCharacterAppearanceAsync(game.Players:GetUserIdFromNameAsync(Username))
	for i, v in pairs(AppModel:GetChildren()) do
		if v:IsA("SpecialMesh") or v:IsA("BlockMesh") or v:IsA("CylinderMesh") then
			v.Parent = Model.Head
		elseif v:IsA("Decal") then
			Model.Head.face.Texture = v.Texture
		elseif
			v:IsA("BodyColors")
			or v:IsA("CharacterMesh")
			or v:IsA("Shirt")
			or v:IsA("Pants")
			or v:IsA("ShirtGraphic")
		then
			if Model:findFirstChild("Body Colors") then
				Model["Body Colors"]:Destroy()
			end
			v.Parent = Model
		elseif v:IsA("Accessory") then
			v.Parent = Model
			v.Handle.CFrame = Model.Head.CFrame * CFrame.new(0, Model.Head.Size.Y / 2, 0) * v.AttachmentPoint:inverse()
		else
			print("Object: " .. v.Name .. " is not recognised, type: " .. v.ClassName)
		end
	end
	if not Model.Head:FindFirstChild("Mesh") then
		local m = Instance.new("SpecialMesh", Model.Head)
		m.MeshType = Enum.MeshType.Head
		m.Scale = Vector3.new(1.25, 1.25, 1.25)
	end
end
wait(2)
updateModel()
