Adding onBegin function for scripts