-- Tags --


local pantsId = script.Parent.Parent.Pants.PantsTemplate
local shirtId = script.Parent.Parent.Shirt.ShirtTemplate
local cPart = script.Parent
local cDetector = script.Parent.ProximityPrompt





local function onClicked(player)
	if player.Team.TeamColor == BrickColor.new("Mint")then




	local foundShirt = player.Character:FindFirstChild("Shirt") -- Tries to find Shirt
	if not foundShirt then -- if there is no shirt
		print("No shirt found, creating for "..player.Name)
		local newShirt = Instance.new("Shirt",player.Character)
		newShirt.Name = "Shirt"
	else if foundShirt then -- if there is a shirt
			print("Shirt found, reconstructing for "..player.Name)
			player.Character.Shirt:remove()
			local newShirt = Instance.new("Shirt",player.Character)
			newShirt.Name = "Shirt"
		end
	end




	local foundPants = player.Character:FindFirstChild("Pants") -- Tries to find Pants
	if not foundPants then -- if there are no pants
		print("No pants found, creating for "..player.Name)
		local newPants = Instance.new("Pants",player.Character)
		newPants.Name = "Pants"
	else if foundPants then -- if there are pants
			print("Pants found, reconstructing for "..player.Name)
			player.Character.Pants:remove()
			local newPants = Instance.new("Pants",player.Character)
			newPants.Name = "Pants"
		end
	end

	player.Character.Shirt.ShirtTemplate = shirtId
	player.Character.Pants.PantsTemplate = pantsId
	end
end



