Skip to content

Instantly share code, notes, and snippets.

@JARVIS-AI
Last active April 5, 2024 11:16
Show Gist options
  • Star 46 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
  • Save JARVIS-AI/cfb916c7dc3bea73abf0edac42749ea8 to your computer and use it in GitHub Desktop.
Save JARVIS-AI/cfb916c7dc3bea73abf0edac42749ea8 to your computer and use it in GitHub Desktop.
Chrome Dino game cheats

Hack Google Chrome and Make your Dinosaur Immortal

The game can be hacked pretty easily, making your dinosaur not even flinch at the sight of a cactus.

To hack the game, first go the the error message page where your dinosaur is hanging out.

Go ahead and press the space bar to start the game. Once the game starts, right-click and select Inspect” to open up Chrome DevTools, then select the Console tab.

You can also do this by using the Ctrl+Shift+I shortcut, which takes you straight to the Console tab of DevTools.

Open Chrome Console

  • Make sure you are on the No Internet Connection page.
  • Right click anywhere on the page and select Inspect.
  • Go to Console tab. This is where we will enter the commands to tweak the game.

Tweaking Speed

Type the following command in Console and press enter. You can use any other speed in place of 1000.

Runner.instance_.setSpeed(1000)

Immortality

After every command press enter. All the commands are case-sensitive.

We store the original game over function in a variable:

var original = Runner.prototype.gameOver

Then, we make the game over function empty:

Runner.prototype.gameOver = function(){}

Stopping the game after using Immortality

When you want to stop the game, Revert back to the original game over function:

Runner.prototype.gameOver = original

Setting the current score

Let’s set the score to 12345. You can set any other score less than 99999. The current score is reset on game over.

Runner.instance_.distanceRan = 12345 / Runner.instance_.distanceMeter.config.COEFFICIENT

Dino jumping too high?

You can control how high the dino jumps by using the below function. Adjust the value as necessary.

Runner.instance_.tRex.setJumpVelocity(10)
@SweetPotatoes76
Copy link

Beat That Score !!!!

@Bouiboui0807
Copy link

Gg, my highscore is something like 10e 15. A one with 15 zero after.

@Bouiboui0807
Copy link

Without cheats, it's 7000

@Bouiboui0807
Copy link

@SweetPotatoes76 , set your height at -20 it will work better.

Runner.instance_.tRex.config.HEIGHT = -20

@bigboihampter
Copy link

try beat me
image

@justtheacc
Copy link

try beat me image

ok i beat you
Untitled

@stfukiddo
Copy link

prova a picchiarmiImmagine

ok ti ho battuto Senza titolo

Schermata 2023-03-26 alle 14 19 08
i beat you lmao

@suryahati
Copy link

IMG_2023-05-11-08-53-44-735
i beat you pussy

@HogwartsTeacherSnape
Copy link

HogwartsTeacherSnape commented May 18, 2023

Screenshot 2022-02-20 18 42 33

try to beat my hi score

I just did...

Screenshot 2023-05-18 5 59 17 PM

@BlazeInferno64
Copy link

BlazeInferno64 commented May 19, 2023

Lol 😂

Dino is now immortal XD

16845188482259081133423038256714

@eddieO132
Copy link

Super Dino:

var original = Runner.prototype.gameOver
Runner.prototype.gameOver = function(){}
Runner.instance_.setSpeed(100)
window.addEventListener("keydown", checkKeyPressed, false);
function checkKeyPressed(l) {if(l.keyCode=="32" || l.keyCode=="38"){scoreaddh()};
function scoreaddh() {
Runner.instance_.distanceRan = Runner.instance_.distanceRan + 100000 /
    Runner.instance_.distanceMeter.config.COEFFICIENT;}}

@DontStalk
Copy link

image
try beating me i dare yall

@MadMrDino
Copy link

My HI SCORE is 205276

@sudoer-Huatao
Copy link

Here's code for a bot that plays:

function TrexRunnerBot() {
  const makeKeyArgs = (keyCode) => {
    const preventDefault = () => void 0;
    return {keyCode, preventDefault};
  };
  const upKeyArgs = makeKeyArgs(38);
  const downKeyArgs = makeKeyArgs(40);
  const startArgs = makeKeyArgs(32);
  if (!Runner().playing) {
    Runner().onKeyDown(startArgs);
    setTimeout(() => {
      Runner().onKeyUp(startArgs);
    }, 500);
  }
  function conquerTheGame() {
    if (!Runner || !Runner().horizon.obstacles[0]) return;
    const obstacle = Runner().horizon.obstacles[0];
    if (obstacle.typeConfig && obstacle.typeConfig.type === 'SNACK') return;
    if (needsToTackle(obstacle) && closeEnoughToTackle(obstacle)) tackle(obstacle);
  }
  function needsToTackle(obstacle) {
    return obstacle.yPos !== 50;
  }
  function closeEnoughToTackle(obstacle) {
    return obstacle.xPos <= Runner().currentSpeed * 18;
  }
  function tackle(obstacle) {
    if (isDuckable(obstacle)) {
      duck();
    } else {
      jumpOver(obstacle);
    }
  }
  function isDuckable(obstacle) {
    return obstacle.yPos === 50;
  }
  function duck() {
    Runner().onKeyDown(downKeyArgs);
    setTimeout(() => {
      Runner().onKeyUp(downKeyArgs);
    }, 500);
  }
  function jumpOver(obstacle) {
    if (isNextObstacleCloseTo(obstacle))
      jumpFast();
    else
      Runner().onKeyDown(upKeyArgs);
  }
  function isNextObstacleCloseTo(currentObstacle) {
    const nextObstacle = Runner().horizon.obstacles[1];
 
    return nextObstacle && nextObstacle.xPos - currentObstacle.xPos <= Runner().currentSpeed * 42;
  }
  function jumpFast() {
    Runner().onKeyDown(upKeyArgs);
    Runner().onKeyUp(upKeyArgs);
  }
  return {conquerTheGame: conquerTheGame};
}
let bot = TrexRunnerBot();
let botInterval = setInterval(bot.conquerTheGame, 2);

@sudoer-Huatao
Copy link

image
try beating me i dare yall

It's actually not that hard. Just use this:

let hackScore = 0;
 
Object.defineProperty(Runner.instance_, 'distanceRan', {
  get: () => hackScore,
  set: (value) => hackScore = value + Math.floor(Math.random() * 1000),
  configurable: true,
  enumerable: true,
});

Change the 1000 to whatever you want, so the score updates REALLY fast!

@Mustafar2
Copy link

do Runner.prototype.gameOver = false <------- to pause when collision is made between t-rex and cactus or pterodactyl

No - the other invincible is better.

@lethimcook-lethimcook
Copy link

beat this i dare you
image

@Mustafar2
Copy link

i still dont know how to change character in the dino game

You can't

@congaterori
Copy link

congaterori commented Oct 12, 2023

i still dont know how to change character in the dino game

i still dont know how to change character in the dino game

You can't

go into the page dino or disconnect internet
press F12
image
click into the arrow on that line
image
edit these into the url of image, you can find template on internet, but i have these
it could be url or base 64 image like i have
image
image
copy it!
go back to dino tab and double click on the sources, it will show like this, then just paste new link in
image
image
image
Don't refresh the page, just close the code window then it should be ok or just click in the screen of dino
If you want to create your own image, you can download the image of the original image in the code and then edit it with Photoshop or other software

@king783421
Copy link

also there is a new move which is the down arrow button (note: this is only for laptops/pc)

@Aidandapro6999
Copy link

Beat That Score !!!!

EZ as hell, 159500

@adamadamssAdez
Copy link

trex-screenshot
Beat that score !

@lethimcook-lethimcook
Copy link

lethimcook-lethimcook commented Dec 12, 2023

ez
image

@randomstuff69
Copy link

i used chatgpt to make a bookmarklet to type the score to set it in a box javascript:(function(){var distanceValue = prompt("Enter the new distance value:");if(distanceValue !== null){Runner.instance_.distanceRan = parseFloat(distanceValue) / Runner.instance_.distanceMeter.config.COEFFICIENT;}})();

@BubbuDert249
Copy link

BubbuDert249 commented Feb 23, 2024

i already beat da score by:v window.addEventListener("keydown", checkKeyPressed, false);
function checkKeyPressed(l) {if(l.keyCode=="32" || l.keyCode=="38"){scoreaddh()};
function scoreaddh() {
Runner.instance_.distanceRan = Runner.instance_.distanceRan + 43574356347863 /
Runner.instance_.distanceMeter.config.COEFFICIENT;}}

@HogwartsTeacherSnape
Copy link

HogwartsTeacherSnape commented Feb 23, 2024 via email

@PotentialMate
Copy link

PotentialMate commented Mar 2, 2024

Sonic in chrome dino game:

https://i.imgur.com/Jd6xA7i.png

copy that and paste it

@anassaahi
Copy link

anassaahi commented Mar 4, 2024

how can i restore all the changes made

@Robertaliyah
Copy link

Bet who can beat me
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment