Updated script to account for deprecated api

ScriptProperties has been deprecated; script has been updated to use PropertiesService