I need help with a little code entry pad.

Basically when a button is hit i want the arduino to register it, save it in attempt[]

Then, you need to add a bit more code:
for(x=0; x<9; x++)
{
if(oldstate[ x ] != state[ x ])
{
if(state[ x ] == HIGH) // Was the switch just pressed?
{
attempt[ 0 ] = buttons[ x ]; //Set attempt (Just first index for now) to buttons pressed
time = millis();
}
}
}