If I understood the translation of your idea correctly, then try using this script code:
Code
on *:TEXT:*Thanks, dude*:#test:{

  ;Store the username into a variable using $2 and $3 word tokens separated by spaces
  var %name $2-3

  ;Find the token with the "$" character, separate the digit to the left of the first dot, remove the "$" character and store the value in a variable
  var %money $remove($gettok($wildtok($1-,*$*,1,32),1,46),$)

  if (%name && %money) {

    ;Add the total amount of money with the received amount of money
    %tips_total = $calc(%tips_total + %money)

    ;Outputting the result to the channel
    msg $chan Username: %name , Added money: $+($,%money)
    msg $chan Total amount of money: $+($,%tips_total)
  }
}

You can edit and change this code according to your needs.

An example with entering the following text: Wow! Alex Muchaches just tipped $123.00. Thanks, dude!

     [Linked Image from i.ibb.co]


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples