local d={}local y=12 local I=false local t=script.Parent.Parent.Water local Z=script.Parent.Parent.ToiletBowl.Sound Z:Play()wait(.885)for d,y in pairs(script.Parent.Parent:GetChildren())do if y.Name=="\087\097\116\101\114\083\119\105\114\108"then y.ParticleEmitter.Transparency=NumberSequence.new(.55)y.ParticleEmitter.Rate=500 end end for d=1,4,1 do t.CFrame=t.CFrame*CFrame.new(0,.01,0)wait()end wait(4.05)for d=1,10,1 do for y,I in pairs(script.Parent.Parent:GetChildren())do if I.Name=="\087\097\116\101\114\083\119\105\114\108"then I.ParticleEmitter.Transparency=NumberSequence.new(.55+.015*d)if d==10 then I.ParticleEmitter.Rate=0 end end end wait(0)end wait(1.22)for d=1,52,1 do t.Mesh.Scale=t.Mesh.Scale+Vector3.new(-0.007,0,-0.007)t.CFrame=t.CFrame*CFrame.new(0,-0.007,0)wait()end if script.Parent.Parent.ToiletUsed.Value==true then t.BrickColor=BrickColor.new("\080\097\115\116\101\108 \121\101\108\108\111\119")end wait(.5)script.Parent.Parent.ToiletUsed.Value=false t.BrickColor=BrickColor.new("\070\111\103")for d=1,52,1 do t.Mesh.Scale=t.Mesh.Scale+Vector3.new(.0066,0,.0066)t.CFrame=t.CFrame*CFrame.new(0,.0066,0)wait()end t.CFrame=script.Parent.Parent.WaterResetPos.CFrame t.Mesh.Scale=Vector3.new(1,0,1)I=false script.Disabled=true
--local ClickerModule = require(343254562)
--local clickEvent = ClickerModule.RemoteEvent
local interactiveParts = {}
local activationDistance = 12
local flushing = false
local water = script.Parent.Parent.Water
local sound = script.Parent.Parent.ToiletBowl.Sound
sound:Play()
wait(0.885)

for i, v in pairs(script.Parent.Parent:GetChildren()) do
	if v.Name == "WaterSwirl" then
		v.ParticleEmitter.Transparency = NumberSequence.new(0.55)
		v.ParticleEmitter.Rate = 500
	end
end

for i = 1, 4 do
	water.CFrame = water.CFrame * CFrame.new(0, 0.01, 0)
	wait()
end
wait(4.05)
for i = 1, 10 do
	for ii, v in pairs(script.Parent.Parent:GetChildren()) do
		if v.Name == "WaterSwirl" then
			v.ParticleEmitter.Transparency = NumberSequence.new(0.55 + (0.015 * i))
			if i == 10 then
				v.ParticleEmitter.Rate = 0
			end
		end
	end
	wait(0)
end
wait(1.22)
for i = 1, 52 do
	water.Mesh.Scale = water.Mesh.Scale + Vector3.new(-0.007, 0, -0.007)
	water.CFrame = water.CFrame * CFrame.new(0, -0.007, 0)
	wait()
end

if script.Parent.Parent.ToiletUsed.Value == true then
	water.BrickColor = BrickColor.new("Pastel yellow")
end

wait(0.5)

script.Parent.Parent.ToiletUsed.Value = false
water.BrickColor = BrickColor.new("Fog")

for i = 1, 52 do
	water.Mesh.Scale = water.Mesh.Scale + Vector3.new(0.0066, 0, 0.0066)
	water.CFrame = water.CFrame * CFrame.new(0, 0.0066, 0)
	wait()
end
water.CFrame = script.Parent.Parent.WaterResetPos.CFrame
water.Mesh.Scale = Vector3.new(1, 0, 1)
flushing = false
script.Disabled = true
