alarm with code

Im trying to build a alarm with a relay, sensor and pushbuttons. I am trying to modify another code I found on the internet to turn on the alarm 15 seconds after the sensor is triggered, and it to turn off if you press buttonA buttonB buttonB and buttonA in that order. I can't figure out how I should write the buttonA, B, B, A code and I can't figure out how to write the 15 second delay thing. Feel free to edit the code. My code is,

int inPinA = 7;
int inPinB = 8;
int relayPin = 2;
int sensorPin = 12;

int state = HIGH;
int reading;
int previous = LOW;

long time = 0;
long debounce = 200;

void setup()
{
pinMode(sensorPin, INPUT);
pinMode(relayPin, OUTPUT);
if(
pinMode(inPinA, INPUT)
pinMode(inPinB, INPUT){
pinMode(relayPin, LOW)
}
}

void loop()
{
reading = digitalRead(inPin??);
if (reading == HIGH && previous == LOW && millis() - time > debounce) {
if (state == HIGH)
state = LOW;
else
state = HIGH;

time = millis();
}

digitalWrite(relayPin, state);

previous = reading;
}

am trying to modify another code I found on the internet to turn on the alarm....

You can't get there from here.
You need to start again.
You need to read the how to use the forum sticky post.
You need to learn how to code at least the fundamentals.
When you get stuck on that last one we are here to help with your specific problems.

What you are saying is in effect, "I found some bread how can I turn that into Christmas dinner"

lol, still nice with help

Made a simpler code, it won't have a a b b a code to turn the siren off... Still getting error messages...

int inPin1 = 7;
int inPin2 = 8;
int relayPin = 12;
int sensorPin = 2;
void setup() {

}

void loop() {
pinMode(sensorPin, INPUT);
pinMode(inPin1, INPUT);
pinMode(inPin2, INPUT);
pinMode(relayPin, OUTPUT);
if (pinMode(sensorPin, HIGH));
{
pinMode(relayPin, HIGH);
}
if (pinMode(inPin1, HIGH));
{
pinMode(relayPin, LOW);
}
if (pinMode(inPin2, HIGH));
{
pinMode(relayPin, HIGH);
}
else
pinMode(relayPin, LOW);
}

Ok let me try again,
Please read this:-
How to use this forum
Because your post is breaking the rules about posting code.

Now you are having a lot of trouble understanding what code actually does. The pinMode call sets a pin to be an input or an output. You do this once only in the setup function.

To see what value is on an input pin you use the digitalRead call NOT the pinMode call.
To set a value on an output pin you use the digitalWrite call NOT the pinMode call.

When using an if statement do not end it in a ; if you want to do anything with the results of the if.
When using an if statement you have to do some sort of comparison and equals is done with a double equals sign ==

Here is your code corrected, that is it does not produce any compile errors, it is not to say it does what you want but at least the compiler can understand your code.

int inPin1 = 7;
int inPin2 = 8;
int relayPin = 12;
int sensorPin = 2;
void setup() {
   pinMode(sensorPin, INPUT);
  pinMode(inPin1, INPUT);
  pinMode(inPin2, INPUT);
  pinMode(relayPin, OUTPUT);
}

void loop() {
  if (digitalRead(sensorPin) == HIGH)
  {
    digitalWrite(relayPin, HIGH);
  }
  if (digitalRead(inPin1 )== HIGH)
  {
    digitalWrite(relayPin, LOW);
  }
  if (digitalRead(inPin2) == HIGH)
  {
    digitalWrite(relayPin, HIGH);
  }
else
digitalWrite(relayPin, LOW);
}

Note the way this is written, then no matter what the other code above the last if statement does, unless inPin2 is high then the value on the relay pin will ALWAYS be low.