Can you read functions?

I was always wondering since the 5th month of me scripting, can you read functions?

example:

local function readed(yes)
   print(yes)
end

print(readed) -- "print(yes)"

Is that possible, if its not, is it possible by exploits? (im not using this for anti cheats, just asking)

I don’t think you can “read” functions, especially inside the code (but you might be able to read the entire script). print(readed) would print out what the function will return (in this case it doesn’t return anything).

Nope.

There is no way to get access to body source code of given function in plain Lua. Source code is thrown away after compilation to byte-code.

Sorry fir the late reply, thank you both of you!

its possible if you use the command bar or a plugin

https://developer.roblox.com/en-us/api-reference/property/Script/Source