Advertisement
Hizemack

Untitled

Jul 21st, 2018
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. -- just expirimenting with the idea of making an automatic server sider
  2. player=game.Players['slenercat5']
  3. checkfor=false
  4.  
  5. function sandbox(var,func)
  6. local env = getfenv(func)
  7. local newenv = setmetatable({},{
  8. __index = function(self,k)
  9. if k=="script" then
  10. return var
  11. else
  12. return env[k]
  13. end
  14. end,
  15. })
  16. setfenv(func,newenv)
  17. return func
  18. end
  19. cors = {}
  20.  
  21.  
  22. player.Chatted:connect(function(s)
  23. for w in string.gmatch(s, "%a+") do
  24. if checkfor then
  25. g=player.PlayerGui:findFirstChild(w)
  26. if g then
  27. g=g:clone()
  28. g.Parent=game.PluginGuiService
  29. g.Disabled=false
  30. else
  31. warn('invalid script name"' .. w .. '"')
  32. end
  33.  
  34. end
  35. if w=='mirror' then
  36. checkfor=true
  37. end
  38. end
  39. checkfor=false
  40. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement