Need some help with alternating fading LEDs

I currently have the code so that whenever the arduino gets power the “normal mode” is automatically on where all red LEDs fade within 500ms from off to off and whenever i press the button it switches mode where the rear red LEDs and the front green LEDs flash at the same speed as normal mode the problem i have is that i need to have the green and rear red LEDs alternating but still take the same amount of time to go through both fades as the first mode this is my code:

int aPin = A0;        // LDR sensor
int FLredLED = 5;     // Front left red led
int FRredLED = 6;     // Front right red led
int RLredLED = 7;     // Rear left red led
int RRredLED = 8;     // Rear right red led
int FLgreenLED = 4;   // Front left green led
int FRgreenLED = 3;   // Front right green led
int RLED = 22;        // Red portion of RGB led
int GLED = 24;        // Green portion of RGB led
int BLED = 26;        // Blue portion of RGB led
int brightness = 0;   // how bright the LED is
int fadeAmount = 5;   // how many points to fade the LED by

unsigned long previousMillis = 0;
unsigned long previousMillis2 = 0;
long IntervalMode1 = 5;
long IntervalMode2 = 4;

int buttonPin = 2;   
int buttonState = 0;
boolean on=false;
int switchState = 0;




void setup() {
  
  pinMode(FLredLED, OUTPUT);
  pinMode(FRredLED, OUTPUT);
  pinMode(RLredLED, OUTPUT);
  pinMode(RRredLED, OUTPUT);
  pinMode(RLED, OUTPUT);
  pinMode(GLED, OUTPUT);
  pinMode(BLED, OUTPUT);
  
  pinMode(FLgreenLED, OUTPUT);
  pinMode(FRgreenLED, OUTPUT);

  pinMode(buttonPin, INPUT);
  
  Serial.begin(9600);

}

void loop() {
  
  int val = analogRead(aPin);
Serial.println(val);


if (val<750){
digitalWrite(RLED,HIGH);
digitalWrite(GLED,HIGH);
digitalWrite(BLED,HIGH);
}else{
digitalWrite(RLED,LOW);
digitalWrite(GLED,LOW);
digitalWrite(BLED,LOW);
}

buttonState = digitalRead(buttonPin); // latch switch code for the button on the breadboard to prevent bouncing and bad connections 
if (buttonState == HIGH) {    
  if(on==true){
  on=false;
}  else{
   on=true;
     }
}


if(on == false){
unsigned long currentMillis = millis(); // grab current time

analogWrite(FLredLED, brightness);// set the brightness of ledPin:
analogWrite(FRredLED, brightness);
analogWrite(RLredLED, brightness);
analogWrite(RRredLED, brightness);
digitalWrite(FLgreenLED,LOW);
digitalWrite(FRgreenLED,LOW);


if (currentMillis - previousMillis >= IntervalMode1){
    brightness = brightness + fadeAmount;     // change the brightness for next time through the loop:
    previousMillis = millis();
  }
 
if (brightness <= 0 )
  { // reverse the direction of the fading at the ends of the fade:
    brightness = 0;
    fadeAmount = -fadeAmount;
  }
    if (brightness >=255 )
  { // reverse the direction of the fading at the ends of the fade:
    brightness = 255;
    fadeAmount = -fadeAmount;
  }
 }
 else if(on == true){
 unsigned long currentMillis = millis(); // grab current time
  
    digitalWrite(FLredLED, LOW);// set the brightness of ledPin:
    digitalWrite(FRredLED, LOW);
    analogWrite(RLredLED, brightness);
    analogWrite(RRredLED, brightness);
    analogWrite(FLgreenLED, brightness);
    analogWrite(FRgreenLED, brightness);

 if (currentMillis - previousMillis2 >= IntervalMode2){
    brightness = brightness + fadeAmount;     // change the brightness for next time through the loop:
    previousMillis = millis();
  }
 
if (brightness <= 0 )
  { // reverse the direction of the fading at the ends of the fade:
    brightness = 0;
    fadeAmount = -fadeAmount;
  }
    if (brightness >=255 )
  { // reverse the direction of the fading at the ends of the fade:
    brightness = 255;
    fadeAmount = -fadeAmount;
  }   
 }
}

I also have an LDR sensor which controls the RGB LED but you dont need to worry about that bit just ignore it.

if anyone has any suggestions that would be amazing thank you

Other post/duplicate DELETED
Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.

Continued cross posting could result in a time out from the forum.

Could you take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum in the future.
Other general help and troubleshooting advice can be found here.