Open Cheat Engine and grant root access. Launch temple run and play for a few seconds. Now switch to Cheat Engine and click on the Android icon. Scroll the apps list and select it. In the next popup, enter a value and hit scan.
You'll see multiple codes with the value you entered. Run the game again and crack the previous score. Visit Cheat Engine and enter the score. Finally, type your desired numbers and apply changes to all the codes.