Help! Lua Execution for Lua Games

NotALegitGuy

Solid & Active Platinian
Original poster
Sep 24, 2018
69
67
18
Costa Rica
Hey there i just simply wanted to ask how i would go about doing Lua Execution on Lua Based Games, such as Roblox, Assault Cube ( probably? ), Blockman Go and more.

I do know it can be done via many different methods such as wrapping, And i do know you need the Offsets of the functions and the Lua State.

But after getting all these how would I go about setting them up and then hooking or injecting into the game to execute the code you input?

Also i use IDA Pro if that's needed

Edit: had to fix an autocorrect error
 

Kaorin333

Solid & Active Platinian
Jun 11, 2022
89
9
8
34
Germany
Yep would also like to know more about this maybe by replying here somone with knowledge will answer.
 

NotALegitGuy

Solid & Active Platinian
Original poster
Sep 24, 2018
69
67
18
Costa Rica
Yep would also like to know more about this maybe by replying here somone with knowledge will answer.
I actually pretty much figured it out, just get the Luastate or make a new one and use the game's own loadstring function to execute things, for Roblox just execute things using their Deserializer function and a Luau Compiler such as the one from GitHub which is literally 1:1 with Roblox's.
 

Kaorin333

Solid & Active Platinian
Jun 11, 2022
89
9
8
34
Germany
ye i already saw when your post was 5 months old, that you maybe already finished. any links or tutorials you would recommend for your old past : )

for example " own loadstring function to execute things, " where would i need to search for to find the loadstring function.
 

NotALegitGuy

Solid & Active Platinian
Original poster
Sep 24, 2018
69
67
18
Costa Rica
ye i already saw when your post was 5 months old, that you maybe already finished. any links or tutorials you would recommend for your old past : )

for example " own loadstring function to execute things, " where would i need to search for to find the loadstring function.
I learned by practicing and looking at source codes and also getting help from other devs, what you could do is look at the Lua source to find functions such as loadstring.
 

Kaorin333

Solid & Active Platinian
Jun 11, 2022
89
9
8
34
Germany
1661174113047.png


so normal hooking, then maybe playing a bit the game and looking what get called. just the nrmal thing, right?
 

Kaorin333

Solid & Active Platinian
Jun 11, 2022
89
9
8
34
Germany
Hi it seems not so easy like i thought : ) are there any protections you know of where the loadstring is not called? or it seems not to be called.
 

Kaorin333

Solid & Active Platinian
Jun 11, 2022
89
9
8
34
Germany
@NotALegitGuy it would be nice if you could give me the source code of the ones you were using as a reference, i cannot find public sources with lua.

you said:
" I learned by practicing and looking at source codes and also getting help from other devs, what you could do is look at the Lua source to find functions such as loadstring. "
 

NotALegitGuy

Solid & Active Platinian
Original poster
Sep 24, 2018
69
67
18
Costa Rica
@NotALegitGuy it would be nice if you could give me the source code of the ones you were using as a reference, i cannot find public sources with lua.

you said:
" I learned by practicing and looking at source codes and also getting help from other devs, what you could do is look at the Lua source to find functions such as loadstring. "
I meant the Lua source on the site which helped a lot on getting an understanding and sources from GitHub such as old Roblox Executors ( old since that's when Roblox wasn't as different as it now is because of Luau ) or games with Lua such as prison architect
 
  • Like
Reactions: Kaorin333