Newbie just tsrating, need help with a sketch

OK so there are some details that are important to know

You should let teh Arduino-IDE autoformat the indentions by pressing Ctrl-T.

If opening or closing brackets are missing they are easier to find because of a bracket is missing the indention looks different than it should

const byte LedPins[5] = { 8, 9, 10, 11, 12};

unsigned long previousMillis;
int index = 0;
int updown = +1;      // +1 or -1 for going left and right
int buttonstate = 0;


void setup()
{
  for ( auto a : LedPins)
    pinMode( a, OUTPUT);
    
  pinMode(2 , INPUT_PULLUP);  // activates the internal pull-up resistor
}

void loop ()
{
  if (buttonstate == LOW)
  {
    unsigned long currentMillis = millis();

    if ( currentMillis - previousMillis >= 80)
    {
      previousMillis = currentMillis;

      digitalWrite( LedPins[index], LOW);       // turn old led off
      index += updown;
      digitalWrite( LedPins[index], HIGH);      // turn new led on

      if ( index <= 0 || index >= 4)
        updown = -updown;
    }
  }
  else
  {
  }
}

declaring a variable inside of any brackets makes the variable local isnide these brackets.

  if (buttonstate == LOW)
  {
    unsigned long currentMillis = millis();

in this case outside the brackets the variable currentMillis is unknown
like a only local known singer inspite of a world-star that everybody around the world knows.

a global declaring of a variable is written outside any function and outside any brackets.

If you want to use more than one "timer" in your case you have the 80 milliseconds timer for switching on/of the lamps

and the second timer is the 30-second timer. And this second timer needs his own previousMillis-variable.

That's why I called it previous30SecondMillis .

There has to be a if-condition checking if the button is pressed
and if pressed that does two particular things:

  1. storing a snapshot of millis() in a variable called previous30SecondMillis

the name is program what number did function millis() have when the 30second interval started

  1. setting a global defined boolean variable named "doRunningLight" to true

for the compiler the name is not relevant you could name it "blabla" but this name gives absolutely no hints about the purpose of the variable

The part of the code that does the running-light shall only be exectuted if variable
doRunningLight is true

this means
if (doRunningLight) {
// the lines of code running the light
}

the loop has to have another if-condition that checks for how many seconds have passed by since last buttonpress

if (doRunningLight && currentMillis - previous30SecondMillis > 30000) {
doRunningLight = false
}

as soon as doRunningLight is false the code inside if-condition
if (doRunningLight) is no longer executed

so try to add this to the basic code and analyse the behaviour of your program
It is pretty likely that some details will still be wrong but that's my way of supporting. Giving hints and then practise.

best regards Stefan