Categories > Coding > C++ >
Please explain how an LBI works
Posted
Can someone please tell me how an LBI works?
Replied
I can already see a long a$$ reply from OpenGamerTips
Cancel
Post
My Discord is xwyvern
https://i.imgur.com/mH521VR.png
My Discord is xwyvern
https://i.imgur.com/mH521VR.png
Replied
@_realnickk Dude do you know what you're talking about? if roblox used vanilla lua 5.1 bytecode then you would just load vanilla bytecode. Needless to say, this isn't how things work. Roblox has a custom VM and compiler, it's called Luau. Luau has more registers than vanilla lua, has more opcodes, and does a lot of things differently, you can't load vanilla 5.1 bytecode expecting it to work.
The way an LBI works is as follows:
You create a game with a script to interpret vanilla bytecode, and make sure it's disabled.
Then you play your game and open the console, write a script to change the enabled property to true.
Inject a dll that logs deserialize calls, and run the script.
Now you have the bytecode in a precompiled Luau format!
As for running it, you call the deserialize function with the bytecode, and it'll push a lclosure onto the stack.
Finally you can spawn it and it'll run your LBI.
From that point on you can just load vanilla bytecode into your LBI
Cancel
Post
Added
@_realnickk I've written an interpreter in lua for 5.1 bytecode, I've written a VM and deserializer in C++, I've written a compiler to a custom bytecode format. I don't use rerubi or fione, I don't use LBI's because my brain isn't caved in.
Cancel
Post
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post