reversing relays output

Hi guys very new to the world of Arduino and have had a lot of help from this forum regarding my project.
I'm happy my project is now working but having trouble hooking it up to a relay board. when i do the lights on the board are opposite to what i want it to do.
I think i need to pull the pins LOW but am unsure what code or where to put it. Please don't roast me I'm still learning and any help would be appreciated.

// Pin 13 onboard red LED
// Pin 9 onboard green LED
// Pin 2 button/switch.
// Pin 4 Air solenoid
unsigned long airStart, flashStart; // timers
const unsigned long airInterval = 330000, // 5 minutes + 30 secs
                    flashInterval = 300;
const int airEnd = 30000, // 10 seconds
          flashEnd = 100; // red ON time
bool oldButton = true;
byte counter; // flash counter
int red = 13;
int green = 9;
int button = 2;
int Air = 4;

////////////////////////////////////////////////////
void setup() {
  // initialize the digital pin as an output.
  pinMode(red,OUTPUT);
  pinMode(green,OUTPUT);
  pinMode(button, INPUT_PULLUP);
  pinMode(Air, OUTPUT);
}

void loop()

{
  digitalWrite(Air,millis() - airStart < airEnd);
  if(millis() - airStart > airInterval)
    airStart += airInterval; // reset Air timer
    
  digitalWrite(green,oldButton);
    
  if(digitalRead(button) == LOW && oldButton == true){
    oldButton = false;
    flashStart = millis();
  }
  if(oldButton == false){
    digitalWrite(red,millis() - flashStart < flashEnd);
    if(millis() - flashStart > flashInterval){
      flashStart += flashInterval; // reset flash timer
      if(++counter >= 3 ){ // number of flashes 
        counter = 0; // reset flash counter
        oldButton = true;
      }  
    }  
  }  
}

Please provide a schematic as Its very difficult to see how your code will effect the electronics without this

I'm using a 4 relay module board but the led light on the relay board is coming on when i want it off.
this is happening with the three relays i'm trying to use.
basically i need them in reverse.

Well without seeing the schematic my best guess would be to invert the logic so

digitalWrite(green,oldButton);

becomes

digitalWrite(green,!oldButton);

so whenever you write oldButton invert it with !

This is the board i'm using and have arduino pin 13 conected to in1 arduino pin9 toin2 arduino pin5volt to vcc on relay board

I still cant help you much further without a schematic and I dont know whats connected to where in your ciruict!

// Pin 13 onboard red LED
// Pin 9 onboard green LED
// Pin 2 button/switch.
// Pin 4 Air solenoid

Your code also has no indication of which pin is the relay.... I would assume the air solenoid

 digitalWrite(red,millis() - flashStart < flashEnd);

Not sure what this is achieving as digitalWrite can only write 1(HIGH) or 0(LOW)

similar problem here

digitalWrite(Air,millis() - airStart < airEnd);

Not sure what this is achieving as digitalWrite can only write 1(HIGH) or 0(LOW)

Just write the result of a logic equation to an output pin which results in true/false and hence 1/0

And @Acjgrant, to reverse the logic, you can e.g. change '<' to '>='

do i need to connect a resistor between the pin out and relay board in?

This post by @dlloyd contains a diagram how to connect a relay shield to the Arduino