Skip to content

Instantly share code, notes, and snippets.

@JARVIS-AI
Last active December 6, 2025 10:45
Show Gist options
  • Select an option

  • Save JARVIS-AI/cfb916c7dc3bea73abf0edac42749ea8 to your computer and use it in GitHub Desktop.

Select an option

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)
@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

@Darkness987654321
Copy link

Screenshot 2024-01-21 8 35 53 PM
Screenshot 2024-01-21 8 10 47 PM
killer screen n 999999

@SonicFan2024andBeyond
Copy link

SonicFan2024andBeyond commented Jun 3, 2024

Στιγμιότυπο οθόνης 2024-06-03 214043
Who can defat me now?!

@wompwompcryboutit
Copy link

uh guys i think i broke
Captura de tela 2024-06-04 195940
the game accidentally

@ATS-001
Copy link

ATS-001 commented Jun 8, 2024

image
beated btw, its not243048 its 243048726430904523

@keperman209
Copy link

This removes all cacti.

// Access the Dino game instance
var runner = Runner.instance_;

// Function to remove all cactuses
function removeCactuses() {
runner.horizon.obstacles = [];
}

// Call the function to remove cactuses every frame
runner.gameOver = function() {
removeCactuses();
requestAnimationFrame(runner.gameOver);
}

// Activate the hack by starting the game
runner.playing = true;
runner.runningTime = 0;
runner.setSpeed(10);
requestAnimationFrame(runner.gameOver);

@Masikhacker
Copy link

beat the score:999999

@roblox14444122222
Copy link

bet i will beat all of yuor guys scre >:)

@roblox14444122222
Copy link

i think i broked the systen
4214412224

@CYB3RN3T1C4-PR1M3
Copy link

Screenshot (4)
mines almost 1 million

@KingBelisariusIV
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);

Hey if you don't mind can you explain this code to me I'm new to Javascript and I want to understand every script I look at even though I know the basics this code is really confusing could you please explain it if you have discord add me I'm kingbelisariusix

@Archit-jpg
Copy link

Screenshot 2024-09-26 220409

@DREwX-code
Copy link

DREwX-code commented Oct 22, 2024

DINOcheat — The Ultimate Script for the Chrome Dino Game

Take full control of the Chrome/Google Dino game with advanced features:
auto-bot, speed control, custom score, immortality, invisibility, air-walk,
pause/resume, 16 skins, and more.

Install the script on GreasyFork:
DINOcheat

Preview of the menu:

DINOcheat Menu

@Expl0itmarker
Copy link

(function() {
// Check if the injector is already loaded
if (window.dinoInjectorLoaded) {
alert("⚡ Injector is already loaded!");
return;
}
window.dinoInjectorLoaded = true;

// Create panel
let panel = document.createElement("div");
panel.style.cssText = `
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 360px;
    background: #1e1e1e;
    padding: 20px;
    border-radius: 12px;
    z-index: 9999;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    border: 2px solid #444;
    transition: 0.3s ease;
`;
document.body.appendChild(panel);

// Injector header
panel.innerHTML = `
    <h2 style="font-size: 20px; margin: 0; padding: 10px; background-color: #333; border-radius: 8px;">🚀 Dino Injector</h2>
    <p style="margin-top: 10px; color: #bbb;">Powerful injector for Dino Game</p>
`;

// Panel drag functionality
let isDragging = false;
let offsetX, offsetY;

panel.addEventListener('mousedown', (e) => {
    isDragging = true;
    offsetX = e.clientX - panel.getBoundingClientRect().left;
    offsetY = e.clientY - panel.getBoundingClientRect().top;
    document.body.style.cursor = 'move';
});

document.addEventListener('mousemove', (e) => {
    if (isDragging) {
        panel.style.top = e.clientY - offsetY + 'px';
        panel.style.left = e.clientX - offsetX + 'px';
    }
});

document.addEventListener('mouseup', () => {
    isDragging = false;
    document.body.style.cursor = 'auto';
});

// Function to create buttons
function createButton(text, onClick) {
    let btn = document.createElement("button");
    btn.innerText = text;
    btn.style.cssText = `
        display: block;
        width: 100%;
        margin: 10px 0;
        padding: 12px;
        background: #333;
        color: white;
        border: none;
        cursor: pointer;
        font-size: 14px;
        border-radius: 8px;
        transition: background 0.3s ease;
    `;
    btn.onmouseover = () => (btn.style.background = "#444");
    btn.onmouseout = () => (btn.style.background = "#333");
    btn.onclick = onClick;
    panel.appendChild(btn);
}

// Cheat functions
let isESPEnabled = false;
let isSpeedHackEnabled = false;
let isJumpHackEnabled = false;
let isGravityHackEnabled = false;
let isWallHackEnabled = false;
let isInfiniteLivesEnabled = false;
let isSuperSpeedEnabled = false;
let isSuperJumpEnabled = false;
let isGiantDinoEnabled = false;
let isBackgroundChanged = false;
let isDinoColorChanged = false;

// Enable ESP
function enableESP() {
    alert("✔ ESP activated! Objects will now be highlighted.");
    isESPEnabled = true;
    const dino = Runner.instance_.tRex;
    setInterval(() => {
        if (dino) {
            dino.draw();  // Example ESP
        }
    }, 100);
}

// Enable Auto Jump
function enableJumpHack() {
    alert("✔ Auto-jump activated!");
    isJumpHackEnabled = true;
    const dino = Runner.instance_.tRex;
    setInterval(() => {
        if (dino && !dino.jumping) {
            dino.setJumping(true);
        }
    }, 100);
}

// Enable Speed Hack
function enableSpeedHack() {
    alert("✔ Speed increased!");
    isSpeedHackEnabled = true;
    Runner.instance_.setSpeed(2);
}

// Enable Gravity Hack
function enableGravityHack() {
    alert("✔ Gravity reduced!");
    isGravityHackEnabled = true;
    Runner.instance_.gravity_ = 0.2;
}

// Enable Wall Hack
function enableWallHack() {
    alert("✔ Wall Hack activated! Dinosaur now passes through obstacles.");
    isWallHackEnabled = true;
    const dino = Runner.instance_.tRex;
    setInterval(() => {
        if (dino) {
            dino.xPos = Runner.instance_.currentSpeed;
        }
    }, 50);
}

// Enable Infinite Lives
function enableInfiniteLives() {
    alert("✔ Infinite lives activated!");
    isInfiniteLivesEnabled = true;
    Runner.instance_.gameOver = () => {};  // Player doesn't die
}

// Enable Super Speed
function enableSuperSpeed() {
    alert("✔ Super speed activated!");
    isSuperSpeedEnabled = true;
    Runner.instance_.setSpeed(9000);  // Max speed
}

// Enable Super Jump
function enableSuperJump() {
    alert("✔ Super jump activated!");
    isSuperJumpEnabled = true;
    Runner.instance_.tRex.jumpVelocity = 20;  // Increased jump speed
}

// Enable Giant Dinosaur
function enableGiantDino() {
    alert("✔ Giant dinosaur activated!");
    isGiantDinoEnabled = true;
    const dino = Runner.instance_.tRex;
    dino.dinoElement.style.transform = 'scale(3)';  // Increase dinosaur size
}

// Change background with your gradient
function changeBackground() {
    if (!isBackgroundChanged) {
        document.body.style.background = "linear-gradient(to right, #ff7e5f, #feb47b)";
        alert("✔ Background changed to gradient!");
        isBackgroundChanged = true;
    } else {
        document.body.style.background = "";
        alert("✔ Background restored!");
        isBackgroundChanged = false;
    }
}

// Change Dino color
function changeDinoColor() {
    if (!isDinoColorChanged) {
        const dino = Runner.instance_.tRex;
        dino.dinoElement.style.backgroundColor = "red";  // Change dinosaur color
        alert("✔ Dinosaur color changed!");
        isDinoColorChanged = true;
    } else {
        const dino = Runner.instance_.tRex;
        dino.dinoElement.style.backgroundColor = "";
        alert("✔ Dinosaur color restored!");
        isDinoColorChanged = false;
    }
}

// Add buttons
createButton("🔍 Enable ESP", enableESP);
createButton("⛷ Enable Auto-jump", enableJumpHack);
createButton("⚡ Enable Speed Hack", enableSpeedHack);
createButton("🌍 Enable Gravity Hack", enableGravityHack);
createButton("🚧 Enable Wall Hack", enableWallHack);
createButton("💥 Enable Infinite Lives", enableInfiniteLives);
createButton("💨 Enable Super Speed", enableSuperSpeed);
createButton("🌟 Enable Super Jump", enableSuperJump);
createButton("🦖 Enable Giant Dinosaur", enableGiantDino);
createButton("🌄 Change Background", changeBackground);
createButton("🌈 Change Dinosaur Color", changeDinoColor);

// Script input field
let inputScriptButton = document.createElement("button");
inputScriptButton.innerText = "Enter Script";
inputScriptButton.style.cssText = `
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 12px;
    background: #333;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    border-radius: 8px;
    transition: background 0.3s ease;
`;
inputScriptButton.onclick = () => {
    let script = prompt("Enter your script:");
    if (script) {
        try {
            eval(script);
            alert("✔ Script executed successfully!");
        } catch (e) {
            alert("❌ Error executing script!");
        }
    }
};
panel.appendChild(inputScriptButton);

alert("⚡ Dino Injector loaded! Press the button to activate cheats.");

})();
this hack works whichout tampermonkey and very good he can execute scripts

@FarLion
Copy link

FarLion commented Mar 20, 2025

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);

Hey if you don't mind can you explain this code to me I'm new to Javascript and I want to understand every script I look at even though I know the basics this code is really confusing could you please explain it if you have discord add me I'm kingbelisariusix

Here If you want to stop the bot

clearInterval(botInterval);
bot = null;

@FarLion
Copy link

FarLion commented Mar 20, 2025

to stop the automated bot

clearInterval(botInterval);
bot = null;

@UGcounsel
Copy link

beat this i dare you image
Let me cook
Screenshot 2025-05-17 112232

@mekadi
Copy link

mekadi commented Aug 2, 2025

Beat That Score !!!!

EZ as hell, 159500

Hell is not easy. and you will regret your joke unless you become repentant and worship to only one God who does not have any partner before your death.

Those who reject our Signs, We shall soon cast into the Fire: as often as their skins are roasted through, We shall change them for fresh skins, that they may taste the penalty: for Allah is Exalted in Power, Wise. (4/56)

@tibeembrechts
Copy link

when i try to execute anything i get a fault
image

@tibeembrechts
Copy link

tibeembrechts commented Sep 9, 2025

this is with everything

@MateoMateoMateoMateo
Copy link

replace instance_ with getInstance()

@ASHIK-NISHON
Copy link

they changed the names

@web-coder-of-rpi
Copy link

web-coder-of-rpi commented Nov 19, 2025

when i try to execute anything i get a fault image

Use runnerInstance.setSpeed()

@Mrvishalojha
Copy link

Hello,
My name is Vishal Ojha, and I am the owner of the premium domain DinoGame.us — a highly relevant and memorable name closely related to the iconic Google Dinosaur Game that became popular worldwide.

This domain is perfect for creating your own 2D or 3D dinosaur game, launching a gaming platform, or even using it as a side project to enhance your portfolio. Because of its strong keyword relevance, DinoGame.us has excellent potential for ranking on Google and other search engines.

I am offering this domain for just $50 for a limited time. If you want to secure it, simply type DinoGame.us in your browser's URL bar, and you will be redirected to the GoDaddy checkout page.

If you are interested or have any questions, feel free to contact me at:
📩 VishalOjha361@gmail.com

Thank you,
Vishal Ojha

@web-coder-of-rpi
Copy link

I cranked the speed up so high that I was surpassing 999,999 so many times that the distance meter started going down.

@web-coder-of-rpi
Copy link

I cranked the speed up so high that I was surpassing 999,999 so many times that the distance meter started going down.

That's what it looked like; I was not losing distance, really.

@cipek1981
Copy link

no hacks on this dino version

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