PurposeGames UNIT CIRCLE QUIZ ALL VALUES Hack

Answer the whole Unit Circle on PurposeGames in record Time

目前為 2024-02-03 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name PurposeGames UNIT CIRCLE QUIZ ALL VALUES Hack
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Answer the whole Unit Circle on PurposeGames in record Time
  6. // @author longkidkoolstar
  7. // @match https://www.purposegames.com/*
  8. // @icon https://th.bing.com/th/id/R.201395eef044c88cd80bb137b6638932?rik=4SVeP8xG%2bGt2Tg&pid=ImgRaw&r=0
  9. // @license none
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. let previousValue = document.querySelector('#question-box').getAttribute('data-text');
  17.  
  18. // Function to simulate click
  19. function simulateClick(element) {
  20. const clickEvent = new MouseEvent("click", {
  21. bubbles: true,
  22. cancelable: true,
  23. view: window
  24. });
  25. element.dispatchEvent(clickEvent);
  26. }
  27.  
  28. // Function to display the unit circle, the number to click, and the element
  29. function displayInfo() {
  30. const dots = document.querySelectorAll('.dot');
  31. dots.forEach(dot => {
  32. console.log(`Dot at (${dot.getAttribute('data-x')}, ${dot.getAttribute('data-y')}) represents ${dot.getAttribute('data-text')}`, dot);
  33. });
  34. const targetAngle = document.querySelector('#question-box').getAttribute('data-text');
  35. console.log(`Number to click: ${targetAngle}`);
  36. if (targetAngle !== previousValue) {
  37. solveUnitCircle();
  38. previousValue = targetAngle;
  39. }
  40. }
  41.  
  42. // Main function to find and click the correct dot
  43. function solveUnitCircle() {
  44. const targetAngle = document.querySelector('#question-box').getAttribute('data-text');
  45. const dots = document.querySelectorAll('.dot');
  46. dots.forEach(dot => {
  47. if(dot.getAttribute('data-text') === targetAngle) {
  48. simulateClick(dot);
  49. }
  50. });
  51. }
  52.  
  53. // Create GUI slider and popup
  54. function createSliderAndPopup() {
  55. const slider = document.createElement('input');
  56. slider.type = 'range';
  57. slider.min = '1';
  58. slider.max = '100';
  59. slider.value = localStorage.getItem('sliderValue') || '10'; // Retrieve saved value or use default
  60. slider.style.position = 'fixed';
  61. slider.style.left = '0';
  62. slider.style.bottom = '0';
  63. document.body.appendChild(slider);
  64.  
  65. // Popup for displaying the current slider value
  66. var popup = document.createElement('div');
  67. popup.classList.add('slider-popup');
  68. popup.style.position = 'fixed';
  69. popup.style.backgroundColor = 'rgba(0, 0, 0, 0.8)';
  70. popup.style.color = 'white';
  71. popup.style.padding = '5px 10px';
  72. popup.style.borderRadius = '5px';
  73. popup.style.zIndex = '9999';
  74. popup.style.display = 'none'; // Initially hidden
  75. document.body.appendChild(popup);
  76.  
  77. let intervalId;
  78. slider.oninput = function() {
  79. clearInterval(intervalId);
  80. const intervalTime = 1000 / this.value; // Calculate interval time based on slider value
  81. intervalId = setInterval(solveUnitCircle, intervalTime);
  82. localStorage.setItem('sliderValue', this.value); // Save slider value to localStorage
  83.  
  84. // Show the popup with the current slider value
  85. popup.innerText = 'Speed: ' + this.value;
  86. popup.style.display = 'block';
  87.  
  88. // Calculate slider position and adjust popup position
  89. var sliderRect = slider.getBoundingClientRect();
  90. var popupX = sliderRect.left + ((slider.value - slider.min) / (slider.max - slider.min)) * sliderRect.width - popup.clientWidth / 2;
  91. var popupY = sliderRect.top - popup.clientHeight - 10;
  92.  
  93. popup.style.left = popupX + 'px';
  94. popup.style.top = popupY + 'px';
  95.  
  96. // Start a timer to hide the popup after a certain duration (e.g., 2 seconds)
  97. setTimeout(function() {
  98. popup.style.display = 'none';
  99. }, 2000);
  100. };
  101.  
  102. // Show popup when mouse hovers over the slider
  103. slider.onmouseover = function() {
  104. popup.style.display = 'block';
  105. };
  106.  
  107. // Hide popup when mouse leaves the slider
  108. slider.onmouseout = function() {
  109. popup.style.display = 'none';
  110. };
  111. }
  112. createSliderAndPopup();
  113.  
  114. //setInterval(displayInfo, 1000);
  115. })();

QingJ © 2025

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