Easy to change line in Lua bytecode. You just need to adjust the length of the string after changing it. The length before the string. It probably takes four or eight bytes immediately before the line, depending on whether you have a 32-bit or 64-bit platform. The length is stored in the content of the machine where the bytecode was created. Note that the lines include the trailing '\ 0', and this is considered the length.
It might be easier to just copy some bytes directly. Write this file
return "this is the new string you want"
Create a bytecode from it with luacand look at the dump luac.outand find the string and its length. Copy these bytes to the source file.
, . , .
Lua, - , - return "this is the new string you want", - .
- lbci, . - ( ) setconstant , , .
, - ...