Advanced scripting