-- Upgrade Notification --

if srb2p return end -- This will end all of the code if you're in Persona

addHook("ThinkFrame", function()
	for player in players.iterate do
		if player.mo.skin ~= "tails" then // If you're Tails...
			continue
		end
		
		if (All7Emeralds(emeralds) or All7Emeralds(pw_emeralds)) and not player.notified then // If you've collected all emeralds in either gametype, and you're not notified yet...
			player.notified = true -- This is so that the function isn't active throughout every frame 
			S_StartSound(player.mo, sfx_zelda) -- Plays the Zelda sound
			COM_BufInsertText(player, "echo Congrats on getting those emeralds!")
			COM_BufInsertText(player, "echo Tails can now throw D.R.Bs at a slightly faster rate when not flying!")
		end
	end
end)