new to Arduino, need help with code.

i am new to this and can't get my led button thing to work

int redLedPin = 9;
int greenLedPin = 10;
int blueLedPin = 11;
int but1 = 7;
int but2 = 2;

void setup() {
  pinMode(redLedPin, OUTPUT);
  pinMode(greenLedPin, OUTPUT);
  pinMode(blueLedPin, OUTPUT);
  pinMode(but1, INPUT);
  pinMode(but2, INPUT);
}

void loop()  {
  if (but1) {HIGH;
  analogWrite(blueLedPin, (0));
  analogWrite(greenLedPin, (0));
  analogWrite(redLedPin, (100));

  delay(500);
}
else if (but2) {HIGH
  ,analogWrite(blueLedPin, (0));
  analogWrite(greenLedPin, (100));
  analogWrite(redLedPin, (0));

  delay(500);
}
else {
  analogWrite(blueLedPin, (100));
  analogWrite(greenLedPin, (0));
  analogWrite(redLedPin, (0));

  delay(500);
}
}

When i turn on my Arduino it just stays on red, buttons don't do anything and it is all pluged in right.
eney segetshins on what is wrong.
plz help.

Check out digitalRead()
Check out how an if statement is constructed
So many (), not enough reasons

Welcome to the forums. Your if() statements are not correct. You need to read the state of the button and then compare that result to HIGH/LOW.

I would suggest you try out a few of the examples in the IDE to start learning. Start with the Blink example and get that working. Then move on to some button examples and get them working with your buttons. Then combine them together.

Also, you did not say how your buttons are wired up. The most common way is to have one side of the button connected to GROUND and the other side connected to an input pin. With that configuration, you have to declare the pin as INPUT_PULLUP, not INPUT. If you are just using INPUT, then you will need to add an external pull-up/pull-down resistor.