local l=nil local Q=nil local x=false function changeFace(V)if x then return end x=true l=nil Q=nil local p=V.Parent if p then local x=p:FindFirstChild("\072\101\097\100")if x then local V=x:FindFirstChild("\102\097\099\101")if V then Q=V.Texture V.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)])l=V end end end end function checkForNewSitter(l)if l:IsA("\087\101\108\100")and l.Name=="\083\101\097\116\087\101\108\100"then if l.Part0==toilet then changeFace(l.Part1)else changeFace(l.Part0)end end end function checkForFaceRelease(V)if V:IsA("\087\101\108\100")and V.Name=="\083\101\097\116\087\101\108\100"then if l and Q then l.Texture=Q l=nil Q=nil end x=false end end toilet.ChildAdded:connect(checkForNewSitter)toilet.ChildRemoved:connect(checkForFaceRelease)

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)
