freeslot("sfx_kabuem")
sfxinfo[sfx_kabuem] = {
        singular = false,
        priority = 1,
        flags = SF_NOMULTIPLESOUND
}
sfxinfo[sfx_kabuem].caption = "Please deposit 5 coins"

		
addHook("ThinkFrame", do
	for player in players.iterate
		if player.mo and player.mo.skin == "universe"
			if not player.exiting
				if not (P_PlayerInPain(player) or (P_IsObjectOnGround(player.mo) or (player.panim == PA_ABILITY2) or (player.mo.state == S_PLAY_PAIN) and not(player.powers[pw_super]))) //states in which yeets cannot be done
					if (player.cmd.buttons & BT_TOSSFLAG)
					 player.weapondelay = TICRATE*4
						if player.rings > 99
						    player.mo.state = S_PLAY_BALANCED
							P_SwitchShield(player, SH_ARMAGEDDON)
							P_SwitchShield(player, SH_ARMAGEDDON)
					        P_FlashPal(player, PAL_WHITE, 0)
							P_SwitchShield(player, SH_NONE)							
							CONS_Printf(player, "Perfectly balanced as all things should be!")
							chatprint("[Snap!] Someone just snapped their fingers!", sfx_kabuem)
							P_GivePlayerRings(player, -100)
							P_RadiusAttack(player.mo, player.mo,99999*FRACUNIT + 99999*FRACUNIT + 99999*FRACUNIT + 99999*FRACUNIT + 99999*FRACUNIT + 99999*FRACUNIT + 99999*FRACUNIT + 99999*FRACUNIT + 99999*FRACUNIT + 99999*FRACUNIT + 99999*FRACUNIT + 99999*FRACUNIT + 99999*FRACUNIT + 99999*FRACUNIT + 99999*FRACUNIT + 99999*FRACUNIT, DMG_INSTAKILL, false)
							P_GivePlayerLives(player, -99)
							P_GivePlayerLives(player, 3)							
						else
							S_StartSound(player.mo, sfx_kabuem)
						end
					end
				end
			end
		end
	end
end)