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

			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 = 40
				end
end
			
			for i = 1, 4 do
				water.CFrame = water.CFrame * CFrame.new(0, 0.01, 0)
				wait()
			end
			for i = 1, 22 do
				water.Mesh.Scale = water.Mesh.Scale + Vector3.new(-0.02, 0, -0.02)
				water.CFrame = water.CFrame * CFrame.new(0, -0.015, 0)
				wait()
			end
			
			if script.Parent.Parent.ToiletUsed.Value == true then
				water.BrickColor = BrickColor.new("Pastel yellow")
			end
			
			wait(1.55)
			
			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, 66 do
				water.Mesh.Scale = water.Mesh.Scale + Vector3.new(0.0066, 0, 0.0066)
				water.CFrame = water.CFrame * CFrame.new(0, 0.00409, 0)
				wait()
			end
			water.CFrame = script.Parent.Parent.WaterResetPos.CFrame
			water.Mesh.Scale = Vector3.new(1,0,1)
			flushing = false
			script.Disabled = true
		

