(script.Parent:WaitForChild("\067\108\105\099\107\068\101\116\101\099\116\111\114")).MouseClick:connect(function(S)if not InUse and((game:GetService("\080\108\097\121\101\114\115")):FindFirstChild(S.Name)and(S.Character.Humanoid.RigType==Enum.HumanoidRigType.R15 and(S.Character.Humanoid.Health>0 and not S.Character:FindFirstChild("\071\111\116\067\111\115\116\117\109\101"))))then InUse=true S:ClearCharacterAppearance()local w=Instance.new("\066\111\111\108\086\097\108\117\101",S.Character)w.Name="\071\111\116\067\111\115\116\117\109\101"LockPlayer(S,true)local J=(S.Character:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")).CFrame S.Character:SetPrimaryPartCFrame((script.Parent.Parent:FindFirstChild("\080\111\115\105\116\105\111\110")).CFrame)for w,J in pairs(S.Character:GetChildren())do if J:IsA("\066\097\115\101\080\097\114\116")and CheckName(J)then if J.Name=="\072\101\097\100"then J.Transparency=.99 else J.Transparency=1 end local w=J:FindFirstChildOfClass("\068\101\099\097\108")if w then w:Destroy()end local Z=script.Parent.Parent.Parent.Costume:FindFirstChild(J.Name)if Z then local w=Z:Clone()w.Parent=S.Character for S,w in pairs(w:GetChildren())do if w:IsA("\066\097\115\101\080\097\114\116")then w.CustomPhysicalProperties=PhysicalProperties.new(0,0,0,0,0)AddWeld(J,w)w.Anchored=false w.CanCollide=false w.Locked=true end end else warn("\065 \112\105\101\099\101 \111\102 \099\111\115\116\117\109\101 \105\115 \109\105\115\115\105\110\103\058",J.Name)end end wait()end S.Character:SetPrimaryPartCFrame(J)LockPlayer(S,false)InUse=false end end)
--//Main script
script.Parent:WaitForChild("ClickDetector").MouseClick:connect(function(Player)
	if
		not InUse
		and game:GetService("Players"):FindFirstChild(Player.Name)
		and Player.Character.Humanoid.RigType == Enum.HumanoidRigType.R15
		and Player.Character.Humanoid.Health > 0
		and not Player.Character:FindFirstChild("GotCostume")
	then
		InUse = true
		Player:ClearCharacterAppearance()
		local CostumeLabel = Instance.new("BoolValue", Player.Character)
		CostumeLabel.Name = "GotCostume"
		LockPlayer(Player, true)
		local OldCFrame = Player.Character:FindFirstChild("HumanoidRootPart").CFrame
		Player.Character:SetPrimaryPartCFrame(script.Parent.Parent:FindFirstChild("Position").CFrame)
		for _, BodyPart in pairs(Player.Character:GetChildren()) do
			if BodyPart:IsA("BasePart") and CheckName(BodyPart) then
				if BodyPart.Name == "Head" then
					BodyPart.Transparency = 0.99
				else
					BodyPart.Transparency = 1
				end
				local Face = BodyPart:FindFirstChildOfClass("Decal")
				if Face then
					Face:Destroy()
				end
				local CostumeObject = script.Parent.Parent.Parent.Costume:FindFirstChild(BodyPart.Name)
				if CostumeObject then
					local ClonedCostumeObject = CostumeObject:Clone()
					ClonedCostumeObject.Parent = Player.Character
					for _, CostumeObjectPart in pairs(ClonedCostumeObject:GetChildren()) do
						if CostumeObjectPart:IsA("BasePart") then
							CostumeObjectPart.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
							AddWeld(BodyPart, CostumeObjectPart)
							CostumeObjectPart.Anchored = false
							CostumeObjectPart.CanCollide = false
							CostumeObjectPart.Locked = true
						end
					end
				else
					warn("A piece of costume is missing:", BodyPart.Name)
				end
			end
			wait()
		end
		Player.Character:SetPrimaryPartCFrame(OldCFrame)
		LockPlayer(Player, false)
		InUse = false
	end
end)
