tbh it kind of functions that way implicitly its when you have functions inside of functions in a callback like structure
myRightClickLabel:setMenuAction("Drink.ManaPotion", function()
cecho("<blue>Drinking my mana potion.\n")
send("drink mp")
end )
Where stuff gets messy because of the "end"