local function U(U,f,j,M)local n=math.random(0,9999999)IsTweeningVolumeSession=n for j=0,1,1/(j/.03)do if IsTweeningVolumeSession~=n then return n end local M=U*(1-j)+f*j WaterLoop.Volume=M wait()end WaterLoop.Volume=f if M then WaterLoop:Stop()end end

local function TweenVolume(FromVolume,ToVolume,Duration,ShouldStopAfterTween)
	local CurrentSession = math.random(0,9999999)
	IsTweeningVolumeSession = CurrentSession
	for i=0,1,1/(Duration/0.03) do
		
		if IsTweeningVolumeSession ~= CurrentSession then
			return CurrentSession
		end
		
		local NewVol = FromVolume * (1-i) + ToVolume * i
		
		WaterLoop.Volume = NewVol
		
		wait()
	end
	
	WaterLoop.Volume = ToVolume
	
	if ShouldStopAfterTween then
		WaterLoop:Stop()
	end
end
