isexecutorclosure checks whether a given function is a closure of the executor. This also includes closures retrieved using getscriptclosure or loadstring
localfunctiondummy_lua_function()print("This is an executor Lua closure")endlocaldummy_cfunction=newcclosure(function()print("This is an executor C closure")end)localdummy_standard_cfunction=printlocaldummy_global_cfunction=getgcprint(isexecutorclosure(dummy_lua_function))-- Output: trueprint(isexecutorclosure(dummy_cfunction))-- Output: trueprint(isexecutorclosure(dummy_global_cfunction))-- Output: trueprint(isexecutorclosure(dummy_standard_cfunction))-- Output: false