The window is only for debug purposes while you figure out what your problem is. Your existing script does nothing except monitor the USERNOTICE raw event, ignoring all USERNOTICE with the wrong room id value. Then it looks to see if $msgtags(msg-id).key matches any of the 3 strings "sub" "resub" "gift". If it shows the red message, then that latest message either did not fill this identifier with a value, or it filled it with a different value. The debug message begins showing the $msgtags(msg-id).key string, so it's either empty or an unknown 4th string.

If you're worried about your own spamming, you can try checking the "own messages" box in tools/options/irc/flood, which should hopefully delay your messages to avoid being dinged for flooding.

The purpose of this window is to identify messages that should have been sent but were not. It might also help for the @SUB window to also see the entire USERNOTICE. It might work to do this, I don't know since I don't use twitch. For the line following the existing echo to @Subs could be another line:

echo @Subs USERNOTICE: $1-