Nitro Type Bot Script for Cheating
Nitro Type Bot Script for Cheating
/*
UltraType - Typing game / [Link] bot
*/
(() => {
// Test whether or not an href is valid for injection
let isValidPage = href => {
let res;
if (href == "[Link] res = true;
else if ([Link]("[Link] res = true;
/*
if (![Link]["multratype"]) {
let s = [Link]('script');
[Link] =
'[Link]
b9e20fef66d9e5205410074/[Link]';
[Link](s);
}
*/
else res = false;
return res;
}
if (!isValidPage([Link])) {
// Don't load if not on the race page
[Link]('UltraType: not loading on this page. Bye!');
[Link](); // Remove this script from the dom
return; // Halt execution
}
if (window["UltraTypeCore"]) {
// There's already an instance of UltraType on this page
[Link]('UltraTypeCore already present, there\'s two versions of
UltraType on this page!');
return;
}
// Constants
const VERSION = "2.6.0",
LOG_DEBUG = true,
LOG_TYPING_INFO = false,
DO_BAN_CHECK = true,
LOAD_TIME = 4300,
TURBO_PACKET_COUNT = 5,
TURBO_PACKET_IDX = 1500,
MAX_WPM = 999,
ABORT_PROBLEM_KEYS = 1,
PROBLEM_KEYS_DEBUG = 0,
EXT_URL = `[Link]
bot/fpopdcoojgeikobdihofjflpngpcbiob`,
FONT = '<link href="[Link]
rel="stylesheet">',
gen = (min, max) => {
return [Link]([Link]() * max) + min;
},
ROTn = (text, map) => {
let out = '',
len = [Link];
for(let i = 0; i < [Link]; i++) {
let c = [Link](i),
j = [Link](c);
if (j >= 0) {
c = [Link]((j + len / 2) % len);
}
out += c;
}
return out;
},
ROT47 = text => ROTn(text, "!\"#$%&'()*+,-./0123456789:;<=>?
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
let _title = "Nitro Type Race",
accuracy = gen(0.93, 0.97),
keyPressHandler = null,
hasScrLoaded = false,
autoRefresh = false,
enabled = true,
autoNitroBtn = null,
disqualified = false,
lessonLoaded = false,
finished = false,
timeoutToggle = false,
inDip = false,
autoNitro = false,
info,
ws = null,
infoSpan,
injectedRoot = [Link]('div'),
root = [Link](),
fillsY = [],
points = [],
errorRequests = [],
lesson = "",
packetLesson = "",
opt,
optOn = false,
renderedKeys = 0,
i = 0,
chart,
g = [Link]('div'),
timeout = 0,
toggled = false,
firstDetected = false,
startTime = null,
endTime = null,
wordsPerMinute = gen(80, 105),
username = "",
avgSpeed = 100,
acc = null,
wpm = null,
statsDiv = null,
statsOn = true,
userInfo = {},
statTogg = null,
index = 0,
nitrosUsed = 0,
loggedEndRace = false,
userBanned = false,
firstTurbo = false,
isStopped = false,
_attachHandler = null,
autoTurbo = localStorage['autoTurbo'];
if (!autoTurbo) {
autoTurbo = false;
} else {
autoTurbo = [Link](autoTurbo);
}
// API events
let apie = {
onReady: null,
onRaceFinish: null,
onRaceStart: null,
onNitroUsed: null,
onUserBanned: null,
onRaceStarting: null,
onType: null
}
console._clear = [Link];
[Link] = (function() {});
// OLD typing function, no longer in use due to NitroType's anti-cheat measures
const _type = charCode => {
index++;
$([Link]).trigger({
type: 'keypress',
which: charCode
});
},
type = charCode => {
// New typing function that works via directly calling the client's key
handler
if (keyPressHandler) {
index++;
keyPressHandler({
timeStamp: [Link](),
isTrigger: false,
originalEvent: {
isTrusted: true,
},
target: [Link],
which: charCode,
shiftKey: false
});
} else {
[Link]('UltraType: No key press handler avalible to call!');
}
},
overrideOnError = () => {
[Link] = evt => {
if ([Link]().includes("'visible' of undefined")) {
// Exception triggered due to turbo mode
respawn();
}
return null;
};
},
typePacket = (isRight, idx) => {
let me = this,
packet = {
stream: "race",
msg: "update",
payload: { }
};
if (isRight) {
[Link].t = idx;
} else {
[Link].e = idx;
}
[Link]("4" + [Link](packet));
},
turbo = () => {
debug("Turbo mode called. Sending " + (TURBO_PACKET_COUNT.toString()) + "
type packets.");
for (let i = 0; i < TURBO_PACKET_COUNT; ++i) {
typePacket(true, TURBO_PACKET_IDX);
}
},
debug = function() {
if (LOG_DEBUG) {
arguments[0] && (arguments[0] = ("[UltraType] " + arguments[0]));
// [Link](this, arguments);
}
},
tdebug = function() {
if (LOG_TYPING_INFO) {
arguments[0] && (arguments[0] = ("[UltraType] " + arguments[0]));
// [Link](this, arguments);
}
},
useNitro = () => {
if ([Link]) [Link]();
setTimeout(function() {
type(13);
nitrosUsed++;
}, 134);
},
autoTurboOn = () => {
autoTurbo = true;
setLocalStorage('autoTurbo', autoTurbo);
},
autoTurboOff = () => {
autoTurbo = false;
setLocalStorage('autoTurbo', autoTurbo);
},
rm = (id, isClass) => {
if (!isClass) {
[Link](id).remove();
} else {
let elms = [Link](id);
for (let i = 0; i < [Link]; ++i) {
elms[i].remove();
}
}
},
addGraph = g => {
if (isStopped) return;
if (root) {
let _style = $("<style>.highcharts-container{width:100% !
important;height:100% !important;display:inline-block;}</style>");
[Link](_style[0]);
[Link](g);
if (!localStorage['chartOn']) {
[Link] = 'none';
[Link] = 'none';
}
} else if ([Link]) {
// Fallback
let _style = $("<style>.highcharts-container{width:100% !
important;height:100% !important;display:inline-block;}</style>");
[Link](_style[0]);
[Link](g);
} else {
// No dom content has loaded, lets do this again in a second
setTimeout(function() {
addGraph(g);
}, 1000);
}
setTimeout(function() {
try {
[Link](new Event('resize'));
} catch(e) {
debug("WARN: Couldn't dispatch resize event:", e);
}
}, 500);
},
getBotState = () => {
// Stringifys the current state of the bot as a JSON object
return {
nitrosUsed: nitrosUsed,
lesson: lesson,
currWord: index,
wpm: wordsPerMinute,
acc: accuracy,
errReqs: [Link],
uinfo: [Link](userInfo),
fillsY: [Link],
version: VERSION,
wpmHistory: points,
isFinished: finished,
startTime: startTime,
endTime: endTime
};
},
transmitBan = () => {
// Send ban info to the content script
let state = getBotState();
let msg = {
from: 'UltraType',
state: state
}
[Link](msg, [Link]);
},
showBan = () => {
userBanned = true;
debug("Sending bot state to banInfo endpoint");
transmitBan();
if ([Link]) {
[Link]();
}
return;
},
checkIfBanned = callback => {
if ([Link]) {
debug("Attempting to get user's page");
let xhr = new XMLHttpRequest();
[Link]("GET", "[Link] +
encodeURIComponent([Link]), true);
[Link]();
[Link] = () => {
let status = [Link];
let res = [Link];
if (status !== 200 || ([Link]("<title>Nitro Type |
Competitive Typing Game | Race Your Friends</title>"))) {
// I'm banned!
showBan();
} else {
// Everything normal
callback();
}
}
// Errors aren't very nice
[Link] = showBan;
} else debug("WARN: Can't check if my user is banned, the userInfo is not
valid:", userInfo);
},
updateStats = () => {
if ([Link]) {
[Link] = "";
[Link] = "white";
[Link] = 'inline-block';
let st = [Link]('span');
let sname = [Link]('span');
[Link] = [Link];
[Link] = 'red';
[Link](statMoney);
[Link]([Link]('br'));
function moveUI(e) {
[Link] = ([Link] - ([Link] - [Link])) + 'px';
[Link] = ([Link] - ([Link] - [Link])) + 'px';
}
_.[Link](window, ['keydown', e => {
if ([Link] == 27) {
toggled = !toggled;
if (toggled) {
[Link] = 0;
[Link] = 0;
[Link] = "none";
[Link] = "none";
} else {
[Link] = UIopacity;
if (localStorage['chartOn']) [Link] = UIopacity;
[Link] = "auto";
if (localStorage['chartOn']) [Link] = "auto";
else [Link] = "none";
}
}
}]);
_.[Link](window, ['mouseup', e => {
isDragging = false;
[Link] = UIopacity;
[Link] = "#000066";
[Link]();
_.[Link](window, ['mousemove', moveUI, true]);
}, false]);
[Link](UI);
detectWebGL();
createOptsMenu();
if ([Link]) {
[Link]();
}
},
initChart = () => {
if (![Link]) {
let _initChart = [Link](this);
setTimeout(_initChart, 300);
return;
}
[Link] = 9999;
[Link] = "#000";
[Link] = "Ubuntu";
[Link] = "fixed";
[Link] = "5%";
[Link] = "5%";
[Link] = "125%";
[Link] = "white";
[Link] = 0.7;
[Link] = "10px";
[Link] = "6px solid";
[Link] = "#000066";
[Link] = "7px";
[Link] = "40%";
[Link] = "25%";
[Link] = "opacity 500ms, border 500ms, border-color 500ms";
[Link](g, {
chart: {
backgroundColor: {
linearGradient: [0, 0, 500, 500],
stops: [
[0, 'rgb(0, 0, 0)'],
[1, 'rgb(0, 0, 0)']
]
},
style: {
color: "#fff",
fontFamily: "Ubuntu"
}
},
title: {
text: "Speed",
x: -20,
style: {
color: "#fff",
fontFamily: "Ubuntu"
}
},
tooltip: {
valueSuffix: ' WPM',
},
xAxis: {
gridLineWidth: 0,
categories: [
//
],
labels: {
style: {
color: '#FFF',
font: 'Ubuntu'
}
}
},
yAxis: {
gridLineWidth: 0,
title: {
text: "WPM"
},
plotLines: [{
value: 0,
width: 1,
color: '#ff0000'
}],
labels: {
style: {
color: '#FFF',
font: 'Ubuntu'
}
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'middle',
borderWidth: 0,
style: {
color: "#fff"
}
},
plotOptions: {
line: {
marker: {
enabled: false
}
}
},
series: [{
name: 'Speed in WPM',
data: points,
color: '#000066'
}]
});
chart = [Link][0];
_.[Link](g, ['mouseover', () => {
if (localStorage['chartOn']) [Link] = 1;
if (localStorage['chartOn']) [Link] = "#0000ff";
}, true]);
_.[Link](g, ['mouseout', () => {
if (localStorage['chartOn']) [Link] = 0.7;
if (localStorage['chartOn']) [Link] = "#000066";
}, true]);
addGraph(g);
setTimeout(() => {
let cr = [Link]('highcharts-credits');
for (let i = 0; i < [Link]; i++) {
cr[i].remove();
}
}, 500);
if (!localStorage['chartOn']) {
[Link] = 0;
}
},
createOptsMenu = () => {
opt = [Link]('div');
[Link] = 99999999;
[Link] = "#000";
[Link] = "6px solid";
[Link] = "#000066";
[Link] = "6px";
[Link] = "150%";
[Link] = "#FFF";
[Link] = "fixed";
[Link] = "10px";
[Link] = "50%";
[Link] = "50%";
[Link] = "inline-block";
[Link] = "Ubuntu";
[Link] = "translate(-50%, -50%)";
[Link] = "opacity 500ms, border 500ms, border-color 500ms";
[Link] = 0;
[Link] = "none";
if (autoRefresh) {
[Link] = "LimeGreen";
[Link] = "LimeGreen";
[Link] = "On";
} else {
[Link] = "red";
[Link] = "red";
[Link] = "Off";
}
[Link] = () => {
autoRefresh = !autoRefresh;
setLocalStorage('autoRefresh', autoRefresh);
if (!autoRefresh) {
[Link] = "red";
[Link] = "red";
[Link] = "Off";
} else {
[Link] = "LimeGreen";
[Link] = "LimeGreen";
[Link] = "On";
}
}
[Link] += "Auto Refresh: ";
[Link](toggleButton);
[Link](outerToggle);
if (localStorage['chartOn']) {
[Link] = "LimeGreen";
[Link] = "LimeGreen";
[Link] = "On";
} else {
[Link] = "red";
[Link] = "red";
[Link] = "Off";
}
[Link] = () => {
if (localStorage['chartOn']) {
delete localStorage['chartOn'];
[Link] = "red";
[Link] = "red";
[Link] = "Off";
} else {
localStorage['chartOn'] = 1;
[Link] = "LimeGreen";
[Link] = "LimeGreen";
[Link] = "On";
[Link] = 0.7;
}
}
[Link] += "Speed chart: ";
[Link](chartBtn);
[Link](outerChrtBtn);
[Link] = "";
[Link] = "transparent";
[Link] = "3px solid";
[Link] = "3px";
[Link] = "100%";
[Link] = "LimeGreen";
[Link] = "LimeGreen";
[Link] = "border 500ms, border-color 500ms, color
500ms";
[Link] = "On";
[Link] = () => {
statsOn = !statsOn;
if (statsOn) {
[Link] = "LimeGreen";
[Link] = "LimeGreen";
[Link] = "On";
updateStats();
} else {
[Link] = "red";
[Link] = "red";
[Link] = "Off";
disableStats();
}
setLocalStorage('statsOn', statsOn);
}
[Link] = "User Stats: ";
[Link](statTogg);
[Link](outerStatTogg);
let outerAutoT = [Link]('div');
let autoT = [Link]('button');
[Link] = "";
[Link] = "transparent";
[Link] = "3px solid";
[Link] = "3px";
[Link] = "100%";
[Link] = "LimeGreen";
[Link] = "LimeGreen";
[Link] = "border 500ms, border-color 500ms, color 500ms";
[Link] = "On";
[Link] = () => {
if (!autoTurbo) {
[Link] = "LimeGreen";
[Link] = "LimeGreen";
[Link] = "On";
autoTurboOn();
} else {
[Link] = "red";
[Link] = "red";
[Link] = "Off";
autoTurboOff();
}
}
// Set the default button state
if (autoTurbo) {
[Link] = "LimeGreen";
[Link] = "LimeGreen";
[Link] = "On";
} else {
[Link] = "red";
[Link] = "red";
[Link] = "Off";
}
[Link] = "Auto Turbo: ";
[Link](autoT);
[Link](outerAutoT);
[Link](inner);
[Link](opt);
setTimeout(() => {
let localAutoRefresh = localStorage['autoRefresh'],
localAccuracy = localStorage['accuracy'],
localWPM = localStorage['wpm'],
localAutoNitro = localStorage['autoNitro'];
if (localAutoNitro !== null && localAutoNitro !== undefined) {
localAutoNitro = [Link](localAutoNitro);
if (localAutoNitro == false) {
autoNitroOff();
} else {
autoNitroOn();
}
}
if (localAutoRefresh) {
autoRefresh = [Link](localAutoRefresh);
if (!autoRefresh) {
[Link] = "red";
[Link] = "red";
[Link] = "Off";
} else {
[Link] = "LimeGreen";
[Link] = "LimeGreen";
[Link] = "On";
}
}
if (localAccuracy) {
accuracy = parseFloat(localAccuracy);
[Link] = accuracy * 100;
}
if (localWPM) {
[Link] = localWPM;
wordsPerMinute = parseInt(localWPM);
setWPM(wordsPerMinute);
}
if (statsOn) {
[Link] = "LimeGreen";
[Link] = "LimeGreen";
[Link] = "On";
updateStats();
} else {
[Link] = "red";
[Link] = "red";
[Link] = "Off";
disableStats();
}
}, 1000);
},
blockAd = ad => {
try {
[Link] = "none";
} catch (e) {
[Link] = "about:blank";
}
try {
[Link]();
} catch (e) {};
},
changeTip = node => {
setTimeout(() => {
[Link] = "125%";
[Link] = "3px solid #000066";
[Link] = "7px";
[Link] = 0.7;
[Link] = "none";
[Link] = "";
[Link] += FONT;
[Link] += '<center style="font-family:Ubuntu;">Michal is not
gay like you.<br>Version: ' + VERSION + '</center>';
}, 1000);
},
detectWebGL = () => {
if ([Link]('webgl')) {
[Link] = [Link]('webgl', 'canvas');
}
},
handleScript = scr => {
if ([Link]('race-lib')) {
[Link]('load', () => {
_set = [Link];
let tos = __.toStr;
[Link] = function() {
let txt = arguments[0];
if (lessonLoaded) {
let t = parseInt(txt);
if ((t !== 0) && (t > 5)) {
[Link](t);
[Link][0].setData(points, true);
}
}
_set.apply(this, arguments);
}
});
} else if ([Link]('libs')) {
if (hasScrLoaded) return;
else hasScrLoaded = 1;
[Link]('load', () => {
let didGetHandler = false;
_attachHandler = $.[Link];
$.[Link] = function() {
if (this && this[0] && this[0] == [Link]) {
let handler = arguments[0];
keyPressHandler = handler;
// debug("Intercepted jQuery keypress handler:", handler);
}
return _attachHandler.apply(this, arguments);
}
});
} else if ([Link]('[Link].')) {
[Link]('load', () => {
setTimeout(() => {
let udata = ROT47(localStorage['A=2J6C']);
try {
udata = [Link](udata);
} catch (e) {
return;
}
// [Link] = true;
udata = ROT47([Link](udata));
localStorage['A=2J6C'] = udata;
}, 100);
});
}
}
[Link] = function() {
if (arguments[0] == "You have been disqualified") {
disqualified = true;
}
[Link](this, arguments);
}
__.fill = function() {
handleFillText(arguments);
_.[Link](this, arguments);
}
let _set = null,
_send = [Link];
[Link] = function() {
if (typeof arguments[0] !== 'string') {
return _send.apply(this, arguments);
}
let msg = arguments[0],
header = msg[0],
obj = null;
msg = [Link](1, [Link]);
try {
obj = [Link](msg);
} catch(e) {
return _send.apply(this, arguments);;
}
if (obj && [Link] && [Link].a) {
debug("very naughty packet detected, lets fix that");
delete [Link].a;
// Replace packet
arguments[0] = header + [Link](obj);
}
return _send.apply(this, arguments);
}
onfinish(() => {
debug("Race has finished. Doing a ban check and reloading if needed.");
if ([Link]) {
[Link]();
}
endTime = new Date();
[Link] = "Finished";
[Link] = "#b3b3b3";
if (localStorage['autoRefresh']) {
debug("Auto refresh is enabled");
respawn();
} else {
debug("Auto refresh is disabled");
}
});
[Link] = function() {
let payload = arguments[0];
let header = '';
if (payload && [Link] > 4 && payload[4] == '{') {
let obj;
header = [Link](0, 4);
try {
obj = [Link]([Link](4, [Link]));
} catch(e) {
return _.[Link](this, arguments);
}
if ([Link] && [Link].a) {
// Remove cheater flag from outgoing packet
delete [Link].a;
arguments[0] = header + [Link](obj);
}
}
return _.[Link](this, arguments);
}
[Link] = function() {
if (arguments[1].includes('/api/error')) {
[Link](this);
[Link]();
return;
} else if (arguments[1].includes('problem-keys')) {
if (PROBLEM_KEYS_DEBUG) {
[Link]('PROBLEM_KEYS_DEBUG is enabled, firing up debugger.');
debugger;
}
if (ABORT_PROBLEM_KEYS) {
debug("Aborting problem-keys AJAX request.");
[Link]();
return;
} else {
debug("Detected outgoing problem-keys AJAX request, but
ABORT_PROBLEM_KEYS is false, so I'm letting it send.");
}
}
return _.[Link](this, arguments);
}
// inject undetectable features
[Link] = {};
[Link] = function() {};
[Link] = function(a) { [Link] = a || " ",
[Link] = !0 };
let hostt = [Link].__lookupGetter__('host');
let _getToStr = [Link].__lookupGetter__('toString');
let _setTxt = [Link].__lookupSetter__('textContent');
let _getTitle = [Link].__lookupGetter__('title');
let _setTitle = [Link].__lookupSetter__('title');
[Link] = __.fill;
[Link] = __ws;
[Link] = __.toStr = function() {
if (this === [Link]) return _.[Link](_.toStr);
if (this === [Link]) return
_.[Link](_.fill);
if (this === [Link].__lookupGetter__) return _.[Link](_.get);
if (this === [Link].__lookupGetter__('host')) return
_.[Link](hostt);
if (this === [Link].__lookupGetter__('toString')) return
_.[Link](_getToStr);
if (this === [Link].__lookupSetter__('textContent')) return
_.[Link](_setTxt);
if (this === [Link].__lookupGetter__('title')) return
_.[Link](_getTitle);
if (this === [Link].__lookupSetter__('title')) return
_.[Link](_setTitle);
if (this === [Link]) return _.[Link](_get);
if (this === [Link]) return _.[Link](_.warn);
if (this === WebSocket) return _.[Link](_.ws);
if (this === [Link]) return _.[Link](_.xsend);
if (this === [Link]) return _.[Link](_.xopen);
if (this === [Link]) return _.[Link](_.oerr);
if ([Link] && this === [Link]) return
_.[Link](_attachHandler);
return _.[Link](this);
}
[Link].__defineGetter__('host', () => {
if (this === injectedRoot) return null;
return _.[Link](this);
});
let observer = new MutationObserver(mutations => {
[Link](mutation => {
if ([Link] == "childList" && [Link] > 0) {
for (let i in [Link]) {
if ([Link][i].nodeName == "BODY")
createUI([Link][i]);
if ([Link][i].nodeName == "IFRAME")
blockAd([Link][i]);
if ([Link][i].className == "race-tip")
changeTip([Link][i]);
if ([Link][i].nodeName == "SCRIPT")
handleScript([Link][i]);
}
}
});
});
[Link]([Link], {
childList: true,
subtree: true,
attributes: true,
attributeFilter: ['style']
});
let _fakeToStr = __.toStr;
_fakeToStr.__proto__ = _.[Link];
_fakeToStr.prototype = _.[Link];
[Link]([Link], 'toString', {
get: () => {
if (this === __.toStr) return _fakeToStr;
return __.toStr;
},
enumerable: false
});
[Link] = function() {} // Disable localStorage clearing
[Link].__defineGetter__('toString', function() {
if (this === [Link] || this ===
[Link]) return __.toStr;
if (this === console || this === [Link]) return __.toStr;
if (this === [Link].__lookupGetter__('host') || this ===
[Link]) return __.toStr;
if (this === [Link] || this ===
[Link].__lookupGetter__) return __.toStr;
if (this === [Link].__lookupGetter__('toString')) return
__.toStr;
if (this === [Link]) return __.toStr;
if (this === WebSocket) return __.toStr;
if (this === injectedRoot) return __.toStr;
if (this === [Link].__lookupGetter__('title')) return __.toStr;
if (this === [Link].__lookupSetter__('title')) return __.toStr;
if (this === [Link]) return __.toStr;
if (this === [Link]) return __.toStr;
if (this === [Link]) return __.toStr;
if ([Link] && this === [Link]) return __.toStr;
return _.toStr;
});
setInterval(() => {
_setTitle.call(document, "L_0R3NZ0 Type Bot!");
}, 100);
[Link].__defineGetter__('title', t => {
return _title;
});
[Link].__defineSetter__('title', t => {
_title = t;
});
_.[Link](window, ['load', () => {
_.oerr = [Link];
[Link] = () => {
return null;
};
[Link] = () => {};
[Link] = evt => {
if ([Link]("'visible' of undefined")) {
// Exception triggered due to turbo mode
respawn();
}
return null;
};
username = extractUserName();
userInfo = ROT47(localStorage["A=2J6C"]);
userInfo = [Link](userInfo);
debug("Extracted and decrypted user info", userInfo);
if (localStorage['statsOn']) statsOn = true;
}]);
/*
[Link]('DOMContentLoaded', () => {
setTimeout(removeUITrash, 75);
});
*/
let registerAPIEvent = (evt, callback) => {
if (typeof callback !== 'function') {
throw new Error('Invalid event callback.');
return;
}
switch (evt) {
case "userBanned":
[Link] = callback;
break;
case "raceStart":
[Link] = callback;
break;
case "raceEnd":
case "raceFinish":
[Link] = callback;
break;
case "nitroUsed":
case "nitroUse":
case "nitro":
[Link] = callback;
break;
case "raceStarting":
case "raceBegin":
case "raceInit":
[Link] = callback;
break;
case "type":
case "typed":
case "botType":
[Link] = callback;
break;
case "ready":
case "load":
case "loaded":
case "start":
case "started":
[Link] = callback;
break;
default:
throw new Error('Invalid event name!');
break;
}
return [Link];
}
// Core API
let core = {
on: registerAPIEvent,
turbo: turbo,
setWPM: setWPM,
sendTypePacket: typePacket,
typeChar: type,
stopFromRunning: () => { // Stops the bot from appearing or typing
isStopped = true;
},
getDecyptedUserInfo: () => {
if (userInfo) {
return userInfo;
} else {
return null;
}
},
setAutoTurbo: state => {
if (state === false) {
autoTurboOff();
} else if (state === true) {
autoTurboOn();
} else {
throw new Error('Invalid auto turbo state.');
}
},
getBotStateRaw: getBotState,
getBotState: () => {
return {
nitrosUsed: nitrosUsed,
lesson: lesson,
currWord: index,
wpm: wordsPerMinute,
acc: accuracy,
errReqs: [Link],
uinfo: [Link](userInfo),
fillsY: [Link],
version: VERSION,
wpmHistory: points,
isFinished: finished,
startTime: startTime,
endTime: endTime
};
},
toggleDebug: () => {
LOG_DEBUG = !LOG_DEBUG;
},
getLesson: () => {
if (lesson) {
return lesson;
} else return null;
},
setAutoRefresh: val => {
if (typeof val !== 'boolean') {
throw new Error('Can only set auto refresh to a boolean.');
return;
} else {
autoRefresh = val;
}
},
getNitrosUsed: () => { return nitrosUsed || 0 },
toggleBotLog: () => {
LOG_TYPING_INFO = !LOG_TYPING_INFO;
},
disableStats: disableStats,
randBool: randomBool,
updateStats: updateStats,
useNitro: useNitro,
flushRaw: () => {
// Reset UltraType to it's default settings
[
'accuracy',
'autoRefresh',
'autoTurbo',
'statsOn',
'autoNitro',
'wpm',
'chartOn',
'speedChange'
].forEach(k => {
delete localStorage[k];
});
},
flush: () => {
[Link]();
delete localStorage['ultratypedev'];
[Link]('Flushed UltraType settings, reloading...');
setTimeout([Link](location), 1000);
},
toggleLocalLoad: () => {
if (localStorage["ultratypedev"]) {
delete localStorage["ultratypedev"];
[Link]("Disabled local loading.");
} else {
localStorage["ultratypedev"] = true;
[Link]("Enabled local loading.");
}
},
// Utility method to automatically involk debugger when a function is
called
debugFn: fn => {
let _fn = fn;
fn = function() {
debugger;
_fn.apply(this, arguments);
}
return fn;
}
}
[Link] = core;
let hcScript = [Link]('script');
[Link] = '[Link]
[Link]('load', () => {
setTimeout([Link](window), 250);
});
[Link](hcScript);
// Bye bye!
[Link]('UltraType version ' + VERSION + ' loaded.');
[Link]();
})();








![key = JSON.parse(ROT47(storage[p]));
} catch (e) {
key = null;](/p?url=https%3A%2F%2Fscreenshots.scribd.com%2FScribd%2F252_100_85%2F326%2F394646366%2F9.jpeg&__src=https%3A%2F%2Fwww.scribd.com%2Fdocument%2F394646366%2FYu-Cheats-Bot-nitro-type&__type=image)
