local o=nil local T=nil local u=false function changeFace(z)if u then return end u=true o=nil T=nil local W=z.Parent if W then local u=W:FindFirstChild("\072\101\097\100")if u then local z=u:FindFirstChild("\102\097\099\101")if z then T=z.Texture z.Texture="\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"..tostring(toiletFace[math.random(1,#toiletFace)])o=z end end end end function checkForNewSitter(o)if o:IsA("\087\101\108\100")and o.Name=="\083\101\097\116\087\101\108\100"then if o.Part0==toilet then changeFace(o.Part1)else changeFace(o.Part0)end end end function checkForFaceRelease(z)if z:IsA("\087\101\108\100")and z.Name=="\083\101\097\116\087\101\108\100"then if o and T then o.Texture=T o=nil T=nil end u=false end end toilet.ChildAdded:connect(checkForNewSitter)toilet.ChildRemoved:connect(checkForFaceRelease)
-- for quick setting-back of face
local oldFace = nil
local oldFaceTexture = nil

local debounce = false
function changeFace(torso)
	if debounce then
		return
	end
	debounce = true

	oldFace = nil
	oldFaceTexture = nil

	local char = torso.Parent
	if char then
		local charHead = char:FindFirstChild("Head")
		if charHead then
			local charFace = charHead:FindFirstChild("face")
			if charFace then
				oldFaceTexture = charFace.Texture
				charFace.Texture = "http://www.roblox.com/asset/?id="
					.. tostring(toiletFace[math.random(1, #toiletFace)])
				oldFace = charFace
			end
		end
	end
end

function checkForNewSitter(newChild)
	if newChild:IsA("Weld") and newChild.Name == "SeatWeld" then
		if newChild.Part0 == toilet then
			changeFace(newChild.Part1)
		else
			changeFace(newChild.Part0)
		end
	end
end

function checkForFaceRelease(child)
	if child:IsA("Weld") and child.Name == "SeatWeld" then
		if oldFace and oldFaceTexture then
			oldFace.Texture = oldFaceTexture
			oldFace = nil
			oldFaceTexture = nil
		end

		debounce = false
	end
end

toilet.ChildAdded:connect(checkForNewSitter)
toilet.ChildRemoved:connect(checkForFaceRelease)
