Update script code