Advertisement
PersonsadminTeam

Untitled

Jan 27th, 2020
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. wait()
  2. local ScriptBuilder = {}
  3. local User = getfenv(1).owner and getfenv(1).owner
  4. ScriptBuilder.OriginalVariables = {}
  5. ScriptBuilder.whitelistedIds = {417641510,411446235,410051373}
  6. ScriptBuilder.boxcutter_references = {'Abyss'}
  7. local SBENV = newproxy(true)getmetatable(SBENV).__tostring = function()SBENV = getfenv(3)end pcall(warn,SBENV)
  8. oldSandbox = ScriptBuilder.OriginalVariables
  9. oldSandbox['require'] = SBENV.require
  10. oldSandbox['getfenv'] = SBENV.getfenv
  11. oldSandbox['setfenv'] = SBENV.setfenv
  12. oldSandbox['warn'] = SBENV.warn
  13. oldSandbox['error'] = SBENV.error
  14. oldSandbox['print'] = SBENV.print
  15. local Sandbox = {}
  16. function Sandbox.isC(f)
  17. return pcall(string.dump, f) == false
  18. end
  19.  
  20. function ScriptBuilder.Output(Message, Type)
  21. local p = Instance.new('StringValue')
  22. p.Name = 'SB_Output:Output'
  23. p.Value = '["'..Type..'","'..Message..'"]'
  24. wait()
  25. p.Parent = User
  26. end
  27.  
  28. function ScriptBuilder.EXE(cmd)
  29. User:findFirstChild('SB_CommandRemote',true).Value = cmd
  30. end
  31. wait()
  32. function ScriptBuilder.SetVariable(name, value)
  33. ScriptBuilder.OriginalVariables[name] = SBENV[name]
  34. SBENV[name] = type(value) == "function" and not Sandbox.isC(value) and setfenv(value, SBENV) or value
  35. end
  36. ScriptBuilder.SetVariable('sb', '~ Abyss ~')
  37. ScriptBuilder.SetVariable('require', function(id) if ScriptBuilder.whitelistedIds[id] then ScriptBuilder.Output('', 'Note') return SBENV.require(id) else ScriptBuilder.Output('Abyss ~ This request has been blocked', 'Error') end end)
  38. setmetatable(ScriptBuilder, {__metatable='locked'})
  39. setfenv(1,SBENV)
  40. setfenv(2,SBENV)
  41. return nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement