4.0 CheatDroid is rebuilt from scratch, and a 2.x license carries over. What changed
CheatDroid

How to Run GameGuardian Lua Scripts in CheatDroid

CheatDroid runs Lua scripts with GameGuardian’s gg functions. A script searches and changes a game’s memory for you, and asks its questions in the floating window over the game. Here’s how to get one running, and what a script can’t do in CheatDroid.

What you need

  • A rooted phone and CheatDroid 4.1 or newer.
  • The game installed. CheatDroid starts it when you run a script, if it isn’t running.
  • Permission to draw over other apps, so the script’s menu can open over the game. Without it the questions come on CheatDroid’s own screen instead, which works, with more switching.

Run one

  1. In CheatDroid, tap the game, then Memory, then the code icon at the top: Scripts.
  2. Two examples are there to start with. Change a number asks for a number you see in the game, narrows it down while you change it, and sets it. Menu over the game waits for a tap on the floating button and opens a menu, the way most published GameGuardian scripts work.
  3. For a script of your own, tap the file icon to import a .lua file, or + to write one.
  4. Tap Run. The game comes to the front with CheatDroid’s button floating over it. A question from the script opens the window on its Script tab, and it folds back to the button once you’ve answered.
  5. Stop ends the script at any point, in the window or on the Scripts screen. What it printed stays there, along with the line of any error.

What a script can use

The functions GameGuardian scripts call most: gg.searchNumber (with ranges, groups, ;text and h hex), refineNumber, searchFuzzy, getResults, editAll, getValues, setValues, addListItems with freeze, setRanges and getRangesList, getTargetInfo, processPause and processResume, timeJump, and the dialogs: alert, choice, multiChoice, prompt and toast. isVisible, setVisible, showUiButton and isClickedUiButton work with CheatDroid’s floating button. The constants have GameGuardian’s values, so a script that hardcodes 4 for TYPE_DWORD gets the same thing.

The Lua is luaj’s 5.2 with 5.3’s operators added: gg.REGION_C_ALLOC | gg.REGION_ANONYMOUS, &, ~, <<, >> and // all work.

What it can’t

  • No speedhack: gg.setSpeed does nothing.
  • No network and no files. A script can’t download anything, send anything, or read and write files on the phone. It can search and change the game’s memory, stop the game, and move the clock. That’s deliberate: a script someone posted gets root-level access to the game and nothing beyond it.
  • No compiled scripts. A .lua file that starts with ESC L is GameGuardian bytecode, which only GameGuardian loads. CheatDroid needs the source.
  • A gg function CheatDroid doesn’t have, pointer search among them, stops the script with an error that names it.

Pro

Running a script is free as long as it only searches and reads. The first time a script sets a value, freezes one or jumps the clock, it stops there and offers Pro, the same rule as setting a value by hand.

Writing your own

Four lines are enough for coins you can see:

local now = gg.prompt({"Coins now"}, {""}, {"number"})
gg.searchNumber(now[1], gg.TYPE_DWORD)
gg.getResults(gg.getResultsCount())
gg.editAll("999999", gg.TYPE_DWORD)

With thousands of matches that sets every one of them, which can upset a game. The Change a number example narrows the search first; open it with Edit and copy from there. When a value won’t move, the memory guide says why, and that holds for scripts too.

Coming from GameGuardian? Here’s how the two compare.

Download CheatDroid