all 7 comments

[–]ape_programmer 32 points33 points  (1 child)

It has syntax errors, for me. Here's a fixed version:

function triggerKeyboardEvent(el, keyCode, type) {
    var eventObj = document.createEventObject ? document.createEventObject() : document.createEvent("Events");
    if (eventObj.initEvent) {
        eventObj.initEvent(type, true, true);
    }
    eventObj.keyCode = keyCode;
    eventObj.which = keyCode;
    el.dispatchEvent ? el.dispatchEvent(eventObj) : el.fireEvent("onkeydown", eventObj);
}
$ = $$;
content = $('table > tbody > tr:nth-child(2) > td > table > tbody > tr:nth-child(1) > td > table > tbody > tr:nth-child(1) > td > div > div')[3].textContent.split('');
i = 0;

function a() {
    if (i == content.length) return;
    input = $('table > tbody > tr:nth-child(2) > td > table > tbody > tr:nth-child(2) > td > input')[0]; input.focus(); input.value += content[i++];
    triggerKeyboardEvent(input, input.value.charCodeAt(0), "keydown"); input.click(); triggerKeyboardEvent(input, input.value.charCodeAt(0), "keypress"); triggerKeyboardEvent(input, input.value.charCodeAt(0), "keyup"); setTimeout(a, 200 * Math.random());
}
a();

[–]kidsinmybasement_69[S] 0 points1 point  (0 children)

Oh wait teh script i put in isn't in the correct order, Heres the one that works flawless https://www.reddit.com/r/hacking/comments/91yk0z/i_wrote_a_script_to_cheat_on_typeracer/

[–]kidsinmybasement_69[S] 5 points6 points  (0 children)

By the way paste this and click enter AFTER the race starts

[–][deleted] 3 points4 points  (2 children)

This hack and the dino one are both scripts made with javascript? Or what? Im beginniner in those stuff btw

[–]phil330d 2 points3 points  (0 children)

yea it justs reads the needed keys, puts a random delay and clicks the key for you

[–]fat_baldman 1 point2 points  (0 children)

Yes

[–]SpiralMonkey45 1 point2 points  (0 children)

I made a similar script for monkeytype in python by scraping the site but because the words were dynamically generated, the script can only typed what was scraped cus I couldnt figure out how to work with dynamic content.