If I understand correctly, you are simply wanting to reward points based on the number of bits cheered, and the actual emote used to cheer is irrelevant? If that's the case, it seems like it would be much easier to just use message tags. Also, your current script can be easily exploited by anyone "faking cheers" by simply typing the cheer's in the chat even though they do not have any bits.

I'm not sure if you have message tags enabled already, if not, you will need to manually activate them. It doesn't hurt to enable "commands" and "membership" either while you're at it:

Code:
ON *:CONNECT: IF ($server == tmi.twitch.tv) CAP REQ :twitch.tv/commands twitch.tv/tags twitch.tv/membership


After making sure that you have message tags enabled, the script used would be as simple as the following:

Code:
ON *:TEXT:*:#: {
  IF ($msgtags(bits).key) {
    msg $chan thanks for the $msgtags(bits).key cheers!
    ;do other stuff here like writeini
  }
}