0% found this document useful (0 votes)
31 views2 pages

Liya Hex Offsetv2.lua

The document is a Lua script designed for a game hacking tool that allows users to apply various memory patches. It defines a list of patches with specific library names, offsets, and new hex values, and includes functions to get library base addresses, apply patches, and display a menu for user interaction. The script enables users to select and apply hacks such as 'No Cooldown', 'Wall Hack', 'One Hit Kill', and 'Add Coin'.

Uploaded by

rusdinyt125
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views2 pages

Liya Hex Offsetv2.lua

The document is a Lua script designed for a game hacking tool that allows users to apply various memory patches. It defines a list of patches with specific library names, offsets, and new hex values, and includes functions to get library base addresses, apply patches, and display a menu for user interaction. The script enables users to select and apply hacks such as 'No Cooldown', 'Wall Hack', 'One Hit Kill', and 'Add Coin'.

Uploaded by

rusdinyt125
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

gg.setRanges(gg.

REGION_C_ALLOC) -- Scan the library memory

-- Function to find the base address of a specific library


function getLibBase(libName)
local ranges = gg.getRangesList(libName)
if #ranges == 0 then return nil end
return ranges[1].start
end

-- List of patches (Library -> Offset -> New Hex Value)


local patches = {
{name = "NO COOLDOWN", lib = "libunity.so", offset = 0x939A2674, hex = "00 00
00 00h"},
{name = "wall hack2", lib = "libunity.so", offset = 0xFB5C3C, hex = "00 00 A0
E3 1E FF 2F E1"},
{name = "One Hit Kill", lib = "libil2cpp.so", offset = 0xABCD12, hex = "01 00
A0 E3 1E FF 2F E1"},
{name = "Add Coin", lib = "libil2cpp.so", offset = 0x287F824, hex = "88 03 01
E3 1E FF 2F E1"}
}

-- Function to apply patch silently


function applyPatch(libName, offset, hex)
local baseAddr = getLibBase(libName)
if not baseAddr then return end

local targetAddr = baseAddr + offset


local hexBytes = {}

-- Convert hex string to byte array


for byte in hex:gmatch("%S%S") do
table.insert(hexBytes, tonumber(byte, 16))
end

-- Write hex values into memory


local values = {}
for i = 1, #hexBytes do
values[i] = {address = targetAddr + (i - 1), flags = gg.TYPE_BYTE, value =
hexBytes[i]}
end

gg.setValues(values)
end

-- Function to show the menu


function showMenu()
local choices = {}

-- Populate choices with patch names


for _, patch in ipairs(patches) do
table.insert(choices, patch.name)
end
table.insert(choices, "Exit")

while true do
local selected = gg.choice(choices, nil, "Select a hack to apply:")
if selected == nil then
gg.toast("No selection made.")
return
elseif choices[selected] == "Exit" then
gg.toast("Exiting script.")
os.exit()
else
local selectedPatch = patches[selected]
applyPatch(selectedPatch.lib, selectedPatch.offset, selectedPatch.hex)
gg.toast(selectedPatch.name .. " applied!")
end
end
end

-- Run the menu


showMenu()

You might also like