Code:
    if (($msgtags(msg-param-months).key) == 3) {
      msg $1 !bonus $msgtags(display-name).key 500
    }

So for each 3rd month add another 100 .. then you should be able to do this instead of the repeating row of ifs:
Code:
   msg $1 !bonus $msgtags(display-name).key $calc( 500 + 100 * ( $msgtags(msg-param-months).key % 3 ) )


so:
Code:
raw USERNOTICE:*:{
  if ($msgtags(room-id).key == 12665) && (resub isin $msgtags) {
    if (($msgtags(msg-param-months).key) >= 3) {
      msg $1 !bonus $msgtags(display-name).key $calc( 500 + 100 * ( $msgtags(msg-param-months).key % 3 ) )
    }
  }
}