View previous topic :: View next topic |
Is this thread useful? |
Yes |
|
100% |
[ 7 ] |
No |
|
0% |
[ 0 ] |
|
Total Votes : 7 |
|
Author |
Message |
Frouk Master Cheater Reputation: 5
Joined: 22 Jun 2021 Posts: 489 Location: mov dword ptr [Ukraine]
|
Posted: Sat Aug 07, 2021 1:16 am Post subject: Lua Tutorial Pack |
|
|
This code is included this thread
Code: | local timer = createTimer(nil)
timer.Enabled = true
timer.Interval = 200
timer.OnTimer = function()
for i,v in pairs(keyID) do
if isKeyPressed(v) then
print(i)
end
end
end |
In this case this code will print current pressed key with 200 ms interval
_________________
void(__cdecl *Haxing)(HWND hGameWindow)
Last edited by Frouk on Sun Aug 29, 2021 7:19 am; edited 3 times in total |
|
Back to top |
|
|
Frouk Master Cheater Reputation: 5
Joined: 22 Jun 2021 Posts: 489 Location: mov dword ptr [Ukraine]
|
Posted: Sun Aug 08, 2021 11:47 pm Post subject: |
|
|
Code: | local form = createForm(true)
form.OnMouseEnter = function(sender)
local a = 0x000000
local b = 0xFFFFFF
local randColor = math.random(a,b)
form.Color = string.format('0x%X',randColor)
end |
This code will create form and if cursor in form, form will have random color
_________________
void(__cdecl *Haxing)(HWND hGameWindow) |
|
Back to top |
|
|
Frouk Master Cheater Reputation: 5
Joined: 22 Jun 2021 Posts: 489 Location: mov dword ptr [Ukraine]
|
Posted: Sun Aug 15, 2021 3:54 am Post subject: |
|
|
Code: | function numberInRange(value)
if value >= 0 and value <= 100 then
print('yay')
else
print('nay')
end
end |
This code will print yay if value in range
_________________
void(__cdecl *Haxing)(HWND hGameWindow) |
|
Back to top |
|
|
Frouk Master Cheater Reputation: 5
Joined: 22 Jun 2021 Posts: 489 Location: mov dword ptr [Ukraine]
|
Posted: Sun Aug 29, 2021 7:18 am Post subject: |
|
|
Force end function if statement less than or equals 0
Code: | function new()
if health <= 0 then
return;
end
writeFloat(addr,100)
end
|
_________________
void(__cdecl *Haxing)(HWND hGameWindow) |
|
Back to top |
|
|
Frouk Master Cheater Reputation: 5
Joined: 22 Jun 2021 Posts: 489 Location: mov dword ptr [Ukraine]
|
Posted: Tue Aug 31, 2021 7:29 am Post subject: |
|
|
Code: | local Player = {
AddHealth = function(health)
local num = 'PlayerPTR + 0x48'
local num2 = readFloat(num)
writeFloat(num,num2+health)
end,
}
|
Creates table named Player and adds function in it
To call function you need to type like this: Code: | Player.AddHealth(50) |
_________________
void(__cdecl *Haxing)(HWND hGameWindow) |
|
Back to top |
|
|
Frouk Master Cheater Reputation: 5
Joined: 22 Jun 2021 Posts: 489 Location: mov dword ptr [Ukraine]
|
Posted: Fri Oct 29, 2021 10:12 am Post subject: |
|
|
This function will return true if Cheat Engine attached to game:
Code: | function IsAttached(procName)
return getOpenedProcessID() == getProcessIDFromProcessName(procName)
end |
Calling the function: IsAttached("chrome.exe")
_________________
void(__cdecl *Haxing)(HWND hGameWindow) |
|
Back to top |
|
|
Frouk Master Cheater Reputation: 5
Joined: 22 Jun 2021 Posts: 489 Location: mov dword ptr [Ukraine]
|
Posted: Sun Jan 02, 2022 4:29 am Post subject: |
|
|
Code: | function MakeRangedNop(addr,addrTo)
addr = string.format("0x%X",getAddress(addr))
addrTo = string.format("0x%X",getAddress(addr))
local size
if addr == nil then
return
end
if addrTo == nil then
size = getInstructionSize(addr)+1
end
size = -(addr - addrTo)
MakeNop(addr,size)
end
function MakeNop(addr,size)
addr = string.format("0x%X",getAddress(addr))
size = tonumber(size)
if addr == nil then
return
end
if size == 0 then
return
end
if size == nil then
size = getInstructionSize(addr)+1
end
size = size - 1
for i = 0,size do
writeBytes(addr+i,0x90)
end
end
function PrintRangedBytes(addr,addrTo)
local size
if addrTo == nil then
size = getInstructionSize(addr)+1
end
addr = string.format("0x%X",getAddress(addr))
addrTo = string.format("0x%X",getAddress(addrTo))
local result = {}
if addr == nil then
return
end
size = -(addr - addrTo) - 1
for i = 0,size do
printf("%X",readBytes(addr+i))
end
end |
Those functions for memory editing
_________________
void(__cdecl *Haxing)(HWND hGameWindow) |
|
Back to top |
|
|
Frouk Master Cheater Reputation: 5
Joined: 22 Jun 2021 Posts: 489 Location: mov dword ptr [Ukraine]
|
Posted: Sat Jan 15, 2022 6:30 am Post subject: |
|
|
Code: | regenTimer = createTimer(nil)
regenTimer.Interval = 200
regenTimer.Enabled = true
regenTimer.OnTimer = function()
local healthOffset = 0x540
local maxHealthOffset = 0x544
local addr = "PlayerPointer" --replace this
local currHealth = readFloat(addr+healthOffset)
local maxHealth = readFloat(addr+maxHealthOffset)
if currHealth => maxHealth then
return
end
writeFloat(addr+healthOffset,currHealth+1)
end |
Health regeneration code
_________________
void(__cdecl *Haxing)(HWND hGameWindow) |
|
Back to top |
|
|
|