<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="52">
  <CheatEntries>
    <CheatEntry>
      <ID>37</ID>
      <Description>"Hook Game"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ AUTO-GEN gated hook + fixed-cache love.update wrap for lua51.dll }
[ENABLE]
alloc(newmem,$400)
alloc(stateStore,8)
alloc(cmd,1024)
alloc(doit,8)
alloc(savedtop,8)
alloc(mintop,8)
alloc(gate,8)
registersymbol(stateStore)
registersymbol(cmd)
registersymbol(doit)
registersymbol(mintop)
registersymbol(gate)
registersymbol(gettopHook)
stateStore:
  dq 0
doit:
  dq 0
savedtop:
  dq 0
mintop:
  dq 7FFFFFFF
gate:
  dq 0
cmd:
  db 'a=1',0
label(gettopHook)
label(code)
label(skip)
label(trackmin)
newmem:
  mov [stateStore],rcx
  mov rax,[rcx+28]
  sub rax,[rcx+20]
  sar rax,03
  mov rdx,[mintop]
  cmp rax,rdx
  jge trackmin
  mov [mintop],rax
trackmin:
  cmp qword ptr [doit],0
  je skip
  mov rdx,[gate]
  cmp rax,rdx
  jg skip
  mov [savedtop],rax
  push rbp
  mov rbp,rsp
  and rsp,-10
  sub rsp,20
  mov qword ptr [doit],0
  mov rcx,[stateStore]
  lea rdx,[cmd]
  call lua51.luaL_loadstring
  mov rcx,[stateStore]
  xor edx,edx
  mov r8d,0FFFFFFFF
  xor r9d,r9d
  call lua51.lua_pcall
  mov rcx,[stateStore]
  mov edx,[savedtop]
  call lua51.lua_settop
  mov rsp,rbp
  pop rbp
  mov rcx,[stateStore]
  mov rax,[rcx+28]
  sub rax,[rcx+20]
  sar rax,03
skip:
code:
  ret
lua51.lua_gettop:
gettopHook:
  jmp newmem

{$lua}
if syntaxcheck then return end
if __v8boot then __v8boot.destroy() end
__v8boot = createTimer(getMainForm())
__v8boot.Interval = 250
__v8boot.OnTimer = function()
  local Laddr = readQword(getAddress('stateStore'))
  if not Laddr or Laddr==0 then return end
  local mt = readQword(getAddress('mintop'))
  if not mt or mt &gt;= 0x7FFFFFFF then return end
  writeQword(getAddress('gate'), mt)
  local c = getAddress('cmd')
  local boot = "if type(love)=='table' and type(love.update)=='function' and not __V8_WRAP then __V8_WRAP=true; __CMDCACHE={}; __V8_ORIG=love.update; love.update=function(dt) if __CMD then local code=__CMD; __CMD=nil; local f=__CMDCACHE[code]; if not f then f=loadstring(code); if f then __CMDCACHE[code]=f end end; if f then pcall(f) end end return __V8_ORIG(dt) end end"
  writeString(c, boot); writeByte(c+#boot, 0); writeQword(getAddress('doit'), 1)
  __v8boot.destroy(); __v8boot=nil
  print('[v8.1] gate armed top='..mt..'; fixed-cache wrapper sent. Render-safe now.')
end
return true
{$asm}

[DISABLE]
{$lua}
if syntaxcheck then return end
if __v8boot then __v8boot.destroy(); __v8boot=nil end
local c=getAddress('cmd')
local un="if __V8_WRAP and __V8_ORIG then love.update=__V8_ORIG; __V8_WRAP=nil; __CMDCACHE=nil end"
writeString(c,un); writeByte(c+#un,0); writeQword(getAddress('doit'),1)
return true
{$asm}
lua51.lua_gettop:
  db 48 8B 41 28 48 2B 41 20 48 C1 F8 03 C3
unregistersymbol(stateStore)
unregistersymbol(cmd)
unregistersymbol(doit)
unregistersymbol(mintop)
unregistersymbol(gate)
unregistersymbol(gettopHook)
dealloc(gate)
dealloc(mintop)
dealloc(savedtop)
dealloc(doit)
dealloc(cmd)
dealloc(stateStore)
dealloc(newmem)
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>161</ID>
          <Description>"GODMODE"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ generated: GOD_MODE=true }
[ENABLE]
{$lua}
if syntaxcheck then return end
local function fire(b) local c=getAddress('cmd') local q='__CMD='..string.format('%q',b) writeString(c,q) writeByte(c+#q,0) writeQword(getAddress('doit'),1) end
if __CG_17888763072672_k then __CG_17888763072672_k.destroy() end
__CG_17888763072672_k=createTimer(getMainForm())
__CG_17888763072672_k.Interval=1
__CG_17888763072672_k.OnTimer=function()
  __CG_17888763072672_k.destroy() __CG_17888763072672_k=nil
  if __CG_17888763072672 then __CG_17888763072672.destroy() end
  __CG_17888763072672=createTimer(getMainForm())
  __CG_17888763072672.Interval=200
  __CG_17888763072672.OnTimer=function() fire([==[GOD_MODE=true]==]) end
end
print('[cheat] running: GOD_MODE=true.')
return true
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
local function fire(b) local c=getAddress('cmd') local q='__CMD='..string.format('%q',b) writeString(c,q) writeByte(c+#q,0) writeQword(getAddress('doit'),1) end
if __CG_17888763072672 then __CG_17888763072672.destroy() __CG_17888763072672=nil end
if __CG_17888763072672_k then __CG_17888763072672_k.destroy() __CG_17888763072672_k=nil end
fire([==[GOD_MODE=false]==])
print('[cheat] GOD_MODE=false.')
return true
{$asm}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>162</ID>
          <Description>"Invisibility"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ generated: game.playerActor.invisible=true }
[ENABLE]
{$lua}
if syntaxcheck then return end
local function fire(b) local c=getAddress('cmd') local q='__CMD='..string.format('%q',b) writeString(c,q) writeByte(c+#q,0) writeQword(getAddress('doit'),1) end
if __CG_17888763942155_k then __CG_17888763942155_k.destroy() end
__CG_17888763942155_k=createTimer(getMainForm())
__CG_17888763942155_k.Interval=1
__CG_17888763942155_k.OnTimer=function()
  __CG_17888763942155_k.destroy() __CG_17888763942155_k=nil
  if __CG_17888763942155 then __CG_17888763942155.destroy() end
  __CG_17888763942155=createTimer(getMainForm())
  __CG_17888763942155.Interval=200
  __CG_17888763942155.OnTimer=function() fire([==[game.playerActor.invisible=true]==]) end
end
print('[cheat] running: game.playerActor.invisible=true.')
return true
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
local function fire(b) local c=getAddress('cmd') local q='__CMD='..string.format('%q',b) writeString(c,q) writeByte(c+#q,0) writeQword(getAddress('doit'),1) end
if __CG_17888763942155 then __CG_17888763942155.destroy() __CG_17888763942155=nil end
if __CG_17888763942155_k then __CG_17888763942155_k.destroy() __CG_17888763942155_k=nil end
fire([==[game.playerActor.invisible=false]==])
print('[cheat] game.playerActor.invisible=false.')
return true
{$asm}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>163</ID>
          <Description>"Infinite Health"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ generated: game.playerActor.health=999 }
[ENABLE]
{$lua}
if syntaxcheck then return end
local function fire(b) local c=getAddress('cmd') local q='__CMD='..string.format('%q',b) writeString(c,q) writeByte(c+#q,0) writeQword(getAddress('doit'),1) end
if __CG_17888310565050_k then __CG_17888310565050_k.destroy() end
__CG_17888310565050_k=createTimer(getMainForm())
__CG_17888310565050_k.Interval=1
__CG_17888310565050_k.OnTimer=function()
  __CG_17888310565050_k.destroy() __CG_17888310565050_k=nil
  if __CG_17888310565050 then __CG_17888310565050.destroy() end
  __CG_17888310565050=createTimer(getMainForm())
  __CG_17888310565050.Interval=200
  __CG_17888310565050.OnTimer=function() fire([==[game.playerActor.health=999]==]) end
end
print('[cheat] running: game.playerActor.health=999.')
return true
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
if __CG_17888310565050 then __CG_17888310565050.destroy() __CG_17888310565050=nil end
if __CG_17888310565050_k then __CG_17888310565050_k.destroy() __CG_17888310565050_k=nil end
return true
{$asm}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>164</ID>
          <Description>"Infinite Armor"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ generated: game.playerActor.armor.health=999 }
[ENABLE]
{$lua}
if syntaxcheck then return end
local function fire(b) local c=getAddress('cmd') local q='__CMD='..string.format('%q',b) writeString(c,q) writeByte(c+#q,0) writeQword(getAddress('doit'),1) end
if __CG_17888308237699_k then __CG_17888308237699_k.destroy() end
__CG_17888308237699_k=createTimer(getMainForm())
__CG_17888308237699_k.Interval=1
__CG_17888308237699_k.OnTimer=function()
  __CG_17888308237699_k.destroy() __CG_17888308237699_k=nil
  if __CG_17888308237699 then __CG_17888308237699.destroy() end
  __CG_17888308237699=createTimer(getMainForm())
  __CG_17888308237699.Interval=200
  __CG_17888308237699.OnTimer=function() fire([==[game.playerActor.armor.health=999]==]) end
end
print('[cheat] running: game.playerActor.armor.health=999.')
return true
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
if __CG_17888308237699 then __CG_17888308237699.destroy() __CG_17888308237699=nil end
if __CG_17888308237699_k then __CG_17888308237699_k.destroy() __CG_17888308237699_k=nil end
return true
{$asm}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>165</ID>
          <Description>"Weapon Hacks (recoil, spread, ammo, full auto)"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Weapon Hax + Infinite Ammo - tick to enable. Requires v7 hook + wrapper installed. }
[ENABLE]
{$lua}
if syntaxcheck then return end
local mf = getMainForm()
if __whKick then __whKick.destroy() end
__whKick = createTimer(mf)
__whKick.Interval = 1
__whKick.OnTimer = function()
  __whKick.destroy(); __whKick = nil
  if __whTimer then __whTimer.destroy() end
  __whTimer = createTimer(mf)
  __whTimer.Interval = 100
  __whTimer.OnTimer = function()
    local c = getAddress("cmd")
    local body = table.concat({
      "local a=getPlayerActor()",
      "if a then",
      -- reserve ammo (the ammo table, keyed by caliber)
      "  if a.ammo then for k in pairs(a.ammo) do a.ammo[k]=999 end end",
      -- weapon fields (the loaded magazine + weapon stats)
      "  if a.weapon then local w=a.weapon",
      "    w.spread=0",
      "    w.realSpread=0",
      "    w.spreadPerShot=0",
      "    w.damage=999",
      "    w.fullAuto=true",
      "    w.mag=999",
      "    w.reloadSpeedMultiplier=0.0001",
      -- optional extra recoil/spread killers (delete if you want):
      "    w.spreadPerShotMultiplier=0",
      "    w.maxSpreadIncrease=0",
      "    w.lookSpread=0",
      "    w.lookSpreadMax=0",
      "  end",
      "end",
    }, " ")
    local wcmd = "__CMD="..string.format("%q", body)
    writeString(c, wcmd); writeByte(c+#wcmd, 0); writeQword(getAddress("doit"), 1)
  end
end
print("[weapon hax + inf ammo] running")
return true
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
if __whKick then __whKick.destroy(); __whKick=nil end
if __whTimer then __whTimer.destroy(); __whTimer=nil end
return true
{$asm}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>166</ID>
          <Description>"1B Money (tick to add, untick to disable)"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ generated: world:setFinishMoney(999999) }

[ENABLE]
{$lua}
if syntaxcheck then return end
local function fire(b)
    local c = getAddress('cmd')
    local q = '__CMD=' .. string.format('%q', b)
    writeString(c, q)
    writeByte(c + #q, 0)
    writeQword(getAddress('doit'), 1)
end
fire([==[world:setFinishMoney(1000000000)]==])
print('[cheat] 1B money set.')
return true
{$asm}

[DISABLE]
{$lua}
if syntaxcheck then return end
print('[cheat] 1B money disabled.')
return true
{$asm}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>167</ID>
          <Description>"Slow Motion"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ generated: game.timescale=0.05 }
[ENABLE]
{$lua}
if syntaxcheck then return end
local function fire(b) local c=getAddress('cmd') local q='__CMD='..string.format('%q',b) writeString(c,q) writeByte(c+#q,0) writeQword(getAddress('doit'),1) end
if __CG_17887155711546_k then __CG_17887155711546_k.destroy() end
__CG_17887155711546_k=createTimer(getMainForm())
__CG_17887155711546_k.Interval=1
__CG_17887155711546_k.OnTimer=function()
  __CG_17887155711546_k.destroy() __CG_17887155711546_k=nil
  if __CG_17887155711546 then __CG_17887155711546.destroy() end
  __CG_17887155711546=createTimer(getMainForm())
  __CG_17887155711546.Interval=200
  __CG_17887155711546.OnTimer=function() fire([==[game.timescale=0.05]==]) end
end
print('[cheat] running: game.timescale=0.05.')
return true
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
local function fire(b) local c=getAddress('cmd') local q='__CMD='..string.format('%q',b) writeString(c,q) writeByte(c+#q,0) writeQword(getAddress('doit'),1) end
if __CG_17887155711546 then __CG_17887155711546.destroy() __CG_17887155711546=nil end
if __CG_17887155711546_k then __CG_17887155711546_k.destroy() __CG_17887155711546_k=nil end
fire([==[game.timescale=1]==])
print('[cheat] game.timescale=1 (normal speed).')
return true
{$asm}
</AssemblerScript>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
</CheatTable>
