while true do if script.Parent.HotOn.Value==true and(script.Parent.ColdOn.Value==true and(script.Parent.Plugged.Value==true and water.Scale.Y<=.6))then water.Scale=water.Scale+Vector3.new(0,.01,0)water.Offset=Vector3.new(0,water.Scale.Y/2,0)hotWater=hotWater+1 coldWater=coldWater+1 drainSound:Stop()elseif(script.Parent.HotOn.Value==true or script.Parent.ColdOn.Value==true)and(script.Parent.Plugged.Value==true and water.Scale.Y<=.6)then water.Scale=water.Scale+Vector3.new(0,.01,0)water.Offset=Vector3.new(0,water.Scale.Y/2,0)if script.Parent.HotOn.Value==true then hotWater=hotWater+1 else coldWater=coldWater+1 end drainSound:Stop()elseif(script.Parent.HotOn.Value==true or script.Parent.ColdOn.Value==true)and(script.Parent.Plugged.Value==false and water.Scale.Y<=.6)then if script.Parent.HotOn.Value==true then coldWater=coldWater-1 else hotWater=hotWater-1 end drainSound:Stop()elseif(script.Parent.HotOn.Value==false and script.Parent.ColdOn.Value==false)and(script.Parent.Plugged.Value==false and water.Scale.Y>0)then water.Scale=water.Scale+Vector3.new(0,-0.01,0)water.Offset=Vector3.new(0,water.Scale.Y/2,0)coldWater=coldWater-1 hotWater=hotWater-1 drainSound.TimePosition=0 drainSound:Play()end if coldWater<1 then coldWater=1 end if hotWater<1 then hotWater=1 end waterTemp=hotWater/coldWater if waterTemp>1 then water.Parent.SteamEmitter.Enabled=true else water.Parent.SteamEmitter.Enabled=false end wait(.1)if script.Parent.ColdOn.Value==true or script.Parent.HotOn.Value==true then script.Parent.Splash.ParticleEmitter.Enabled=true else script.Parent.Splash.ParticleEmitter.Enabled=false end if water.Scale.Y<=0 then drainSound:Stop()end end


while true do
	if script.Parent.HotOn.Value == true and script.Parent.ColdOn.Value == true and script.Parent.Plugged.Value == true and water.Scale.Y <= 0.6 then -- if BOTH ON and PLUGGED
		water.Scale = water.Scale + Vector3.new(0, 0.01, 0)
		water.Offset = Vector3.new(0, water.Scale.Y/2, 0)
		hotWater = hotWater + 1
		coldWater = coldWater + 1
		drainSound:Stop()
	elseif (script.Parent.HotOn.Value == true or script.Parent.ColdOn.Value == true) and script.Parent.Plugged.Value == true and water.Scale.Y <= 0.6 then -- if ON and PLUGGED
		water.Scale = water.Scale + Vector3.new(0, 0.01, 0)
		water.Offset = Vector3.new(0, water.Scale.Y/2, 0)
		if script.Parent.HotOn.Value == true then
			hotWater = hotWater + 1
		else
			coldWater = coldWater + 1
		end
		drainSound:Stop()
	elseif (script.Parent.HotOn.Value == true or script.Parent.ColdOn.Value == true) and script.Parent.Plugged.Value == false and water.Scale.Y <= 0.6 then -- if ON and NOT PLUGGED
		if script.Parent.HotOn.Value == true then
			coldWater = coldWater - 1
		else
			hotWater = hotWater - 1
		end
		drainSound:Stop()
	elseif (script.Parent.HotOn.Value == false and script.Parent.ColdOn.Value == false) and script.Parent.Plugged.Value == false and water.Scale.Y > 0 then -- if NOT ON and NOT PLUGGED
		water.Scale = water.Scale + Vector3.new(0, -0.01, 0)
		water.Offset = Vector3.new(0, water.Scale.Y/2, 0)
		coldWater = coldWater - 1
		hotWater = hotWater - 1
		drainSound.TimePosition = 0
		drainSound:Play()
	end

	if coldWater < 1 then
		coldWater = 1
	end
	if hotWater < 1 then
		hotWater = 1
	end

	waterTemp = hotWater/coldWater

	if waterTemp > 1 then
		water.Parent.SteamEmitter.Enabled = true
	else
		water.Parent.SteamEmitter.Enabled = false
	end
	wait(0.1)

	if script.Parent.ColdOn.Value == true or script.Parent.HotOn.Value == true then
		script.Parent.Splash.ParticleEmitter.Enabled = true
	else
		script.Parent.Splash.ParticleEmitter.Enabled = false
	end

	if water.Scale.Y <= 0 then
		drainSound:Stop()
	end
end
