Advertisement
1lann

mehOs-fix

Jan 19th, 2013
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1. -- Upon the very startip
  2. globalEnv = {}
  3. for k, v in pairs(getfenv(0)) do
  4. if type(v) == "table" then
  5.     globalEnv[k] = {}
  6.     for a,d in pairs(v) do
  7.     globalEnv[k][a] = d
  8.     end
  9. else globalEnv[k] = v end
  10. end
  11. for k, v in pairs(getfenv(1)) do
  12. if type(v) == "table" then
  13.     globalEnv[k] = {}
  14.     for a,d in pairs(v) do
  15.     globalEnv[k][a] = d
  16.     end
  17. else globalEnv[k] = v end
  18. end
  19.  
  20. -- Running firewolf
  21. local fn = loadfile("firewolf")
  22. setfenv(fn, globalEnv)
  23. pcall(fn)
  24. setfenv(1, globalEnv)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement