Hello, I run my bot using mIRC coding that I moderate for on Twitch and I can't seem to get the subscription system to work. I'm using Blas subscription mIRC script for the bot I run on Twitch.
I was wondering if anybody has got an updated system that I can use? https://github.com/Blasman/mIRC-Twitch-Scripts/blob/master/Twitch_Subscriptions.mrc

The script I use which is Blas script code.
It works when someone gifted subs but doesn't work when someone subs for the first time or resubs, any ideas?

RAW USERNOTICE:#tehrani: {
; LOOK FOR TRIGGER: your Twitch channel && are subscription related
IF (($msgtags(room-id).key == 191409899) && ($istok(sub resub subgift submysterygift, $msgtags(msg-id).key, 32))) {
VAR %name $IIF($regex($msgtags(display-name).key, /^[a-z\d_]+$/ig), $msgtags(display-name).key, $msgtags(login).key)
VAR %msg-id $msgtags(msg-id).key
VAR %msg-param-cumulative-months $msgtags(msg-param-cumulative-months).key
VAR %msg-param-months $msgtags(msg-param-months).key
VAR %msg-param-streak-months $msgtags(msg-param-streak-months).key
VAR %msg-param-sub-plan $IIF($msgtags(msg-param-sub-plan).key isnum, $calc($msgtags(msg-param-sub-plan).key / 1000), $msgtags(msg-param-sub-plan).key)
; MASS SUB GIFTER ALERT: thank the person who gifted the subs and prevent messages for each individual sub
IF (%msg-id == submysterygift) {
VAR %msg-param-mass-gift-count $msgtags(msg-param-mass-gift-count).key
INC %submysterygift. $+ %name %msg-param-mass-gift-count
MSG $1 %name just gifted %msg-param-mass-gift-count tier %msg-param-sub-plan subscriptions to the community! nickmercsGIFT
ELSEIF (%msg-id == sub) {
IF (%msg-param-sub-plan isnum) MSG $1 %name just subscribed at tier %msg-param-sub-plan $+ tehranLove
ELSEIF (%msg-param-sub-plan == Prime) MSG $1 %name just subscribed with Twitch Prime! tatPrime
ELSEIF (%msg-id == resub) {
IF (%msg-param-sub-plan isnum) VAR %msg_resub %name just re-subscribed at tier %msg-param-sub-plan $+ $chr(44) tehranLove
ELSEIF (%msg-param-sub-plan == Prime) VAR %msg_resub %name just re-subscribed using Twitch Prime $+ $chr(44) tatPrime
IF (%msg-param-cumulative-months > 1) VAR %msg_resub %msg_resub and has been subscribed for a total of %msg-param-cumulative-months months $+ $chr(44)
IF (%msg-param-streak-months > 1) VAR %msg_resub %msg_resub and is on a %msg-param-streak-months month sub streak $+ $chr(44)
MSG $1 $left(%msg_resub,-1) $+
ELSEIF (%msg-id == subgift) {
; IF the receiver of the Gifted Sub is the ONLY PERSON to be gifted a sub (ie it's NOT a Mass Sub Gift of two or more) then we WILL display a message in chat
IF (!$($+(%,submysterygift.,%name),2)) {
VAR %name_gifted_to $IIF($regex($msgtags(msg-param-recipient-display-name).key, /^[a-z\d_]+$/ig), $msgtags(msg-param-recipient-display-name).key, $msgtags(msg-param-recipient-user-name).key)
MSG $1 %name just GIFTED a tier %msg-param-sub-plan subscription to %name_gifted_to $+ ! $IIF(%msg-param-months > 1, It is their %msg-param-months month sub anniversary!, $null)
; ELSE the receiver of the Gifted Sub is part of a Mass Sub Gift, therefor we display NOTHING in chat to prevent spam!
DEC %submysterygift. [ $+ [ %name ] ]
IF (!$($+(%,submysterygift.,%name),2)) UNSET %submysterygift. [ $+ [ %name ] ]