errors, errors and more errors

  if (analogRead(sensorpin) >= || == 500) {

You have two operators in a row without an expression between, so its saying it expected an expression.

  (brightness2 = 255; brightness2 >=0; brightness2 -= 3)

You are missing the keyword 'for', so its completely confused.