Run it
Copy the script and paste it into your executor.
local function foo()
print("bar")
end
local info = debug.getinfo(foo)
local func_str_cluttered = tostring(info.func)
local func_str = string.gsub(func_str_cluttered, "function: ", "")
print(func_str)
local get_func_addr = loadstring("return " .. func_str)
local func_addr = get_func_addr()
local info_fromaddr = debug.getinfo(func_addr)quite funny, i did not know a script could be detected

Universal