<?xml version='1.0' encoding='utf-8'?>
<CheatTable CheatEngineTableVersion="45">
  <CheatEntries>
    <CheatEntry>
      <ID>1</ID>
      <Description>"Auto-Attach and Version Check"</Description>
      <GroupHeader>1</GroupHeader>
    </CheatEntry>
    <CheatEntry>
      <ID>2</ID>
      <Description>"☕ Fuel the Cheats — Tip Katzy (Toggle to open my Ko-fi page)"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
[DISABLE]
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>3</ID>
      <Description>"How to use - Katzy"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
[DISABLE]
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>4</ID>
      <Description>"Clear All"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
[DISABLE]
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>5</ID>
      <Description>"[MAIN] Final Fantasy Resonance"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
[DISABLE]
</AssemblerScript>
      <Options moHideChildren="1" />
      <CheatEntries>
        <CheatEntry>
          <ID>11</ID>
          <Description>"Infinite Health"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>12</ID>
          <Description>"Infinite Items"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>13</ID>
          <Description>"Infinite Limit Gauge"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>16</ID>
          <Description>"Infinite Money"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>14</ID>
          <Description>"Infinite MP"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>17</ID>
          <Description>"Max Level"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>18</ID>
          <Description>"Max Vision Level"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>15</ID>
          <Description>"No Random Encounters"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
[DISABLE]
</AssemblerScript>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <LuaScript>--[[
Table identification: Katzy
Final Fantasy Resonance | Steam build 24250053 | Table v1.7
Original derivation from the supported executable. No maximum stats are changed.
]]
if FFRKatzy then
  local ok=FFRKatzy.shutdown()
  if not ok then return end
end
local S={active={},retired={},closing=false,records={}}
FFRKatzy=S
local module='FFRS-Win64-Shipping.exe'
local expectedMD5='283de68a4f6c81603ab0716cc385aab0'
local specs={["hp"]={{["name"]="hp_set",["rva"]=86289209,["original"]="898d0c010000",["signature"]="89 8d 0c 01 00 00 48 8b 6c 24 38 48 83 c4 20 5f c3 cc cc cc cc cc cc 48 89 5c 24 08 57 48 83 ec",["code"]="9c5048b8887766554433221148394500742148b89988776655443322483945000f85b400000080bdd8030000010f85a700000039f90f849f00000051524152415349babbaa998877665544498b82c856f1094885c07477488b80100c00004885c0746b488b40784885c074628b883809000085c97e5881f9000100007750488b90300900004885d274444d8b9a104ef4094d85db74384c391a740a4883c218ffc975f3eb29488b42084885c074204c395810751af7400800000040751180b839010000007408415b415a5a59eb0c415b415a5a5985ff7e0289f9589d898d0c010000ff2500000000aa99887766554433",["reloc"]={{4,"basevt"},{20,"battlevt"},{67,"module"},{232,"return"}}},{["name"]="hp_max",["rva"]=86229658,["original"]="33c085f60f4fc6",["signature"]="33 c0 85 f6 0f 4f c6 48 8b 74 24 38 48 83 c4 20 5f c3 cc cc cc cc b8 04 00 00 00 c3 cc cc cc cc",["code"]="31c085f60f4fc69c5048b88877665544332211483907742048b899887766554433224839070f85bc00000080bfd8030000010f85af00000039b70c0100000f84a300000051524152415349babbaa998877665544498b82c856f1094885c07477488b80100c00004885c0746b488b40784885c074628b883809000085c97e5881f9000100007750488b90300900004885d274444d8b9a104ef4094d85db74384c391a740a4883c218ffc975f3eb29488b42084885c074204c395810751af7400800000040751180b839010000007408415b415a5a59eb10415b415a5a5985f67e0689b70c010000589dff2500000000aa99887766554433",["reloc"]={{11,"basevt"},{26,"battlevt"},{76,"module"},{239,"return"}}}},["mp"]={{["name"]="mp_set",["rva"]=86290233,["original"]="898d10010000",["signature"]="89 8d 10 01 00 00 48 8b 6c 24 38 48 83 c4 20 5f c3 cc cc cc cc cc cc 48 83 ec 28 80 3a 05 4c 8b",["code"]="9c5048b8887766554433221148394500741948b8998877665544332248394500750f80bdd803000001750685ff7e0289f9589d898d10010000ff2500000000aa99887766554433",["reloc"]={{4,"basevt"},{20,"battlevt"},{63,"return"}}},{["name"]="mp_max",["rva"]=86229770,["original"]="33c085f60f4fc6",["signature"]="33 c0 85 f6 0f 4f c6 48 8b 74 24 38 48 83 c4 20 5f c3 cc cc cc cc 41 b0 01 e9 08 04 00 00 cc cc",["code"]="31c085f60f4fc69c5048b88877665544332211483907741848b89988776655443322483907751380bfd803000001750a85f67e0689b710010000589dff2500000000aa99887766554433",["reloc"]={{11,"basevt"},{26,"battlevt"},{66,"return"}}},{["name"]="mp_playable",["rva"]=86291950,["original"]="4189ae10010000",["signature"]="41 89 ae 10 01 00 00 e8 76 b0 fe ff 48 8b 7c 24 50 48 8b 74 24 48 48 8b 6c 24 40 48 83 c4 20 41",["code"]="9c5048b88877665544332211493906741948b8998877665544332249390675104180bed803000001750685ff7e0289fd589d4189ae10010000ff2500000000aa99887766554433",["reloc"]={{4,"basevt"},{19,"battlevt"},{63,"return"}}}},["lb"]={{["name"]="lb_set",["rva"]=86290104,["original"]="898318010000",["signature"]="89 83 18 01 00 00 48 8b 5c 24 30 48 83 c4 20 5f c3 cc cc cc cc cc cc cc 48 89 5c 24 08 48 89 6c",["code"]="9c5148b9887766554433221148390b741848b9998877665544332248390b751880bbd803000001750f83bba0020000007e068b83a0020000599d898318010000ff2500000000aa99887766554433",["reloc"]={{4,"basevt"},{19,"battlevt"},{70,"return"}}},{["name"]="lb_read",["rva"]=83186023,["original"]="8b8018010000",["signature"]="8b 80 18 01 00 00 48 83 c4 20 5b c3 33 c0 48 83 c4 20 5b c3 cc cc cc cc cc 40 53 48 83 ec 20 8b",["code"]="9c5148b98877665544332211483908741848b99988776655443322483908751980b8d80300000175108b88a002000085c97e06898818010000599d8b8018010000ff2500000000aa99887766554433",["reloc"]={{4,"basevt"},{19,"battlevt"},{71,"return"}}},{["name"]="lb_delta",["rva"]=86181342,["original"]="3bc2898518010000",["signature"]="3b c2 89 85 18 01 00 00 0f 9f c0 48 83 c4 40 41 5e 5f 5d c3 cc cc cc cc cc cc cc cc cc cc cc cc",["code"]="9c5148b9887766554433221148394d00741948b9998877665544332248394d00751880bdd803000001750f83bda0020000007e068b85a0020000599d39d0898518010000ff2500000000aa99887766554433",["reloc"]={{4,"basevt"},{20,"battlevt"},{74,"return"}}},{["name"]="lb_parameter",["rva"]=86213137,["original"]="8bbb18010000",["signature"]="8b bb 18 01 00 00 e9 bd 00 00 00 8b bb a4 02 00 00 03 bb 1c 01 00 00 e9 ac 00 00 00 8b bb 2c 01",["code"]="9c5048b88877665544332211483903741848b89988776655443322483903751e80bbd803000001751583bba0020000007e0c8b83a0020000898318010000589d8bbb18010000ff2500000000aa99887766554433",["reloc"]={{4,"basevt"},{19,"battlevt"},{76,"return"}}},{["name"]="lb_current",["rva"]=86231024,["original"]="8b8618010000",["signature"]="8b 86 18 01 00 00 48 8b 5c 24 48 48 83 c4 30 5e c3 b2 05 48 8b ce 48 8b 5c 24 48 48 83 c4 30 5e",["code"]="9c5048b88877665544332211483906741848b89988776655443322483906751e80bed803000001751583bea0020000007e0c8b86a0020000898618010000589d8b8618010000ff2500000000aa99887766554433",["reloc"]={{4,"basevt"},{19,"battlevt"},{76,"return"}}}},["items"]={{["name"]="items_read",["rva"]=85002603,["original"]="8b4104488b5c2430",["signature"]="8b 41 04 48 8b 5c 24 30 48 83 c4 20 5f c3 cc cc cc cc cc cc cc 48 89 5c 24 08 57 48 83 ec 20 48",["code"]="9c83fb017c1581fb102700007d0d837904007e07c741045a0000009d8b4104488b5c2430ff2500000000aa99887766554433",["reloc"]={{42,"return"}}},{["name"]="items_set",["rva"]=85113251,["original"]="89730485f6",["signature"]="89 73 04 85 f6 0f 8f 0a ff ff ff 49 81 c6 b8 00 00 00 4d 8b 0e 4d 63 46 08 49 8b c9 4b 8d 14 c1",["code"]="9c83ff017c1381ff102700007d0b837b04007e05be5a0000009d89730485f6ff2500000000aa99887766554433",["reloc"]={{37,"return"}}},{["name"]="items_snapshot",["rva"]=85042409,["original"]="8b4f044883c708",["signature"]="8b 4f 04 48 83 c7 08 89 08 48 3b fd 75 99 48 8b be 18 01 00 00 48 63 86 20 01 00 00 48 8b 6c 24",["code"]="9c833f017c15813f102700007d0d837f04007e07c747045a0000009d8b4f044883c708ff2500000000aa99887766554433",["reloc"]={{41,"return"}}},{["name"]="items_by_type",["rva"]=85036694,["original"]="488b03488904d1",["signature"]="48 8b 03 48 89 04 d1 48 83 c3 08 48 3b dd 75 bf 48 8b 5c 24 48 48 8b c7 48 8b 6c 24 50 48 83 c4",["code"]="9c833b017c15813b102700007d0d837b04007e07c743045a0000009d488b03488904d1ff2500000000aa99887766554433",["reloc"]={{41,"return"}}}},["money"]={{["name"]="money_read",["rva"]=85023691,["original"]="8b40284883c428",["signature"]="8b 40 28 48 83 c4 28 c3 b8 ff ff ff ff 48 83 c4 28 c3 cc cc cc 48 89 5c 24 18 55 56 41 56 48 83",["code"]="8b40285152488b4c243848babbaa9988776655444829d14881f9b620f40474174881f96948f404740e4881f905f6f504740505a0bb0d005a594883c428ff2500000000aa99887766554433",["reloc"]={{12,"module"},{67,"return"}}},{["name"]="money_buy",["rva"]=86136465,["original"]="418bce410fb6d0",["signature"]="41 8b ce 41 0f b6 d0 e8 e3 2a f0 ff 8b 97 e0 00 00 00 8b c2 8b 8f 80 00 00 00 f7 d8 38 9f e4 00",["code"]="4489f1410fb6d09c81e9a0bb0d007d0231c99dff2500000000aa99887766554433",["reloc"]={{25,"return"}}},{["name"]="money_sell",["rva"]=86136642,["original"]="410fb6d08d0c03",["signature"]="41 0f b6 d0 8d 0c 03 e8 32 2a f0 ff 8b 97 e0 00 00 00 8b c2 8b 8f 80 00 00 00 f7 d8 80 bf e4 00",["code"]="410fb6d08d0c039c81e9a0bb0d007d0231c99dff2500000000aa99887766554433",["reloc"]={{25,"return"}}}},["level"]={{["name"]="level_exp_cap",["rva"]=85119895,["original"]="3bf00f4cc6",["signature"]="3b f0 0f 4c c6 33 c9 85 c0 0f 4f c8 89 4b 04 48 8b 5c 24 30 48 8b 74 24 38 48 83 c4 20 5f c3 cc",["code"]="39c6ff2500000000aa99887766554433",["reloc"]={{8,"return"}}}},["vision"]={{["name"]="vision_synchro_cap",["rva"]=84068334,["original"]="0f4cc585c0",["signature"]="0f 4c c5 85 c0 0f 4f c8 89 0e 8b cf e8 51 46 ff ff b2 01 8b cf 8b d8 e8 36 28 ff ff 3b c3 7f 07",["code"]="85c0ff2500000000aa99887766554433",["reloc"]={{8,"return"}}}},["encounters"]={{["name"]="movement_encounters",["rva"]=84839982,["original"]="e87d73f7ff",["signature"]="e8 7d 73 f7 ff eb 07 c6 83 7d 08 00 00 0f 0f 10 83 b8 09 00 00 0f 11 83 c8 09 00 00 44 38 a3 0a",["patch"]="9090909090"}}}
local keys={[11]='hp',[12]='items',[13]='lb',[14]='mp',[15]='encounters',[16]='money',[17]='level',[18]='vision'}
local function bytes(hex)
  local t={};for x in hex:gmatch('%x%x') do t[#t+1]=tonumber(x,16) end;return t
end
local function same(a,b)
  if not a or #a~=#b then return false end
  for i=1,#b do if a[i]~=b[i] then return false end end
  return true
end
local function put(a,t)
  if not writeBytes(a,t) or not same(readBytes(a,#t,true),t) then error('The game memory could not be updated. The option has been stopped.',0) end
end
local apiAddresses={}
local function api(name,...)
  local a=apiAddresses[name]
  if not a then a=getAddressSafe('kernel32.'..name,true);apiAddresses[name]=a end
  if not a then error('Windows memory services are unavailable. Use 64-bit Cheat Engine 7.7 or newer.',0) end
  return executeCodeLocalEx(a,...)
end
local function creation()
  local m=createMemoryStream();m.Size=32
  local p=m.Memory
  local ok=api('GetProcessTimes',getOpenedProcessHandle(),p,p+8,p+16,p+24)
  local result=ok~=0 and readQwordLocal(p) or nil;m.destroy();return result
end
local function owned()
  return S.pid and getOpenedProcessID()==S.pid and creation()==S.created
end
local function quietError(message)
  S.lastError=tostring(message)
  if not S.closing then showMessage(S.lastError) end
end
local function validate()
  if getCEVersion()&lt;7.7 or not cheatEngineIs64Bit() then error('Use 64-bit Cheat Engine 7.7 or newer.',0) end
  local pid=getOpenedProcessID()
  if pid==0 then error('Start Final Fantasy Resonance and wait for automatic attachment.',0) end
  if S.pid==pid and creation()==S.created then return true end
  local found
  for _,m in ipairs(enumModules(pid) or {}) do if m.Name:lower()==module:lower() then found=m;break end end
  if not found then error('Cheat Engine is attached to a different game. Start Final Fantasy Resonance and wait for automatic attachment.',0) end
  local born=creation()
  if not born then error('The game process cannot be inspected. Run Cheat Engine with permission to access the game.',0) end
  if S.pid==pid and S.created==born and S.base==found.Address then return true end
  if next(S.active) or #S.retired&gt;0 then error('Return to the original game process and turn its options off before changing processes.',0) end
  if S.rejected and S.rejected.pid==pid and S.rejected.created==born then error(S.rejected.reason,0) end
  if not found.PathToFile or md5file(found.PathToFile):lower()~=expectedMD5 then
    local reason='This table supports Steam build 24250053. The running executable is a different build; a table update is required.'
    S.rejected={pid=pid,created=born,reason=reason};error(reason,0)
  end
  S.pid=pid;S.created=born;S.base=found.Address;S.path=found.PathToFile;S.addresses={}
  return true
end
-- All injected blocks are leaf code. Checking every suspended thread's RIP
-- therefore establishes that an allocation can be released without a return into it.
local transaction
local function threadsOutside(ranges)
  local t=transaction
  local ok,answer=pcall(function()
    local list=getThreadlist()
    if not list or #list==0 then return false end
    for _,tid in ipairs(list) do
      local handle=api('OpenThread',0x48,0,tid)
      if handle==0 then return false end
      t.handles[#t.handles+1]=handle
      local good=api('GetThreadContext',handle,t.ctx)
      local rip=good~=0 and readQwordLocal(t.ctx+0xf8) or nil
      if not rip then return false end
      for _,r in ipairs(ranges) do if rip&gt;=r[1] and rip&lt;r[2] then return false end end
    end
    return true
  end)
  return ok and answer
end
local function stopped(fn)
  local wasPaused=isPaused()
  local stream=createMemoryStream();stream.Size=0x600
  local t={ctx=(stream.Memory+15)&amp;~15,handles={},release={}}
  writeIntegerLocal(t.ctx+0x30,0x100001)
  transaction=t
  if not wasPaused then pause() end
  local ok,result=pcall(fn)
  if not wasPaused then unpause() end
  transaction=nil
  -- Hooks are restored and every suspended RIP was outside these leaf caves.
  -- No thread can enter them after resume, so release work need not freeze play.
  for _,handle in ipairs(t.handles) do pcall(api,'CloseHandle',handle) end
  stream.destroy()
  for _,r in ipairs(t.release) do
    local freed,success=pcall(deAlloc,r.mem)
    if freed and success then
      for i=#S.retired,1,-1 do if S.retired[i]==r then table.remove(S.retired,i);break end end
    end
  end
  if not ok then error(result,0) end
  return result
end
local function flush()
  if api('FlushInstructionCache',getOpenedProcessHandle(),0,0)==0 then error('Windows could not refresh the game code. Turn the option off and retry.',0) end
end
local function qword(t,offset,value)
  for i=0,7 do t[offset+i+1]=(value&gt;&gt;(i*8))&amp;255 end
end
local function jump(from,to,n)
  local d=to-from-5
  if d &lt; -0x80000000 or d&gt;0x7fffffff then error('Nearby game memory is unavailable. Restart the game before enabling this option.',0) end
  local t={0xe9};for i=0,3 do t[#t+1]=(d&gt;&gt;(8*i))&amp;255 end
  while #t&lt;n do t[#t+1]=0x90 end;return t
end
local function retire(state)
  if state.mem then S.retired[#S.retired+1]={mem=state.mem,size=4096};state.mem=nil end
end
local function reclaimStopped()
  if #S.retired==0 then return end
  local ranges={}
  for _,r in ipairs(S.retired) do ranges[#ranges+1]={r.mem,r.mem+r.size} end
  if not threadsOutside(ranges) then return end
  for _,r in ipairs(S.retired) do transaction.release[#transaction.release+1]=r end
end
local function reclaim()
  if #S.retired==0 or not owned() then return end
  stopped(reclaimStopped)
end
local function enable(key)
  validate()
  if S.active[key] then return true end
  reclaim()
  if #S.retired&gt;0 then error('A previous option is still finishing. Resume the game briefly and try again.',0) end
  local state={patches={}}
  local ok,reason=pcall(function()
    local needsMemory=false
    for _,spec in ipairs(specs[key]) do
      local a=S.addresses[spec.name]
      if not a then
        -- Exact executable fingerprint and independently verified unique signature.
        -- Read only this site instead of rescanning the entire module on activation.
        a=S.base+spec.rva
        local signature=bytes(spec.signature)
        if not same(readBytes(a,#signature,true),signature) then error('The expected game code was not found. Disable other tables or mods that change these values.',0) end
        S.addresses[spec.name]=a
      end
      local old=bytes(spec.original)
      if not same(readBytes(a,#old,true),old) then error('Another change is using this game code. Disable the conflicting option before trying again.',0) end
      state.patches[#state.patches+1]={address=a,old=old,spec=spec}
      needsMemory=needsMemory or spec.code~=nil
    end
    if needsMemory then
      state.mem=allocateMemory(4096,state.patches[1].address)
      if not state.mem or state.mem==0 then state.mem=nil;error('Cheat Engine could not allocate game memory.',0) end
    end
    for i,p in ipairs(state.patches) do
      if p.spec.code then
        local code=bytes(p.spec.code);local a=state.mem+(i-1)*0x200
        for _,rel in ipairs(p.spec.reloc) do
          local value=rel[2]=='basevt' and S.base+0x8883bd0 or rel[2]=='battlevt' and S.base+0x86584d8 or rel[2]=='module' and S.base or p.address+#p.old
          qword(code,rel[1],value)
        end
        put(a,code);p.new=jump(p.address,a,#p.old)
      else p.new=bytes(p.spec.patch) end
    end
    stopped(function()
      local ranges={}
      for _,p in ipairs(state.patches) do ranges[#ranges+1]={p.address+1,p.address+#p.old} end
      if not threadsOutside(ranges) then error('The game is currently using this code. Resume it briefly and try again.',0) end
      local applied,err=pcall(function()
        for _,p in ipairs(state.patches) do p.attempted=true;put(p.address,p.new) end
        flush()
      end)
      if not applied then
        for _,p in ipairs(state.patches) do if p.attempted then put(p.address,p.old) end end
        flush();error(err,0)
      end
    end)
  end)
  if not ok then
    local unresolved=false
    for _,p in ipairs(state.patches) do if p.attempted and not same(readBytes(p.address,#p.old,true),p.old) then unresolved=true end end
    if unresolved then S.active[key]=state;error('The option could not be fully rolled back. Keep this table open and use Clear All to retry restoration.',0)
    else retire(state);reclaim() end
    error(reason,0)
  end
  S.active[key]=state;return true
end
local function disableMany(requested)
  local pending={}
  for _,key in ipairs(requested) do
    if S.active[key] then pending[#pending+1]={key=key,state=S.active[key]} end
  end
  if #pending==0 then reclaim();return true end
  if not owned() then error('The original game attachment is unavailable. No memory was written to the current process.',0) end
  local failure
  stopped(function()
    for _,item in ipairs(pending) do
      local ok,err=pcall(function()
        local conflict=false
        for _,p in ipairs(item.state.patches) do
          local cur=readBytes(p.address,#p.new,true)
          if same(cur,p.new) then put(p.address,p.old)
          elseif not same(cur,p.old) then conflict=true end
        end
        if conflict then error('Some game code was changed by another tool. Its changes were left untouched; restore that tool’s change and turn this option off again.',0) end
      end)
      item.restored=ok
      if not ok then failure=err end
    end
    -- Keep ownership records until all restored instructions are coherent.
    flush()
    for _,item in ipairs(pending) do
      if item.restored then S.active[item.key]=nil;retire(item.state) end
    end
    reclaimStopped()
  end)
  if failure then error(failure,0) end
  return true
end
local function disable(key)
  return disableMany({key})
end
local function clear()
  local all,err=pcall(disableMany,{'hp','items','lb','money','mp','level','vision','encounters'})
  if not all then S.lastError=tostring(err) end
  if all then
    S.syncing=true
    for id in pairs(keys) do if S.records[id] then S.records[id].Active=false end end
    if S.records[5] then S.records[5].Active=false end
    S.syncing=false
  end
  return all
end
local help=[[How to use - Katzy
Table identification: Katzy.
Steam build 24250053. Use 64-bit Cheat Engine 7.7 or newer.

Allow this table's Lua script. Start the game and wait for automatic attachment, then tick MAIN and enable the options you want.

Infinite Health: refills friendly characters to their current maximum when HP is queried or updated. Automatically allows normal damage and defeat in battles configured to continue after a loss. Enemy HP and maximum stats are unchanged.
Infinite Items: refills only already-owned consumables with a positive quantity to 90 when queried, listed or used. It never creates an inventory entry. Equipment, story/key items, artifacts and items capped at 1 are excluded.
Infinite Limit Gauge: keeps friendly characters at their own limit-gauge cap through gauge queries, direct updates and consumption. Requires the character's limit system to be unlocked.
Infinite Money: adds a temporary 900,000 Gil allowance to your natural balance. Earnings increase the total; purchases spend natural surplus down to the allowance. Disabling removes the allowance and keeps unspent natural Gil.
Infinite MP: refills friendly characters to their current maximum when MP is queried or updated.
Max Level: reaches character level 99 on the next experience update, such as battle rewards. The game applies normal level-based stats and skills. Levels gained remain after disabling.
Max Vision Level: reaches the vision-specific maximum Synchro level on the next Synchro-point update for that character and owned vision. Awakening upgrades are separate and unchanged. Progress remains after disabling; no unowned visions are added.
No Random Encounters: stops movement-triggered random battles. Scripted battles remain available. Turning it off resumes the normal encounter countdown.

Turning an option off restores normal game behavior; resources already replenished remain. Clear All or unticking MAIN disables all options. Turn options off before manually attaching to a different process.
]]
local al=getAddressList()
for _,id in ipairs({1,2,3,4,5,11,12,13,14,15,16,17,18}) do S.records[id]=al.getMemoryRecordByID(id) end
S.records[2].OnActivate=function(_,before)
  if before then shellExecute('https://ko-fi.com/katzy');return false end;return true
end
S.records[3].OnActivate=function(_,before)
  if before then showMessage(help);return false end;return true
end
S.records[4].OnActivate=function(_,before)
  if before then if not clear() then quietError(S.lastError) end;return false end;return true
end
S.records[5].OnActivate=function(_,before)
  if not before then return true end
  local ok,err=pcall(validate);if not ok then quietError(err) end;return ok
end
S.records[5].OnDeactivate=function(_,before)
  if not before or S.syncing or S.closing then return true end
  local ok=clear();if not ok then quietError(S.lastError) end;return ok
end
for id,key in pairs(keys) do
  S.records[id].OnActivate=function(_,before)
    if not before then return true end
    if not S.records[5].Active then quietError('Enable MAIN first.');return false end
    local ok,err=pcall(enable,key);if not ok then quietError(err) end;return ok
  end
  S.records[id].OnDeactivate=function(_,before)
    if not before or S.syncing or S.closing then return true end
    local ok,err=pcall(disable,key);if not ok then quietError(err) end;return ok
  end
end
local form=getMainForm();local previousClose=form.OnClose
local closingHandler
S.shutdown=function()
  S.closing=true
  local ok,clean=pcall(clear)
  if S.timer then S.timer.destroy();S.timer=nil end
  pcall(reclaim)
  if form.OnClose==closingHandler then form.OnClose=previousClose end
  if not ok then S.lastError=tostring(clean) end
  return ok and clean and #S.retired==0
end
closingHandler=function(sender,action)
  pcall(S.shutdown)
  if previousClose then return previousClose(sender,action) end
  return action
end
form.OnClose=closingHandler
S.records[5].OnDestroy=function() pcall(S.shutdown) end
S.timer=createTimer(nil,false);S.timer.Interval=1500
S.timer.OnTimer=function()
  if S.closing then return end
  local processes=getProcesslist()
  if S.pid and not processes[S.pid] then
    S.active={};S.retired={};S.pid=nil;S.created=nil;S.base=nil
    S.syncing=true
    for id in pairs(keys) do S.records[id].Active=false end
    S.records[5].Active=false;S.syncing=false
  end
  if #S.retired&gt;0 then pcall(reclaim) end
  if next(S.active) or #S.retired&gt;0 then return end
  local match
  for pid,name in pairs(processes) do
    if name:lower()==module:lower() then
      if match then return end
      match=tonumber(pid)
    end
  end
  if not match then return end
  if getOpenedProcessID()~=match then openProcess(match) end
  local ok,err=pcall(validate)
  if not ok then S.lastError=tostring(err) end
end
S.timer.Enabled=true
</LuaScript>
</CheatTable>