Categories > Coding > C++ >

Please explain how an LBI works

Posts: 11

Threads: 1

Joined: Nov, 2020

Reputation: 0

Posted

Can someone please tell me how an LBI works?

  • 0

DeepPain

Wyvern

Posts: 479

Threads: 5

Joined: Jul, 2020

Reputation: 57

Replied

I can already see a long a$$ reply from OpenGamerTips

  • 0

My Discord is xwyvern

https://i.imgur.com/mH521VR.png

Posts: 11

Threads: 1

Joined: Nov, 2020

Reputation: 0

Replied

I understand everything except the opcode part @OpenGamerTips

  • 0

DeepPain

Wyvern

Posts: 479

Threads: 5

Joined: Jul, 2020

Reputation: 57

Replied

@_realnickk also I made a nertivia acc and sent you a friend request

  • 0

My Discord is xwyvern

https://i.imgur.com/mH521VR.png

0x90

dingleberry#2286

vip

Posts: 249

Threads: 26

Joined: Dec, 2020

Reputation: 28

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

  • 0

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.

  • 0

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )