Script system is very much broken, but I commit this so ViceVirtue may have a look.