Scales scripting engine