Skip to content

Instantly share code, notes, and snippets.

@Domiii
Last active October 30, 2025 23:40
Show Gist options
  • Save Domiii/52cf49d780ec8c9f01771973c36197af to your computer and use it in GitHub Desktop.
Save Domiii/52cf49d780ec8c9f01771973c36197af to your computer and use it in GitHub Desktop.
This script types for you automatically on www.typingclub.com: 1. Open the website 2. Blaze past the tutorials 3. Go into a level 4. Open Console 5. Paste the script and press ENTER
/**
* This script types for you automatically on www.typingclub.com:
* 1. Open the website
* 2. Blaze past the tutorials
* 3. Go into a level
* 4. Open Console
* 5. Paste the script and press ENTER
*/
// NOTE: When delay (in ms between two strokes) is too low, the site might bug out and the result page will not be shown
const minDelay = 60;
const maxDelay = 60;
const keyOverrides = {
[String.fromCharCode(160)]: ' ' // convert hardspace to normal space
};
function getTargetCharacters() {
const els = Array.from(document.querySelectorAll('.token span.token_unit'));
const chrs = els
.map(el => {
// get letter to type from each letter DOM element
if (el.firstChild?.classList?.contains('_enter')) {
// special case: ENTER
return '\n';
}
let text = el.textContent[0];
return text;
})
.map(c => keyOverrides.hasOwnProperty(c) ? keyOverrides[c] : c); // convert special characters
return chrs;
}
function recordKey(chr) {
// send it straight to the internal API
window.core.record_keydown_time(chr);
}
function sleep(ms) {
return new Promise(r => setTimeout(r, ms));
}
async function autoPlay(finish) {
const chrs = getTargetCharacters();
for (let i = 0; i < chrs.length - (!finish); ++i) {
const c = chrs[i];
recordKey(c);
//console.log(c, c.charCodeAt());
await sleep(Math.random() * (maxDelay - minDelay) + minDelay);
}
}
// ############################################################################################################
// old utilities
// ############################################################################################################
// /**
// * @see https://stackoverflow.com/questions/8942678/keyboardevent-in-chrome-keycode-is-0/12522752#12522752
// */
// function simulateKey(chr, el) {
// _simulateKey(chr, 'keydown', el);
// _simulateKey(chr, 'keypress', el);
// }
// function _simulateKey(chr, type, el) {
// var eventObj = document.createEventObject ?
// document.createEventObject() : document.createEvent("Events");
// if (eventObj.initEvent) {
// eventObj.initEvent(type || "keydown", true, true);
// }
// let keyCode = chr.charCodeAt(0);
// eventObj.key = chr[0];
// eventObj.keyCode = keyCode;
// eventObj.which = keyCode;
// eventObj.isTrusted = true;
// el = el || document.body;
// // console.log(keyCode, eventObj);
// el.dispatchEvent ? el.dispatchEvent(eventObj) : el.fireEvent("onkeydown", eventObj);
// }
// document.addEventListener("keydown", function (e) {
// console.log('down', e);
// });
// document.addEventListener("keypress", function (e) {
// console.log('press', e);
// });
//$($('.menu-btn')[0].parentNode).prepend('<button onclick=\'simulateKeyPress("c")\'>sim</button>');
// simulateKey('a', $('input')[0]);
// ############################################################################################################
// go!
// ############################################################################################################
autoPlay(true);
@CAMTheGOAT10
Copy link

Everything is fine with the code except it doesn't work on mini games so you have to type those other than that it works.

@JkuwariX
Copy link

JkuwariX commented May 8, 2024

How can we make it work for Arabic writing? it just spams any writing and it keeps repeating because the accuracy isn't right

@ThePikminCaptain
Copy link

make it press enter automatically

@ThePikminCaptain
Copy link

// NOTE: When delay (in ms between two strokes) is too low, the site might bug out and the result page will not be shown const minDelay = 60; const maxDelay = 60;

const keyOverrides = { [String.fromCharCode(160)]: ' ' // convert hardspace to normal space };

function getTargetCharacters() { const els = Array.from(document.querySelectorAll('.token span.token_unit')); const chrs = els .map(el => { // get letter to type from each letter DOM element if (el.firstChild?.classList?.contains('_enter')) { // special case: ENTER return '\n'; } let text = el.textContent[0]; return text; }) .map(c => keyOverrides.hasOwnProperty(c) ? keyOverrides[c] : c); // convert special characters return chrs; }

function recordKey(chr) { // send it straight to the internal API window.core.record_keydown_time(chr); }

function sleep(ms) { return new Promise(r => setTimeout(r, ms)); }

async function autoPlay(finish) { const chrs = getTargetCharacters(); for (let i = 0; i < chrs.length - (!finish); ++i) { const c = chrs[i]; recordKey(c); //console.log(c, c.charCodeAt()); await sleep(Math.random() * (maxDelay - minDelay) + minDelay); } }

// ############################################################################################################ // old utilities // ############################################################################################################

// /** // * @see https://stackoverflow.com/questions/8942678/keyboardevent-in-chrome-keycode-is-0/12522752#12522752 // */ // function simulateKey(chr, el) { // _simulateKey(chr, 'keydown', el); // _simulateKey(chr, 'keypress', el); // } // function _simulateKey(chr, type, el) { // var eventObj = document.createEventObject ? // document.createEventObject() : document.createEvent("Events");

// if (eventObj.initEvent) { // eventObj.initEvent(type || "keydown", true, true); // }

// let keyCode = chr.charCodeAt(0);

// eventObj.key = chr[0]; // eventObj.keyCode = keyCode; // eventObj.which = keyCode; // eventObj.isTrusted = true;

// el = el || document.body;

// // console.log(keyCode, eventObj);

// el.dispatchEvent ? el.dispatchEvent(eventObj) : el.fireEvent("onkeydown", eventObj); // }

// document.addEventListener("keydown", function (e) { // console.log('down', e); // }); // document.addEventListener("keypress", function (e) { // console.log('press', e); // }); //$($('.menu-btn')[0].parentNode).prepend('sim'); // simulateKey('a', $('input')[0]);

// ############################################################################################################ // go! // ############################################################################################################

autoPlay(true);

doesnt work

@ThePikminCaptain
Copy link

I worked your code so that it always goes to the next level automatically.
where

@lineDevs
Copy link

it worked, i love it , my wpm is 140 (x_x)

@senso328581
Copy link

senso328581 commented Sep 18, 2024

thank you! it worked!
wait, it doesn't work apple game and ninja game??

@crestalmyth
Copy link

my friend made a more efficientvesint of it ill share it soon

@voidxmenu
Copy link

GUYS I HAVE THE MOVE TO NEXT LEVEL VERISON MADE BY ME!

// NOTE: When delay (in ms between two strokes) is too low, the site might bug out and the result page will not be shown
// made by voids-plan!
const minDelay = 60;
const maxDelay = 60;

const keyOverrides = {
[String.fromCharCode(160)]: ' ' // convert hardspace to normal space
};

function getTargetCharacters() {
const els = Array.from(document.querySelectorAll('.token span.token_unit'));
const chrs = els
.map(el => {
if (el.firstChild?.classList?.contains('_enter')) {
return '\n'; // special case: ENTER
}
let text = el.textContent[0];
return text;
})
.map(c => keyOverrides.hasOwnProperty(c) ? keyOverrides[c] : c); // convert special characters
return chrs;
}

function recordKey(chr) {
// send it straight to the internal API
window.core.record_keydown_time(chr);
}

function sleep(ms) {
return new Promise(r => setTimeout(r, ms));
}

async function autoPlay() {
const chrs = getTargetCharacters();
for (let i = 0; i < chrs.length; ++i) {
const c = chrs[i];
recordKey(c);
await sleep(Math.random() * (maxDelay - minDelay) + minDelay);
}

// Click the "Continue" button after finishing typing
await sleep(500); // Short pause before clicking continue
const continueButton = document.querySelector('button[aria-label="Continue"]');
if (continueButton) {
    continueButton.click(); 
}

// Start typing for the next level
await sleep(1000); 
autoPlay();

}

// Start the autoplay
autoPlay();

@TheFisherman25
Copy link

can you make it for tap touche pls

@Luke413-byte
Copy link

Can you make it be able to tab and enter please

@eadxfaacf
Copy link

eadxfaacf commented Feb 1, 2025

I'm doing a test, when i paste the code in it just says undefined.

@ubg42
Copy link

ubg42 commented Feb 13, 2025

the
const minDelay
const maxDelay
highest is 47 which is about 200 WPM

@ubg42
Copy link

ubg42 commented Feb 13, 2025

I'm doing a test, when i paste the code in it just says undefined.

did you paste it in console of inspect element?

Copy link

ghost commented Feb 28, 2025

put it in the bookmark

@Heheha154
Copy link

Also for anyone wanting to know how to make it so it automatically presses enter and auto starts the next lesson, I have the code pasted right here:
Just be careful on using it like if you wanna stop it you actually have to just reload the tab
It also only works on lessons, not games.
One final thing, the second you finish the lesson it waits for about 7 seconds to have all the stars, and points rallied up and then it presses enter, then waits two seconds for the level to load and goes on, and so forth, etc.

CODE:

const minDelay = 60;  
const maxDelay = 60;  
  
const keyOverrides = {  
  [String.fromCharCode(160)]: ' ',  
};  
  
function getTargetCharacters() {  
  const tokenElements = Array.from(document.querySelectorAll('.token span.token_unit'));  
  return tokenElements.map((element) => {  
   if (element.firstChild?.classList?.contains('_enter')) {  
    return '\n';  
   }  
   let text = element.textContent[0];  
   return keyOverrides.hasOwnProperty(text) ? keyOverrides[text] : text;  
  });  
}  
  
function recordKey(character) {  
  window.core.record_keydown_time(character);  
}  
  
function sleep(milliseconds) {  
  return new Promise((resolve) => setTimeout(resolve, milliseconds));  
}  
  
function pressEnter() {  
  const enterEvent = new KeyboardEvent('keydown', {  
   bubbles: true,  
   cancelable: true,  
   keyCode: 13,  
   key: 'Enter',  
  });  
  document.body.dispatchEvent(enterEvent);  
}  
  
async function autoPlay() {  
  while (true) {  
   const characters = getTargetCharacters();  
   for (let i = 0; i < characters.length; i++) {  
    const character = characters[i];  
    recordKey(character);  
    await sleep(Math.random() * (maxDelay - minDelay) + minDelay);  
   }  
   await sleep(7000);  
   pressEnter();  
   await sleep(2000); // wait for the next lesson to load  
  }  
}  
  
autoPlay();

@astronauthacker
Copy link

can you make one for the ninja games?

@1jiji-arch
Copy link

Plis puedes hacer que en los requisitos me pida un ppmm de 25

@2033dontsiosc-ctrl
Copy link

Thanks it helped
bro thanks for the hack

@35asime-hue
Copy link

How Does It Work?

@35asime-hue
Copy link

How did 2033dontsiosc Work For Him

@wadeawuah-beep
Copy link

const minDelay = 60;
const maxDelay = 60;

const keyOverrides = {
[String.fromCharCode(160)]: ' ',
};

function getTargetCharacters() {
const tokenElements = Array.from(document.querySelectorAll('.token span.token_unit'));
return tokenElements.map((element) => {
if (element.firstChild?.classList?.contains('_enter')) {
return '\n';
}
let text = element.textContent[0];
return keyOverrides.hasOwnProperty(text) ? keyOverrides[text] : text;
});
}

function recordKey(character) {
window.core.record_keydown_time(character);
}

function sleep(milliseconds) {
return new Promise((resolve) => setTimeout(resolve, milliseconds));
}

function pressEnter() {
const enterEvent = new KeyboardEvent('keydown', {
bubbles: true,
cancelable: true,
keyCode: 13,
key: 'Enter',
});
document.body.dispatchEvent(enterEvent);
}

async function autoPlay() {
while (true) {
const characters = getTargetCharacters();
for (let i = 0; i < characters.length; i++) {
const character = characters[i];
recordKey(character);
await sleep(Math.random() * (maxDelay - minDelay) + minDelay);
}
await sleep(7000);
pressEnter();
await sleep(2000); // wait for the next lesson to load
}
}

autoPlay();

@CuteDogJay
Copy link

Can you make it type slower please im new with this stuff

@Heheha154
Copy link

const minDelay = 60;
const maxDelay = 60;

For this part, you can raise the numbers to as much as you want
Basically: the higher the number, the slower it types
The lower the number, the faster it goes
Experiment around with this however you like!

@CuteDogJay
Copy link

ty

@CuteDogJay
Copy link

what does this mean

@CuteDogJay
Copy link

Blocked aria-hidden on an element because its descendant retained focus. The focus must not be hidden from assistive technology users. Avoid using aria-hidden on a focused element or its ancestor. Consider using the inert attribute instead, which will also prevent focus. For more details, see the aria-hidden section of the WAI-ARIA specification at https://w3c.github.io/aria/#aria-hidden.
Element with focus:
Ancestor with aria-hidden: <input type=​"text" autocomplete=​"off" autocorrect=​"off" autocapitalize=​"off" autofocus aria-hidden=​"true" style=​"outline:​ none;​ color:​ white;​ border:​ white;​ position:​ fixed;​ font-size:​ 1px;​ left:​ 50%;​ top:​ -21px;​">​

@sapkotakushal100-web
Copy link

yo bro I tryed it its spamming random buttons, not even working

@sapkotakushal100-web
Copy link

yo I just figured out how to do it, bro it actually worked 7 place to 2 place

@zane2342
Copy link

It works great a little to great they got suspicious, and banned my account! its not your fault!

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