--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.75)

			
			
			for i = 1, 5 do
				water.CFrame = water.CFrame * CFrame.new(0, 0.01, 0)
				wait()
			end
			--wait(1)
			for i = 1, 23 do
				water.Mesh.Scale = water.Mesh.Scale + Vector3.new(-0.0149, 0, -0.0149)
				water.CFrame = water.CFrame * CFrame.new(0, -0.0149, 0)
				wait()
			end
			for i, v in pairs(script.Parent.Parent:GetChildren()) do
				if v.Name == "WaterSwirl" then
					v.ParticleEmitter.Transparency = NumberSequence.new(0.9)
					v.ParticleEmitter.Rate = 900
				end
end
			
			
			wait(1)
			
			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.9 + (0.015 * i))
						if i == 10 then
							v.ParticleEmitter.Rate = 0
						end
end
				end
				wait(0.2)
			end

			script.Parent.Parent.ToiletUsed.Value = false
			water.BrickColor = BrickColor.new("Fog")
			
			for i = 1, 145 do
				water.Mesh.Scale = water.Mesh.Scale + Vector3.new(0.0021, 0, 0.0021)
				water.CFrame = water.CFrame * CFrame.new(0, 0.0021, 0)
				wait()
			end
			water.CFrame = script.Parent.Parent.WaterResetPos.CFrame
			water.Mesh.Scale = Vector3.new(1,0,1)

			flushing = false
			script.Disabled = true
		

