problems with a secuencial lights

im new in this forum , i really want some help to this program, i want to put 3 inputs and when each combination of inputs its different my 6 lights will turn on in different secuency,
my problem its when i put in high my signal (freno) , im sorry if my english its poor.
pd: i put my code below, thankyou in advance

 int DERECHA = 4;
 int IZQUIERDA = 5;
 int FRENO = 6;
 


void setup() {

  pinMode(DERECHA,INPUT);
  pinMode(IZQUIERDA,INPUT);
  pinMode(FRENO,INPUT);
  pinMode(7,OUTPUT);
  pinMode(8,OUTPUT);
  pinMode(9,OUTPUT);
  pinMode(10,OUTPUT);
  pinMode(11,OUTPUT);
  pinMode(12,OUTPUT);
 

}

void loop() {

 if(digitalRead(DERECHA)==HIGH && digitalRead(IZQUIERDA)==LOW && digitalRead(FRENO)==LOW)
 {
  digitalWrite(10,HIGH);
  delay(350);
  digitalWrite(11,HIGH);
  delay(350);
  digitalWrite(12,HIGH);
  delay(350);
  digitalWrite(10,LOW);
  digitalWrite(11,LOW);
  digitalWrite(12,LOW);
  delay(350);


  
 }
  if(digitalRead(DERECHA)==LOW && digitalRead(IZQUIERDA)==HIGH && digitalRead(FRENO)==LOW)
 {
  digitalWrite(9,HIGH);
  delay(350);
  digitalWrite(8,HIGH);
  delay(350);
  digitalWrite(7,HIGH);
  delay(350);
  digitalWrite(9,LOW);
  digitalWrite(8,LOW);
  digitalWrite(7,LOW);
  delay(350);
}


if(digitalRead(DERECHA)==HIGH && digitalRead(IZQUIERDA)==LOW &&  digitalRead(FRENO)==HIGH)
{
  digitalWrite(10,HIGH);
  delay(350);
  digitalWrite(11,HIGH);
  delay(350);
  digitalWrite(12,HIGH);
  delay(350);
  digitalWrite(10,LOW);
  digitalWrite(11,LOW);
  digitalWrite(12,LOW);
  delay(350);
  digitalWrite(9,HIGH);
  digitalWrite(8,HIGH);
  digitalWrite(7,HIGH);
  
}
else
{
  digitalWrite(9,LOW);
  digitalWrite(8,LOW);
  digitalWrite(7,LOW);
}

if(digitalRead(DERECHA)==LOW && digitalRead(IZQUIERDA)==HIGH && digitalRead(FRENO)==HIGH)
{
  digitalWrite(9,HIGH);
  delay(350);
  digitalWrite(8,HIGH);
  delay(350);
  digitalWrite(7,HIGH);
  delay(350);
  digitalWrite(9,LOW);
  digitalWrite(8,LOW);
  digitalWrite(7,LOW);
  delay(350);
  digitalWrite(10,HIGH);
  digitalWrite(11,HIGH);
  digitalWrite(12,HIGH);
  
}
else
{
  digitalWrite(10,LOW);
  digitalWrite(11,LOW);
  digitalWrite(12,LOW);
}

if(digitalRead(DERECHA)==HIGH && digitalRead(IZQUIERDA)==HIGH && digitalRead(FRENO)==LOW)
{
  digitalWrite(9,HIGH);
  digitalWrite(10,HIGH);
  delay(350);
  digitalWrite(8,HIGH);
  digitalWrite(11,HIGH);
  delay(350);
  digitalWrite(7,HIGH);
  digitalWrite(12,HIGH);
  delay(350);
  digitalWrite(7,LOW);
  digitalWrite(8,LOW);
  digitalWrite(9,LOW);
  digitalWrite(10,LOW);
  digitalWrite(11,LOW);
  digitalWrite(12,LOW);
  delay(350);
}

if(digitalRead(FRENO)==HIGH && digitalRead(DERECHA)==LOW && digitalRead(IZQUIERDA)==LOW)
{
  digitalWrite(7,HIGH);
  digitalWrite(8,HIGH);
  digitalWrite(9,HIGH);
  digitalWrite(10,HIGH);
  digitalWrite(11,HIGH);
  digitalWrite(12,HIGH);
  
}
else
{
  digitalWrite(7,LOW);
  digitalWrite(8,LOW);
  digitalWrite(9,LOW);
  digitalWrite(10,LOW);
  digitalWrite(11,LOW);
  digitalWrite(12,LOW);
}

}

How are the buttons wired? It's usually easier to wire the buttons to ground and use INPUT_PULLUP mode. Then a "pressed" button will read as LOW.

Your code spends a lot of time in delays. As soon as one of the HIGH/LOW/LOW combinations becomes true, it starts a sequence which takes more than 1 second to finish. During that time it is not looking at any inputs.

i put the buttons in physical pulldown with 10k resistors, im trying to put this in a car for the turn signal lights,so you recommended me that i use input pullup?

so you recommended me that i use input pullup?

Not it you are already using external pulldown resistors.

Get rid of all the code that is performed when a switch is pressed. Verify that you can detect each and every switch press correctly.

Then, add code back in. But, you must be aware, as MorganS mentioned, that your code will NOT be very responsive to the switch presses, since it is NOT reading the switches during the delay()s.

PaulS:
Not it you are already using external pulldown resistors.

Get rid of all the code that is performed when a switch is pressed. Verify that you can detect each and every switch press correctly.

Then, add code back in. But, you must be aware, as MorganS mentioned, that your code will NOT be very responsive to the switch presses, since it is NOT reading the switches during the delay()s.

ok, let me check my switches maybe i have the problem in there thank you