Changed scripting so that multiple scripts can be attached to agents