Code:
alias reverse {
  var %a = 1
  While (%a <= $Numtok($1-,32)) {
    var %b = 1
    While (%b <= $Len($Gettok($1-,%a,32))) {
      var %c = $+($Mid($Gettok($1-,%a,32),%b,1),$iif(%b == 1,$Chr(32)),%c)
      inc %b
    }
    inc %a
  }
  return %c
}
On *:TEXT:*:?: { msg $Nick $Reverse($1-) }

This should work, but be cautioned, this can flood you out easily.