well you could loop _G, and check if the function is natively from lua or not. If not, then add it to the list.
smth like this:
local defaults = {
["_G"] = true,
["_VERSION"] = true,
["table"] = true,
["string"] = true,
["coroutine"] = true,
["pairs"] = true,
["ipairs"] = true
}
local fn = {}
for i,v in pairs(_G) do
if not defaults[i] then
table.insert(fn, i)
end
end