Shortest Konami Code

05AB1E, 33 bytes (Fine on Empty Input)

Dg0Qiq}•ï“뙵yê!•36BQi7ç“+30™‹“J,

Try it online!

05AB1E, 30 26 bytes (Fails on Empty Input)

-4 thanks to Adnan

•ï“뙵yê!•36BQi7ç,“+30™‹“,

Try it online!

•ï“뙵yê!•36B                  # UUDDLRLRBABA in base-214, converted back to base-36.
             Qi                # If implicit input is equal to...
               7ç,             # Print 7 converted to a character to the console (bell sound)...
                  “+30™‹“, # Print +30 lives.

Disclaimer: Bell sound does not play on TryItOnline, maybe ask Dennis if one of his servers somewhere is pinging when you run it.


Python 3,  55  53 bytes

-1 byte thanks to isaacg (use bitwise not to replace -10 with ~9).
-1 byte thanks to CalculatorFeline (it is possible to use a literal BEL byte).

while'UUDDLRLRBA'!=input()[~9:]:1
print('+30 lives7')

where the 7 shown above is a literal byte 0x07 (an unprintable in a code block).

Once enter is pressed the while loop condition is checked. If the last ~9 = 10 characters (at most) do not match the Contra command code then the no-op 1 is executed (replacement of pass for brevity); if they do match then the while loop ends and the print statement is executed, which writes the required text along with an ASCII bell character ("alarm"), 0x07, which produces a sound unless it has been explicitly disabled (or the terminal has no speaker!).


JavaScript (ES6), 202 200 198 bytes

Tested only on Chrome and Firefox. Uses UDLR rather than the arrow keys. Please make sure that CapsLock is off.

(o=(A=new AudioContext()).createOscillator()).connect(A.destination);s='';document.onkeyup=e=>{(s+=e.key[0]).slice(-11)=='uuddlrlrbaE'&&setTimeout('o.stop()',500,console.log('+30 lives'),o.start())}
Please click inside this area to make sure it gets focus.