Get current scope in scripting