So to sum it up i have the following code in a channel on Twitch
Code:
raw USERNOTICE:*:{
  if (($msgtags(msg-id).key == sub) && ($msgtags(room-id).key == 30084163)) {
    var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
    var %sub-plan $replace($msgtags(msg-param-sub-plan).key, 1000, $chr(36) $+ 4.99, 2000, $chr(36) $+ 9.99, 3000, $chr(36) $+ 24.99, Prime, Prime)
    msg $1 /me agonySUB NEW SUB!! agonySUB Thank You %nick For Subscribing With A %sub-plan Sub! Welcome To The Legends! agonyHYPERS bingAw
    
  }
if (($msgtags(msg-id).key == resub) && ($msgtags(room-id).key == 30084163)) {
    var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
    VAR %sub-plan $replace($msgtags(msg-param-sub-plan).key, 1000, $chr(36) $+ 4.99, 2000, $chr(36) $+ 9.99, 3000, $chr(36) $+ 24.99, Prime, Prime) 
    msg $1 /me bingAw RESUB!! rooAww %nick Has Just Resubscribed For $msgtags(msg-param-months).key Months In A Row With A %sub-plan Sub! Welcome Back To The Legends! bingAw rooAww
    
  }
if (($msgtags(msg-id).key == subgift) && ($msgtags(room-id).key == 30084163)) {  
    var %nick_from $iif($msgtags(display-name).key, $v1, $msgtags(login).key) , %nick_to $iif($msgtags(msg-param-recipient-display-name).key, $v1, $msgtags(msg-param-recipient-user-name).key)
    VAR %sub-plan $replace($msgtags(msg-param-sub-plan).key, 1000, $chr(36) $+ 4.99, 2000, $chr(36) $+ 9.99, 3000, $chr(36) $+ 24.99)
    msg $1 /me rooGift GIFTED SUB!! rooGift Thank you %nick_from For Gifting A %sub-plan Sub To %nick_to $+ ! Welcome To The Legends! rooGift rooGift
    
  }

And it works perfectly at announcing subs but the problem is it doesnt announce mass gifted sub. For example last night someone gifted 40 subs and my bot only announced 30. Any help?