The real answer to your question is this:
if(isStandard() and isMine())
balance += value
If the script does not match very simple (and small) set of standard scripts with known "unlock" conditions, then it's considered rogue and ignored by the wallet.
If someone wants you to have money, they use a standard script. If someone wants to play game, or you want to experiment with scripts, you'll have to write your own software to experiment with them, because all the existing software will just ignore it.