Advertisement
ChanServ

starfall external

Nov 28th, 2019
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. if not SF.Permissions.privileges.external then
  2.     SF.Permissions.registerPrivilege("external", "Run code outside of the Starfall sandbox.", "Allows users to run code outside of the Starfall sandbox.", {client = {default = 4}})
  3. end
  4. function SF.DefaultEnvironment.external(code)
  5.     SF.Permissions.check(SF.instance, nil, "external")
  6.     SF.CheckLuaType(code, TYPE_STRING)
  7.     local func, err = CompileString(code, "SF_external:"..SF.instance.mainfile, false)
  8.     return func, err
  9. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement