all { and } basically have to be spaced out, same for && and ||, your script is not working at all, it's just executing the commands with no logic/condition:
ON *:CONNECT: {
raw CAP REQ :twitch.tv/membership
raw CAP REQ :twitch.tv/commands
raw CAP REQ :twitch.tv/tags
}
raw USERNOTICE:*:{
if ($1 == #averagemark) && ($findtok(resub sub,$msgtags(msg-id).key,32)) {
var %emot averag3Sip nickmercsLG nickmercsSUB
describe $1 THANK YOU $iif($msgtags(display-name).key,$v1,$msgtags(login).key) FOR [ $iif($v1 == 2,SUBSCRIBING!! Welcome to the AVGFAM!! %emot,THE $msgtags(msg-param-months).key MONTHS IN A ROW! %emot $iif($0 != 1,Left a note: $qt($2-))) ]
}
}
I took the liberty to rewrite your script shorter since it's doing the same thing everywhere, if you understand $iif you shouldn't have much troubles understanding it, I added %emot so that you can just edit that variable to apply the emote to all cases, this is untested but should work..