Update ScriptGen.cpp