In what language are you coding in, lite-C (*.c) or C-Script (*.wdl)?
flags = transparent, overlay, refresh, d3d;;
There's a ";" too much. Those flags are obsolete, at least refresh and d3d. You combine flags with "|":
flags = TRANSLUCENT | OVERLAY;
"set" is a macro for entity flags that is declared as follows:
#define set(obj,flag) obj.flags |= (flag)
ENABLE_IMPACT is an
emask flag, not
flags (see manual). That means you have to write your own macro or set the flag as follows:
my.emask |= ENABLE_CLICK;
Replace
if (cash == 0) {cash_pan, visible = on;}
with
if (cash == 0) { set(cash_pan,SHOW); }