Enhanced scripting