Backstory: So I have been trying to break out of Voidacity (oxcool1)'s sandbox so that I can use require to make my code neater and have access to third party scripts. I found this method of overwriting a protected environment and have adjusted it to my needs. However I believe that overwriting the environment has messed up the functions
a = {
archive = {
print = print,
pairs = pairs,``
nil
},
}
a.env = {unpack(a.archive), unpack(a)}
for k, v in pairs(a.env) do
print(k, "=", v)
archive[k] = v
end
a = setmetatable(a, {
--metatable, yay!
__index = function ()
print("Lol?")
end,
__newindex = function ()
print("lol")
end
})
setfenv(1, a)
Random= require(HereForProtection:))
Error: The error I get when launching this code in the script builder is "Attempt to call global 'require' (a nil value)"
Why is this error occurring and how would I fix it?
