I need help with a little code entry pad.

OK, i will do,

also i added:

  if(y > 3){
    for(x=0;x<1;x++){
      attempt[x] = 0;
    }
    y=0;
  }

so if you go over 2 presses, it goes back to start.