AccessorFunc
Example
Adds the GetFooBar and SetFooBar functions to the Player metatable and then uses them.
local meta = FindMetaTable("Player")
AccessorFunc(meta, "foo_bar", "FooBar", FORCE_BOOL)
local ply = Entity( 1 )
ply:SetFooBar(true)
print(not ply:GetFooBar())
Output: false