Dogeware--- (Advanced)Nitrotype Cheats/PauseGame/Radio/Autotyper/Crashkey

Advanced Nitrotype Cheats

  1. // ==UserScript==
  2. // @license MIT
  3. // @icon https://seeklogo.com/images/C/crown-logo-D8A8BC5802-seeklogo.com.png
  4. // @description Advanced Nitrotype Cheats
  5. // @name Dogeware--- (Advanced)Nitrotype Cheats/PauseGame/Radio/Autotyper/Crashkey
  6. // @match https://www.nitrotype.com/race
  7. // @match https://www.nitrotype.com/race/*
  8. // @author Dogeware
  9. // @run-at document-start
  10. // @grant none
  11. // @version 0.2
  12. // @namespace https://greasyfork.org/en/users/985489-dogeware
  13. // ==/UserScript==
  14. // Autotyper author: RedHawk : https://github.com/RedHawk-1/Nitro-Type-Bot-2.0
  15. // Editer author: Dogeware : https://greasyfork.org/en/users/985489-dogeware
  16. //Vars
  17. //Set color of text panel
  18. var _colors = [
  19. 'red',
  20. 'yellow',
  21. 'blue',
  22. 'green',
  23. 'orange',
  24. 'lime',
  25. 'pink',
  26. 'black',
  27. 'white'
  28. ]
  29. var _color = _colors[(Math.random() * _colors.length) | 0]
  30. var _playlist = [
  31. 'http://bigrradio.cdnstream1.com/5106_128',
  32. 'https://live.wostreaming.net/direct/wboc-waaifmmp3-ibc2',
  33. 'http://strm112.1.fm/ajazz_mobile_mp3',
  34. 'http://streaming.radionomy.com/A-RADIO-TOP-40',
  35. 'http://live-radio01.mediahubaustralia.com/FM2W/aac/',
  36. 'http://streams.90s90s.de/hiphop/mp3-128/',
  37. 'http://1a-classicrock.radionetz.de/1a-classicrock.mp3',
  38. 'http://bigrradio.cdnstream1.com/5187_128',
  39. 'http://streams.90s90s.de/hiphop/mp3-128/',
  40. 'http://0n-2000s.radionetz.de/0n-2000s.aac'
  41. ]
  42. console.log(_playlist.length)
  43. var radio
  44. var player
  45. player = radio
  46. var rand = _playlist[(Math.random() * _playlist.length) | 0]
  47. player = rand
  48. var audio = new Audio(player);
  49. //Only starts when in Race Not Garrage
  50. var _res = [
  51. 'Too many request',
  52. 'Crashed',
  53. 'Freezed Page',
  54. 'Using Cheats',
  55. 'Banned reason "Cheating"'
  56. ]
  57. var _ger = _res[(Math.random() * _res.length) | 0];
  58. // X Over load game with for loops
  59. document.addEventListener('keydown', (event) => {
  60. if (event.key === 'x') {
  61. for(;;){
  62. for(;;){
  63. for(;;){
  64. alert(`Oops! Game has Crashed result: ${_ger}`)
  65. }
  66. }
  67. }
  68. }
  69. })
  70. //colors
  71. console.log(_colors)
  72. console.log(_color)
  73.  
  74. document.addEventListener('keydown', (event) => {
  75. if (event.key === 'r') {
  76. audio.play()
  77. }
  78. })
  79. document.addEventListener('keydown', (event) => {
  80. if (event.key === '.') {
  81. audio.pause()
  82. }
  83. })
  84. document.addEventListener('keydown', (event) => {
  85. if (event.key === 'p') {
  86. setTimeout(alert("Paused"),4000);
  87. }
  88. })
  89. var wpm = 73; //Recommended
  90. var accuracy = 97; //Recommended
  91. //Warring Use on a (ATL) Most likely going to get Banned
  92. const sockets = [];
  93. const nativeWebSocket = window.WebSocket;
  94. window.WebSocket = function(...args){
  95. const socket = new nativeWebSocket(...args);
  96. sockets.push(socket);
  97. return socket;
  98. };
  99. function sleep(s) {
  100. var ms = s*1000;
  101. return new Promise(resolve => setTimeout(resolve, ms));
  102. }
  103. async function main(ws) {
  104. console.log('Message from server ', event.data);
  105. var message = event.data;
  106. function scan_for_text(message){ //Scanning messages to see if we can find the typing text.
  107. try {
  108. message = JSON.parse(message.slice(1,)).payload
  109. return message.l
  110. }
  111. catch {
  112. return null
  113. }
  114. return null
  115. }
  116. async function type(msg, speed, accuracy, nitros='true') {
  117. function len(x) {
  118. return x.length;
  119. }
  120. function str(x) {
  121. return x.toString()
  122. }
  123. function int(x) {
  124. return Number(x)
  125. }
  126. if ((len(msg) == 0) || (msg[0].startsWith("{'user"))) { //These are wrong messages
  127. return
  128. }
  129. function randrange(min, max) {
  130. return Math.floor(Math.random() * (max - min) ) + min;
  131. }
  132. var delay1 = randrange(7, 9) / 10 //If the delays are longer apart, they have more variety. Put in race function
  133. var delay2 = randrange(11, 14) / 10
  134. var words = msg.split(" ") //Turn into a list
  135. var wordString = words.join(' ') //Sounds nicer than "msg"
  136. function findLongestWord(str) {
  137. var longestWord = str.split(' ').sort(function(a, b) { return b.length - a.length; });
  138. return longestWord[0].length;
  139. }
  140. var biggestWord = findLongestWord(wordString);
  141. var list = [];
  142. for (var w in words.slice(0,words.length-1)) {
  143. list.push(w + ' ')
  144. }
  145. function round(x, p) {
  146. return Number.parseFloat(x).toPrecision(p);
  147. }
  148. words = list + words.slice(words.length-1)
  149. var numOfChars = wordString.length
  150. var numOfWords = numOfChars/5
  151. var numOfSecs = (numOfWords/speed) * 60
  152. var sleepTime = numOfSecs / numOfChars
  153. var sleep1 = round((sleepTime * delay1), 6) * 10000000
  154. var sleep2 = round((sleepTime * delay2), 6) * 10000000 //Get time to sleep after each char
  155. if(nitros == 'true'){
  156. var usedNitro = false
  157. } else if (nitros == 'random') { //Random check to see if we should use nitros
  158. var check = randrange(1,3)
  159. if(check == 1) {
  160. usedNitro = false
  161. }
  162. else {
  163. usedNitro = true
  164. }
  165. } else {
  166. usedNitro = true
  167. }
  168. await sleep(4.3);
  169. ws.send('4{"stream":"race","msg":"update","payload":{"t":1,"f":0}}') //First character has to have "f":0
  170. var t = 2
  171. var e = 1
  172. console.log(words);
  173. for (w in words) {
  174. if(int(len(w)) >= int(biggestWord) && usedNitro == false) {
  175. t += len(w)
  176. var payload = '4{"stream":"race","msg":"update","payload":{"n":1,"t":' + str(t) + ',"s":' + str(len(w)) + '}}' //Using nitro
  177. ws.send(payload)
  178. await sleep(0.2)
  179. payload = '4{"stream":"race","msg":"update","payload":{"t":' + str(t) + '}}' //sending another character
  180. ws.send(payload)
  181. t += 1
  182. usedNitro = true
  183. } else {
  184. for (var c in w) {
  185. var errorProbability = randrange(0,100) / 100
  186. var accuracyWrongPercentage = 1 - accuracy/100
  187. if(accuracyWrongPercentage >= errorProbability) {
  188. payload = '4{"stream":"race","msg":"update","payload":{"e":' + str(e) + '}}' //sending error
  189. ws.send(payload)
  190. e += 1
  191. }
  192. if ((t % 4 == 0) || (t >= (numOfChars - 4))) {
  193. payload = '4{"stream":"race","msg":"update","payload":{"t":' + str(t) + '}}' //sending character
  194. ws.send(payload)
  195. }
  196. t += 1
  197. var sleeptime = randrange(int(sleep1), int(sleep2)) / 10000000 //sleep between each character at a random interval according to the WPM
  198. await sleep(sleeptime)
  199. }
  200. }
  201. }
  202. ws.close()
  203. }
  204. var words = scan_for_text(message)
  205. if (words) {
  206. await type(words, wpm, accuracy)
  207. }
  208. }
  209. setTimeout( function () {
  210. var ws = sockets[0];
  211. ws.addEventListener('message', async function(event) {await main(ws, event)});
  212. }, 5000)
  213.  
  214. //Add More states
  215. document.addEventListener('keydown', (event) => {
  216. if (event.key === 'q') {
  217. wpm++
  218. console.log(wpm)
  219. }
  220. })
  221. document.addEventListener('keydown', (event) => {
  222. if (event.key === 'e') {
  223. accuracy++
  224. console.log(accuracy)
  225. }
  226. })