Need help with tweaking

just as the subject states I kind of need help
the device is for a rocket launch base panel for my kid brother "don't worry I practice safety hence this forum plus I plan on using led's before launching rockets"anyway as I was checking the code I hit a snag you see this code is for a wireless launcher which is cool
but I want it to be a "wired base" mainly because I cannot afford the X-bee set used for this project
so here's what I wanted to do using pushbuttons that can be used to control these functions
for example I have a cover switch which can be the launcher button and perhaps remove the armed command because of this and as for the servos have seprate buttons to set the pad in place or simply go 180 when pressed once and go to zero when pressed again

I would attempt this my self but a personal matter has came up and I would like to finish this project by the time he returns from the hospital any and all help is welcomed

#include <Servo.h>

Servo pan, tilt;
byte data[4];
byte armed=0, pitch=0, rotation=0;
unsigned long cache;

void setup() 
{
  pan.attach(6);                //servos here
  tilt.attach(7);
  Serial.begin(9600);
  pinMode(8, OUTPUT);      //output leds
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(11, OUTPUT);
  rotation = 90;
}

void loop() {
  if(cache=Serial.available() > 0){
    data[3] = data[2]; data[2] = data[1]; data[1] = data[0]; data[0] = Serial.read();
    if(data[3] == '<' && (data[1] == data[0]) ){
      switch(data[2]){
        case 'f': armed = data[1]; break;
        case 'p': pitch = data[1]; break;
        case 'r': rotation = data[1]; break;
      }
    }
    if(cache > 100){
      Serial.flush();
      data[0] = 0; data[1] = 0; data[2] = 0; data[3] = 0;
    }
  }
  
  tilt.write(pitch);
  pan.write(rotation);
  if(armed & 0x01) digitalWrite(8, HIGH);
  else digitalWrite(8, LOW);
  if(armed & 0x02) digitalWrite(9, HIGH);
  else digitalWrite(9, LOW);
  if(armed & 0x04) digitalWrite(10, HIGH);
  else digitalWrite(10, LOW);
  if(armed & 0x08) digitalWrite(11, HIGH);
  else digitalWrite(11, LOW);
  
}

Its really hard to guess what you want your code to do from that description. Can you describe your hardware, what exactly what you want to happen, and how the code is failing to do that?

Please use sentences: individual sentences aid comprehension.

Sorry about that, I was in a rush. :blush:
The hardware is an arduino uno and assorted push buttons.
What I'm attempting with this project is to be operated by push buttons, because I cannot afford the X-bee wireless system. What I mean by operation by push buttons is this:

When I press the launch button I can launch a rocket, repeated presses launches remaining rockets four in total.

The code also has commands for operating servos (two) which I want to operate each with a push button as well.

How so, when I press the servo button the servo rotates 180 Degrees, when pressed again the servo returns to 0 degrees.

I hope you can understand what I mean now

Sigma-x:
I would attempt this my self but a personal matter has came up and I would like to finish this project by the time he returns from the hospital

Probably best to ask on the 'gigs and collaborations' forum if you're asking for somebody to help you write the code.

thanks for the help