Please Wait While we Load Website For You😊
Get TikTok Likes in Just 03 Pkr/- at Snakify SMM Store BUY NOW!

Hacking the Chrome Dino Game

Hack Chrome Dino Game - Ultimate Guide

Hack Chrome Dino Game - Ultimate Guide

Google Chrome includes an endless runner Dinosaur (T-Rex) game which appears in the absence of an internet connection. Let’s put on our hacker hats and try to mess with this game.

If you are unable to get the No Internet page, open a new tab and type chrome://dino and press enter.

The game is written in JavaScript, and we can override functions to modify its behavior using the Chrome console.

Playing

  • Space Bar / Up: Jump (also to start the game)
  • Down: Duck (pterodactyls appear after 450 points)
  • Alt: Pause
  • The game enters a black background mode after every multiple of 700 points for 100 points.

Open Chrome Console

Right-click anywhere on the No Internet page, select Inspect, then go to the Console tab. Enter the commands below to tweak the game.

Enable Immortality (God Mode)

var original = Runner.prototype.gameOver;
Runner.prototype.gameOver = function(){};

Change Game Speed

Runner.instance_.setSpeed(1000);

Set a Custom Score

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

Adjust Jumping Height

Runner.instance_.tRex.setJumpVelocity(10);

Walk in Air

Runner.instance_.tRex.groundYPos = 0;

To go back to the ground:

Runner.instance_.tRex.groundYPos = 93;

Auto-Play

function dispatchKey(type, key) {
    document.dispatchEvent(new KeyboardEvent(type, {keyCode: key}));
}
setInterval(function () {
    const SPACE_BAR = 32;
    const ARROW_DOWN = 40;
    const canvasHeight = Runner.instance_.dimensions.HEIGHT;
    const dinoHeight = Runner.instance_.tRex.config.HEIGHT;
    
    const obstacle = Runner.instance_.horizon.obstacles[0];
    const speed = Runner.instance_.currentSpeed;
    
    if (obstacle) {
        const { width: w, xPos: x, yPos: y, typeConfig } = obstacle;
        const yFromBottom = canvasHeight - y - typeConfig.height;
        const isObstacleNearby = x < 25 * speed - w / 2;
        
        if (isObstacleNearby) {
            if (yFromBottom > dinoHeight) {
                return; // Pterodactyl flying above
            }
            if (y > canvasHeight / 2) {
                dispatchKey("keyup", ARROW_DOWN);
                dispatchKey("keydown", SPACE_BAR);
            } else {
                dispatchKey("keydown", ARROW_DOWN);
            }
        }
    }
}, Runner.instance_.msPerFrame);

إرسال تعليق

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Snakify Tech Welcome to WhatsApp chat
Howdy! How can we help you today?
Type here...