Assembly Button?

Kalas

Cat'n America!
Fearless Donors
Mar 3, 2017
499
28
28
#1
I have this code:
Code:
local tag = sender.Tag; 
   if (tag == 0) then 
      sender.Tag = 1; 
      autoAssemble([[//enable script]]) 
   else 
      sender.Tag = 0 
      autoAssemble([[//disable script]]) 
   end
I wonder how do I make it as button in Cheat Engine Trainer Generator?

What I did was placing a button, go to event and click on OnEnter, so for example in the code I posted I suppose to put my enable code in this part?:

([[//enable script]])

and my disable in the other one?

This is my Script I want to add as a button:
Code:
{ Game   : TheForest.exe
  Version: 
  Date   : 2017-07-07
  Author : Kalas

  This script does blah blah blah
}

[ENABLE]

aobscan(PlayerStatsAOB,00 83 C4 10 D9 87 18 01 00 00)
alloc(newmem,$100,PlayerStatsAOB)

label(code)
label(return)

newmem:

code:
  fld dword ptr [edi+00000118]
  mov [edi+0000010C],(float)37 // BodyTemp
  mov [edi+00000110],(float)70 // HeartRate
  mov [edi+00000118],(float)100 // Stamina
  mov [edi+0000011C],(float)100 // Health
  mov [edi+00000124],(float)100 // Energy
  mov [edi+00000134],(float)100 // BatteryCharge
  mov [edi+00000150],(float)1 // Fullness
  mov [edi+00000154],(float)0 // Thirst
  mov [edi+00000231],0 // IsBloody
  mov [edi+00000232],0 // IsRed
  mov [edi+00000233],0 // IsCold
  jmp return

PlayerStatsAOB+04:
  jmp newmem
  nop
return:
registersymbol(PlayerStatsAOB)

[DISABLE]

PlayerStatsAOB+04:
  db D9 87 18 01 00 00

unregistersymbol(PlayerStatsAOB)
dealloc(newmem)
 
Top Bottom