<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="50">
  <CheatEntries>
    <CheatEntry>
      <ID>0</ID>
      <Description>"Enable Script"</Description>
      <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
if getOpenedProcessID() == 0 then
  messageDialog("Game tidak ditemukan!, jalankan gamenya dan attach pada Cheat Engine!!", mtError, mbOK)
  return
end
{$asm}

alloc(SharedMem, 1024, GameAssembly.dll)
registersymbol(SharedMem)

[DISABLE]
dealloc(SharedMem)
unregistersymbol(SharedMem)
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>1</ID>
          <Description>"Infinite HP"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if not syntaxcheck and getAddressSafe('SharedMem') == nil then
  messageDialog("Enable Script belum diaktifkan!", mtError, mbOK)
  return
end
{$asm}

aobscanmodule(InfiniteHP,GameAssembly.dll,8B 40 18 48 8B 5C 24 38 48 83 C4 20 5F C3 E8 ?C 63 3? FE CC CC CC CC CC)
registersymbol(InfiniteHP)
registersymbol(Back_HP)

label(Back_HP return)

SharedMem:
  cmp r12,01
  jne Back_HP
  fild dword [rax+14]
  fistp dword [rax+18]
  
Back_HP:
  readmem(InfiniteHP, 8)
  jmp return
  
  align 10 CC

InfiniteHP:
  jmp SharedMem
  nop 3
return:

[DISABLE]
InfiniteHP:
  readmem(Back_HP, 8)

unregistersymbol(InfiniteHP)
unregistersymbol(Back_HP)
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>2</ID>
          <Description>"Invincibility"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{$lua}
if syntaxcheck then return end

[ENABLE]

if not syntaxcheck and getAddressSafe('SharedMem') == nil then
  messageDialog("Enable Script belum diaktifkan!", mtError, mbOK)
  return
end

{$asm}
aobscanmodule(Invincibility,GameAssembly.dll,F3 0F 10 49 70 33)
registersymbol(Invincibility Back_Invinc pPlayer1 pPlayer2)
label(Back_Invinc return Check_Slot2 Apply_Cheat)

SharedMem+20:

  // Cek apakah RCX adalah Player 1 yang sudah tersimpan?
  cmp [pPlayer1], rcx
  je Apply_Cheat

  // Jika Slot 1 masih kosong (0), simpan RCX sebagai Player 1
  cmp qword ptr [pPlayer1], 0
  jne Check_Slot2
  mov [pPlayer1], rcx
  jmp Apply_Cheat

Check_Slot2:
  // Cek apakah RCX adalah Player 2 yang sudah tersimpan?
  cmp [pPlayer2], rcx
  je Apply_Cheat

  // Jika Slot 2 masih kosong (0), simpan RCX sebagai Player 2
  cmp qword ptr [pPlayer2], 0
  jne Apply_Cheat
  mov [pPlayer2], rcx

Apply_Cheat:
  // --- EKSEKUSI CHEAT ---
  mov byte ptr[rcx+51],00
  mov byte ptr[rcx+52],01

Back_Invinc:
  readmem(Invincibility, 5)
  jmp return

  align 10 CC
  pPlayer1:
  dq 0

  align 10 CC
  pPlayer2:
  dq 0

  align 10 CC

Invincibility:
  jmp SharedMem+20
return:

{$lua}
[DISABLE]

if syntaxcheck then return end

-- Fungsi untuk mengembalikan status normal
local function RestorePlayer(ptrName)
  local pAddr = getAddressSafe(ptrName)
  if pAddr then
    local pPlayerPtr = readQword(pAddr)
    -- Pastikan pointer valid dan tidak kosong
    if pPlayerPtr and pPlayerPtr ~= 0 then
      writeByte(pPlayerPtr + 0x51, 1)
      writeByte(pPlayerPtr + 0x52, 0)
    end
  end
end

-- Restore Player 1
RestorePlayer('pPlayer1')
-- Restore Player 2
RestorePlayer('pPlayer2')

{$asm}
Invincibility:
  readmem(Back_Invinc, 5)
unregistersymbol(*)
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>3</ID>
          <Description>"Always HyperCharged"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if not syntaxcheck and getAddressSafe('SharedMem') == nil then
  messageDialog("Enable Script belum diaktifkan!", mtError, mbOK)
  return
end
{$asm}

aobscanmodule(AlwaysHyperCharged,GameAssembly.dll,74 03 B0 01 C3 F3)
registersymbol(AlwaysHyperCharged Back_Hyper)
label(Back_Hyper)

SharedMem+A0:
Back_Hyper:
  readmem(AlwaysHyperCharged, 2)
  
  align 10 CC

AlwaysHyperCharged:
  nop 02

[DISABLE]
AlwaysHyperCharged:
  readmem(Back_Hyper, 2)

unregistersymbol(*)
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>4</ID>
          <Description>"Infinite Jump"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if not syntaxcheck and getAddressSafe('SharedMem') == nil then
  messageDialog("Enable Script belum diaktifkan!", mtError, mbOK)
  return
end
{$asm}

aobscanmodule(InfiniteJump,GameAssembly.dll,7F 0E F3 0F 10 43 74)
registersymbol(InfiniteJump Back_Jump)
label(Back_Jump)

SharedMem+B0:
Back_Jump:
  readmem(InfiniteJump, 1)

  align 10 CC

InfiniteJump:
  db EB

[DISABLE]
InfiniteJump:
  readmem(Back_Jump, 1)

unregistersymbol(*)
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>5</ID>
          <Description>"Freeze Stage Timer"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if not syntaxcheck and getAddressSafe('SharedMem') == nil then
  messageDialog("Enable Script belum diaktifkan!", mtError, mbOK)
  return
end
{$asm}

aobscanmodule(FreezeStageTimer,GameAssembly.dll,F3 0F 11 8B B0 00 00 00 0F 86)
registersymbol(FreezeStageTimer Back_Timer)

label(Back_Timer return pSetTimer)

SharedMem+C0:
  minss xmm1,[pSetTimer]

Back_Timer:
  readmem(FreezeStageTimer, 8)
  jmp return

  align 10 CC
  pSetTimer:
  dd (float)01
  
  align 10 CC

FreezeStageTimer:
  jmp SharedMem+C0
  nop 3
return:

[DISABLE]
FreezeStageTimer:
  readmem(Back_Timer, 8)

unregistersymbol(*)
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>6</ID>
          <Description>"Stop Combo Timer"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if not syntaxcheck and getAddressSafe('SharedMem') == nil then
  messageDialog("Enable Script belum diaktifkan!", mtError, mbOK)
  return
end
{$asm}

aobscanmodule(StopComboTimer,GameAssembly.dll,F3 0F 11 8B C0 00 00 00 48 85)
registersymbol(StopComboTimer Back_Combo)

label(Back_Combo return pSetComboTimer)

SharedMem+F0:
  maxss xmm1,[pSetComboTimer]

Back_Combo:
  readmem(StopComboTimer, 8)
  jmp return
  
  align 10 CC
  pSetComboTimer:
  dd (float)04
  
  align 10 CC

StopComboTimer:
  jmp SharedMem+F0
  nop 3
return:

[DISABLE]
StopComboTimer:
  readmem(Back_Combo, 8)

unregistersymbol(*)
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>7</ID>
          <Description>"Auto Complete Challenge"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if not syntaxcheck and getAddressSafe('SharedMem') == nil then
  messageDialog("Enable Script belum diaktifkan!", mtError, mbOK)
  return
end
{$asm}

aobscanmodule(AutoCompleteChallenge,GameAssembly.dll,0F B6 47 48 48 8D 4C 24 20)
registersymbol(AutoCompleteChallenge Back_Challenge)

label(Back_Challenge return)

SharedMem+120:
  fild dword ptr[rdi+28]
  fistp dword ptr[rdi+30]
  mov byte ptr[rdi+48],01

Back_Challenge:
  readmem(AutoCompleteChallenge, 9)
  jmp return
  
  align 10 CC

AutoCompleteChallenge:
  jmp SharedMem+120
  nop 4
return:

[DISABLE]
AutoCompleteChallenge:
  readmem(Back_Challenge, 9)

unregistersymbol(*)
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>8</ID>
          <Description>"Infinite Orb"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if not syntaxcheck and getAddressSafe('SharedMem') == nil then
  messageDialog("Enable Script belum diaktifkan!", mtError, mbOK)
  return
end
{$asm}

aobscanmodule(InfiniteOrb,GameAssembly.dll,8B 5B 18 3B DE)
registersymbol(InfiniteOrb Back_Orb)

label(Back_Orb return)

SharedMem+140:
  fild dword ptr[rbx+14]
  fistp dword ptr[rbx+18]

Back_Orb:
  readmem(InfiniteOrb, 5)
  jmp return
  
  align 10 CC

InfiniteOrb:
  jmp SharedMem+140
return:

[DISABLE]
InfiniteOrb:
  readmem(Back_Orb, 5)

unregistersymbol(*)
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>9</ID>
          <Description>"Gravity Modifier (Flight Mode)"</Description>
          <Options moHideChildren="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{$lua}
if syntaxcheck then return end

[ENABLE]

if not syntaxcheck and getAddressSafe('SharedMem') == nil then
  messageDialog("Enable Script belum diaktifkan, aktifkan terlebih dahulu!!!", mtError, mbOK)
  return
end

{$asm}
aobscanmodule(pGravity,GameAssembly.dll,F3 0F 10 42 3C 0F)

registersymbol(pGravity Back_Gravity PlayerActive pFly pKeyJump pKeyUp pKeyDown)
label(PlayerActive Back_Gravity return pFly pKeyJump pKeyUp pKeyDown)

// [ Offset +160 ]
SharedMem+160:
  cmp dword ptr[rdx+48],00
  jne Back_Gravity
  mov [pFly],rdx
  mov dword ptr [PlayerActive], 1

Back_Gravity:
  readmem(pGravity, 5)
  jmp return

  // Variable disimpan di akhir blok ini
  align 10 CC
  pFly:
  dq 0

  align 10 CC
  PlayerActive: // Variable flag
  dd 00

  // DEFAULT KEYS (Hex Values) - Diinisialisasi di sini
  align 10 CC
  pKeyJump:
  dd 20 // Space
  align 10 CC
  pKeyUp:
  dd 57 // W
  align 10 CC
  pKeyDown:
  dd 53 // S

{$lua}
if Jatuh then
  Jatuh.destroy()
  Jatuh = nil
end

Jatuh = createTimer()
Jatuh.Interval = 50

Jatuh.OnTimer = function()
  -- [FIX] Cek alamat Flag terlebih dahulu
  local flagAddr = getAddressSafe('PlayerActive')
  if flagAddr == nil then return end

  -- [FIX] Cek Heartbeat: Apakah game baru saja menjalankan kode player?
  local isActive = readInteger(flagAddr)
  if isActive ~= 1 then
      return -- JIKA 0, BERARTI SEDANG LOADING/CUTSCENE -&gt; STOP (JANGAN TULIS)
  end

  local addr = getAddressSafe('pFly')
  if addr == nil then return end

  local playerPtr = readQword(addr)
  -- Validasi pointer extra ketat
  if playerPtr == nil or playerPtr == 0 then return end

   -- Baca Keys
  local jumpCode = readInteger(getAddressSafe('pKeyJump'))
  local upCode   = readInteger(getAddressSafe('pKeyUp'))
  local downCode = readInteger(getAddressSafe('pKeyDown'))

  if jumpCode == nil then return end -- Safety extra

  local isJump = isKeyPressed(jumpCode)
  local isUp   = isKeyPressed(upCode)
  local isDown = isKeyPressed(downCode)

  local velocityAddr = playerPtr + 0x3C

  -- Gunakan pcall (protected call) untuk mencegah crash jika memori mendadak hilang saat write
  local success, err = pcall(function()
      if isJump and isUp then
          writeFloat(velocityAddr, 4.5)
      elseif isJump and isDown then
          writeFloat(velocityAddr, -5.0)
      elseif isJump then
          writeFloat(velocityAddr, 0.0)
      else
          writeFloat(velocityAddr, -17.5)
      end
  end)

  -- [FIX] Reset Flag ke 0. Lua menunggu Assembly mengubahnya jadi 1 lagi di frame berikutnya.
  writeInteger(flagAddr, 0)
end

{$asm}
pGravity:
  jmp SharedMem+160
return:

{$lua}
[DISABLE]

if Jatuh then Jatuh.destroy() Jatuh = nil end
local addr = getAddressSafe('pFly')
-- Restore gravity normal saat disable (opsional, pakai pcall biar aman)
if addr then
  local playerPtr = readQword(addr)
  if playerPtr and playerPtr ~= 0 then
    pcall(writeFloat, playerPtr + 0x3C, -17.5)
  end
end

{$asm}
pGravity:
  readmem(Back_Gravity, 5)
unregistersymbol(*)
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>100</ID>
              <Description>"Button (Hold) to HOVER / FLY"</Description>
              <DropDownList ReadOnly="1" DescriptionOnly="1" DisplayValueAsItem="1">32:Keyboard: Space
17:Keyboard: Ctrl
16:Keyboard: Shift
18:Keyboard: Alt
88:Keyboard: X
67:Keyboard: C
86:Keyboard: V
22528:Gamepad: A (Button)
22529:Gamepad: B (Button)
22530:Gamepad: X (Button)
22531:Gamepad: Y (Button)
22533:Gamepad: LB (Left Shoulder)
22532:Gamepad: RB (Right Shoulder)
22534:Gamepad: LT (Left Trigger)
22535:Gamepad: RT (Right Trigger)
22550:Gamepad: L3 (Stick Press)
22551:Gamepad: R3 (Stick Press)
</DropDownList>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>4 Bytes</VariableType>
              <Address>pKeyJump</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>101</ID>
              <Description>"Button to Move UP"</Description>
              <DropDownList ReadOnly="1" DescriptionOnly="1" DisplayValueAsItem="1">87:Keyboard: W
38:Keyboard: Arrow UP
22560:Gamepad: Left Analog UP
22576:Gamepad: Right Analog UP
22544:Gamepad: D-Pad UP
22531:Gamepad: Y (Button)
22528:Gamepad: A (Button)
22533:Gamepad: LB (Left Shoulder)
</DropDownList>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>4 Bytes</VariableType>
              <Address>pKeyUp</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>102</ID>
              <Description>"Button to Move DOWN"</Description>
              <DropDownList ReadOnly="1" DescriptionOnly="1" DisplayValueAsItem="1">83:Keyboard: S
40:Keyboard: Arrow DOWN
17:Keyboard: Ctrl
22561:Gamepad: Left Analog DOWN
22577:Gamepad: Right Analog DOWN
22545:Gamepad: D-Pad DOWN
22528:Gamepad: A (Button)
22529:Gamepad: B (Button)
22534:Gamepad: LT (Left Trigger)
</DropDownList>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>4 Bytes</VariableType>
              <Address>pKeyDown</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
</CheatTable>
