Mini game T-rex, an endless running game created by Google to help users entertain and kill time when the Internet is lost. This game has a very simple gameplay, users just need to press the Space Bar, up and down arrows to control a dinosaur to move and avoid obstacles on the desert road.
So far, T-rex has gradually become a companion for millions of users while waiting for the Internet to work again.

Every game can be “hacked” and the T-rex mini game is no exception. You can use cheat codes to “hack” this game to help your T-rex win on the endless race track in a super simple way.
How to hack T-rex game on Google Chrome
Step 1 : Open the T-rex mini game pre-installed on Chrome by disconnecting from the Internet or typing chrome://dinoin the address bar and pressing Enter to open the No Internet page. Then, start playing the game by pressing the Space Bar key .
Step 2 : When the dinosaur starts running, right-click anywhere and select Inspect or press Ctrl + Shift + I to open the Inspect window.

Step 3 : Select the Console tab .

Immortal T-rex
To help your dinosaur become immortal, never Game Over even when colliding with a cactus or a flying bird, copy the 2 codes below and paste them into the Console tab opened in step 3, then press Enter to activate.
Code 1:
var original = Runner.prototype.gameOver
Code 2:
Runner.prototype.gameOver = function (){}

Super Speed T-rex
To make your dinosaur accelerate as you wish, copy the code below and paste it into the Console tab that is open in step 3, then press Enter to activate.
Code:
Runner.instance_.setSpeed(1000)

Note : The number in parentheses is the speed of the dinosaur, you can change it as you like.
After completing, you will see the game as the following video:
To be able to play this mini game normally, you just need to close this No Internet page and open another page.
Readers share additional tips:
You thanh dat to , has shared the new auto cheat version, you can refer to it below: (Because the coda is too long, the post in the comment cannot show it all, so I put it in the post to have the function to copy the code).
function keyDown(e){Podium={};
var n=document.createEvent("KeyboardEvent");
Object.defineProperty(n,"keyCode",{get:function(){return this.keyCodeVal}}),n.initKeyboardEvent?n.initKeyboardEvent("keydown",!0,!0,document.defaultView,e,e,"","",!1,""):n.initKeyEvent("keydown",!0,!0,document.defaultView,!1,!1,!1,!1,e,0),n.keyCodeVal=e,document.body.dispatchEvent(n)}function keyUp(e){Podium={};
var n=document.createEvent("KeyboardEvent");
Object.defineProperty(n,"keyCode",{get:function(){return this.keyCodeVal}}),n.initKeyboardEvent?n.initKeyboardEvent("keyup",!0,!0,document.defaultView,e,e,"","",!1,""):n.initKeyEvent("keyup",!0,!0,document.defaultView,!1,!1,!1,!1,e,0),n.keyCodeVal=e,document.body.dispatchEvent(n)}setInterval(function(){Runner.instance_.horizon.obstacles.length>0&&(Runner.instance_.horizon.obstacles[0].xPos75&&(keyUp(40),keyDown(38)),Runner.instance_.horizon.obstacles[0].xPos<30*runner.instance_.currentspeed-runner.instance_.horizon.obstacles[0].width><>