Trouble with coding to make output go high for certain barcode being scanned

I'm scanning a barcode, so the "key being pressed" is actually the values of the barcode.

You are scanning barcodes to write your code? Bullshit!

 if (key[30] == "4848484919")

The pointer in the 30th element of the array of pointers is NEVER going to equal that string literal.

You might consider doing some research concerning strcmp().

It is not at all clear how the array of pointers (key) is ever populated. It is not clear why you think the 30th element of that array of pointers points to the value you are testing for.

Frankly, I think that the comment made by the fox to Pinocchio ("You're going a little too fast and in the wrong direction") applies here.

Edit: By the way, the characters that the serial monitor shows bear little relationship to the VALUES sent to it in some cases. The VALUE you are sending is '0' or '1', but the fact that you send it via a non-char variable causes the serial monitor to show "48" or "49". You can't compare '0' to "48" and expect to be told that they match. You can compare '0' to 48 and see that they match.