Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int opencustomlibs(lua_State* L) {
- lua_newtable(L);
- lua_pushcfunction(L, Instance_new);
- lua_setfield(L, -2, "new");
- lua_setglobal(L, "Instance");
- lua_settop(L, 0);
- lua_newtable(L);
- lua_pushcfunction(L, Vector3_new);
- lua_setfield(L, -2, "new");
- lua_setglobal(L, "Vector3");
- lua_settop(L, 0);
- lua_getglobal(L, "Vector3");
- lua_pushvalue(L, -1);
- lua_setfield(L, -2, "__index");
- lua_settop(L, 0);
- lua_newtable(L);
- lua_pushcfunction(L, Color3_new);
- lua_setfield(L, -2, "new");
- lua_setglobal(L, "Color3");
- lua_settop(L, 0);
- lua_getglobal(L, "Color3");
- lua_pushvalue(L, -1);
- lua_setfield(L, -2, "__index");
- lua_settop(L, 0);
- lua_newtable(L);
- lua_pushstring(L, "deadass should already know that this is locked");
- lua_setfield(L, -2, "__metatable");
- lua_settop(L, 0);
- lua_newtable(L);
- lua_createtable(L, 0, 1);
- lua_pushcfunction(L, GameIndex);
- lua_setfield(L, -2, "__index");
- lua_pushcfunction(L, GameNewIndex);
- lua_setfield(L, -2, "__newindex");
- lua_pushcfunction(L, GameCall);
- lua_setfield(L, -2, "__call");
- lua_setmetatable(L, -2);
- lua_setglobal(L, "game");
- lua_settop(L, 0);
- lua_newtable(L);
- lua_createtable(L, 0, 1);
- lua_pushcfunction(L, WorkspaceIndex);
- lua_setfield(L, -2, "__index");
- lua_pushcfunction(L, WorkspaceNewIndex);
- lua_setfield(L, -2, "__newindex");
- lua_pushcfunction(L, WorkspaceCall);
- lua_setfield(L, -2, "__call");
- lua_setmetatable(L, -2);
- lua_setglobal(L, "workspace");
- lua_settop(L, 0);
- lua_pushcfunction(L, PrintIdentity);
- lua_setglobal(L, "printidentity");
- lua_settop(L, 0);
- lua_pushcfunction(L, Warn);
- lua_setglobal(L, "warn");
- lua_settop(L, 0);
- lua_pushcfunction(L, Print);
- lua_setglobal(L, "print");
- lua_settop(L, 0);
- lua_pushcfunction(L, Wait);
- lua_setglobal(L, "wait");
- lua_settop(L, 0);
- lua_pushcfunction(L, LuaCAPI);
- lua_setglobal(L, "luac");
- lua_settop(L, 0);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement