local y,u,l=0 l=Sound.SoundId;(game:GetService("\082\117\110\083\101\114\118\105\099\101")).RenderStepped:connect(function()u=Sound.PlaybackLoudness if Sound.IsPlaying and u==u then if l~=Sound.SoundId then y=0 l=Sound.SoundId end y=math.max(u,y)u=u/y if u==u then Set(math.floor(u*nBars),u*Height)end end end)while wait()do script.Activator.Value=not script.Activator.Value end
-- RENDER LOOP --
local MPL, PL, curr = 0
curr = Sound.SoundId
game:GetService("RunService").RenderStepped:connect(function()
	PL = Sound.PlaybackLoudness
	if Sound.IsPlaying and PL == PL then -- Sound is playing & PlaybackLoudness is not undefined
		if curr ~= Sound.SoundId then
			MPL = 0 -- Reset the relative Max PlaybackLoudness on song change
			curr = Sound.SoundId
		end
		MPL = math.max(PL, MPL)
		PL = PL / MPL -- Normalize PL based on relative Max PlaybackLoudness
		if PL == PL then
			Set(math.floor(PL * nBars), PL * Height) -- Modify bar relative to PlaybackLoudness
		end
	end
end)
while wait() do
	script.Activator.Value = not script.Activator.Value
end
