local function b(b,W)local s=Instance.new("\083\111\117\110\100",W)s.SoundId="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061"..b s:Play()s:Destroy()end local function W(W)print(W.Name.." \099\108\105\099\107\101\100 \111\110 \085\110\105\102\111\114\109 \071\105\118\101\114")b(152206246,W)local s=W.Character:FindFirstChild("\083\104\105\114\116")if not s then print("\078\111 \115\104\105\114\116 \102\111\117\110\100\044 \099\114\101\097\116\105\110\103 \102\111\114 "..W.Name)local b=Instance.new("\083\104\105\114\116",W.Character)b.Name="\083\104\105\114\116"else if s then print("\083\104\105\114\116 \102\111\117\110\100\044 \114\101\099\111\110\115\116\114\117\099\116\105\110\103 \102\111\114 "..W.Name)W.Character.Shirt:remove()local b=Instance.new("\083\104\105\114\116",W.Character)b.Name="\083\104\105\114\116"end end local D=W.Character:FindFirstChild("\080\097\110\116\115")if not D then print("\078\111 \112\097\110\116\115 \102\111\117\110\100\044 \099\114\101\097\116\105\110\103 \102\111\114 "..W.Name)local b=Instance.new("\080\097\110\116\115",W.Character)b.Name="\080\097\110\116\115"else if D then print("\080\097\110\116\115 \102\111\117\110\100\044 \114\101\099\111\110\115\116\114\117\099\116\105\110\103 \102\111\114 "..W.Name)W.Character.Pants:remove()local b=Instance.new("\080\097\110\116\115",W.Character)b.Name="\080\097\110\116\115"end end W.Character.Shirt.ShirtTemplate=shirtId W.Character.Pants.PantsTemplate=pantsId end local function s(b)cPart.Transparency=.1 cPart.BrickColor=BrickColor.White()end local function D(b)cPart.BrickColor=BrickColor.Gray()cPart.Transparency=1 end
-- Functions --

local function playSoundLocal(sId, sParent)
	local sound = Instance.new("Sound", sParent)
	sound.SoundId = "http://www.roblox.com/asset/?id=" .. sId
	sound:Play()
	sound:Destroy()
end

local function onClicked(player)
	print(player.Name .. " clicked on Uniform Giver")

	playSoundLocal(152206246, player) -- Declaring the sound ID and Parent

	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

local function onHoverEnter(player)
	cPart.Transparency = 0.1
	cPart.BrickColor = BrickColor.White()
end

local function onHoverLeave(player)
	cPart.BrickColor = BrickColor.Gray()
	cPart.Transparency = 1
end
