Advertisement
LDDestroier

lua try

Oct 24th, 2018
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.19 KB | None | 0 0
  1. function try(strcodePre, except)
  2.     local result, output = pcall(function()
  3.         return load(strcodePre, nil, nil, _ENV)()
  4.     end)
  5.     if not result then
  6.         return load(except, nil, nil, _ENV)()
  7.     end
  8. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement