-- 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 ~= "flchan" then // If you're FL Chan...
			continue
		end
		
		if (All7Emeralds(emeralds)) and not player.flnotified then // If you've collected all emeralds and you're not notified yet...
			player.flnotified = 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, "cechoduration 5")
			COM_BufInsertText(player, "cecho Congrats on getting those emeralds!\\ Check the console for more info on\\ FL Chan's upgrades!")
			print("\x83\FL Chan Emerald Upgrades:", "\x87\Slow Fall: \x80\You can now perform this ability multiple times per jump. Swimming will remain unaffected.", "\x87\Mic Drop: \x80\Mics will now create larger shockwaves and you'll now gain extra height when using this ability in midair.", "\x87\Kaboom Box: \x80\Kaboom Boxes will now larger sound blasts when detonated manually and you'll now be sent higher in the air when jumping on the Kaboom Box.")
		end
	end
end)