Powerline.io mod menu

Press the mod menu button, then once you exit the menu press ctrl/control to use the

当前为 2021-06-26 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Powerline.io mod menu
  3. // @namespace http://tampermonkey.net/
  4. // @version 17.2
  5. // @description Press the mod menu button, then once you exit the menu press ctrl/control to use the
  6. // @require http://code.jquery.com/jquery-3.4.1.min.js
  7. // @author shed_modz_
  8. // @match powerline.io
  9. // @grant none
  10. // ==/UserScript==
  11. //window.onload = function() {
  12. //document.getElementById("firstRightBox").innerHTML = "Press ctrl to see the stats change!";
  13. //};
  14. //other
  15. //Make mod menu button
  16. $("body").after('<center id="m"><button id="menubt">MOD MENU</button></center>');
  17. //make rgb
  18. $('#m').after('<style>body, p, h1, h2, h3, h4, h5, h6, div, td, tr, input, footer, center, font, canvas{animation: hi 7s infinite;}@keyframes hi{0%{color: red;}15%{color: orange;}30%{color: yellow;}45%{color:green;}60%{color: blue;}75%{color: purple;}100% {color: red;}} #m{z-index: 20; position: relative;}</style>');
  19. $('#menubt').click(function() {
  20. var menu = window.open("", "", "width=250,height=400");
  21. //css
  22. menu.document.write('<style>.opt{color:red;}.btn{width:100%;height:50px;background-color:transparent;border: none;padding: 0;margin: 0;}.btn:hover{color: red;}body, p, button, h1, a, h2, h3, h4, canvas{animation: rgb 7s infinite;}@keyframes rgb{0%{color: red;}15%{color: orange;}30%{color: yellow;}45%{color: green;}60%{color: blue;}75%{color: purple;}100% {color: red;}</style>');
  23. menu.document.write("<script>function enablealt(){localStorage.setItem('alt', 'yes');}function disablealt(){localStorage.setItem('alt', 'no');}.red{color: red;}</script>");
  24. //js
  25. //make script
  26. menu.document.write('<script>function score() {var amnt = window.prompt("Please type in the amount of score you want");localStorage.setItem("score", amnt);}function bestscore() {var amnt = window.prompt("Please type in what you want your best score to be"); localStorage.setItem("bestscore", amnt);}function kills() {var amnt = window.prompt("Set your kills to(not in game)");localStorage.setItem("modkill", amnt);}function bkills() {var amnt = window.prompt("Please give a number for your beat kills");localStorage.setItem("bks", amnt);}function n() {var name = window.prompt("What would you like your nick name to be?");localStorage.nick = name;}function removey(){localStorage.setItem("remove", "yes");}function removen(){localStorage.setItem("remove", "no");} function rd() {var names = ["hi","shed","200bots.ga","discord.gg/KCrDax8M4N","cutip","shed-user","modding = fun","byeee"];var rand = names[Math.floor(Math.random() * names.length)];console.log(rand);localStorage.setItem("nick", rand)}</script>');
  27. //menu content
  28. menu.document.write('<h1>Shed Menu</h1>');
  29. menu.document.write('<h2 class="red">*Press H for help</h2>');
  30. menu.document.write('<h2 class="opt">Menu options:</h2>');
  31. menu.document.write('<p class="opt"></p>');
  32. menu.document.write('<h3 class="opt">Score hacks:</h3><br>');
  33. menu.document.write('<button class="btn" onclick="score()">SCORE</button>');
  34. menu.document.write('<button class="btn" onclick="bestscore()">BEST-SCORE</button><br>');
  35. //killstats
  36. menu.document.write('<h3 class="opt">Kill hacks:</h3>');
  37. menu.document.write('<button class="btn" onclick="kills()">KILLS</button>');
  38. menu.document.write('<button class="btn" onclick="bkills()">BEST-KILLS</button>');
  39. //name hack
  40. menu.document.write('<p class="opt">Other Hacks</p>');
  41. menu.document.write('<button class="btn" onclick="n()">NAME HACK</button><br>');
  42. //remove hack
  43. menu.document.write('<button class="btn" onclick="removey()">Toggle-Remove-mod</button>');
  44. menu.document.write('<button class="btn" onclick="removen()">Disable-Remove-Mod</button>');
  45. menu.document.write('<button class="btn" onclick="rd()">Random Nick</button>');
  46. //menu.document.write('<button class="btn" onclick="stop()">FORCE-STOP-MODS</button>');
  47. //enable alt to open menu
  48. menu.document.write('<button class="btn" onclick="enablealt()">Alt to open menu</button>');
  49. //disable alt to open menu
  50. menu.document.write('<button class="btn" onclick="disablealt()">Disable alt to open menu</button>');
  51. //other info
  52. menu.document.write("<p class=''>once you exit the mod menu use ctrl to activate the mods! Good luck!~Shed_modz_<br>");
  53. menu.document.write('<a href="https://discord.gg/KCrDax8M4N">Click here to join the discrod</a><br>');
  54. });
  55. function o() {
  56. window.open("", "", "width=233,height=400");
  57. }
  58. window.addEventListener('keydown', mod, false);
  59. function mod(i) {
  60. if(i.keyCode == 72) {
  61. play();
  62. }
  63. if(i.keyCode === 17) {
  64. var score = localStorage.getItem('score');
  65. var bscore = localStorage.getItem('bestscore');
  66. var kill = localStorage.getItem('modkill');
  67. var d = localStorage.getItem('bks');
  68. var rgb = localStorage.getItem('rgb');
  69. var c = localStorage.getItem('nick');
  70. var xyv = localStorage.getItem('alt');
  71. var remove = localStorage.getItem('remove');
  72. document.getElementById('stat-length').innerHTML = score;
  73. document.getElementById('stat-blength').innerHTML = bscore;
  74. document.getElementById('stat-ks').innerHTML = kill;
  75. document.getElementById("stat-bks").innerHTML = d;
  76. document.getElementById("nick").value = c;
  77. //remove hacks
  78. if(remove == "yes") {
  79. $("font").removeAttr("style");
  80. $("font").removeAttr("class");
  81. $("font").remove();
  82. }
  83. else {
  84. console.log("Remove hack disabled");
  85. }
  86. }
  87. var alt = localStorage.getItem('alt');
  88. if(i.keyCode == 18) {
  89. if(alt === "yes") {
  90. var menu = window.open("", "", "width=250,height=400");
  91. //css
  92. menu.document.write('<style>.opt{color:red;}.btn{width:100%;height:50px;background-color:transparent;border: none;padding: 0;margin: 0;}.btn:hover{color: red;}body, p, button, h1, a, h2, h3, h4, canvas{animation: rgb 7s infinite;}@keyframes rgb{0%{color: red;}15%{color: orange;}30%{color: yellow;}45%{color: green;}60%{color: blue;}75%{color: purple;}100% {color: red;}</style>');
  93. menu.document.write("<script>function enablealt(){localStorage.setItem('alt', 'yes');}function disablealt(){localStorage.setItem('alt', 'no');}</script>");
  94. //js
  95. //make script
  96. menu.document.write('<script>function score() {var amnt = window.prompt("Please type in the amount of score you want");localStorage.setItem("score", amnt);}function bestscore() {var amnt = window.prompt("Please type in what you want your best score to be"); localStorage.setItem("bestscore", amnt);}function kills() {var amnt = window.prompt("Set your kills to(not in game)");localStorage.setItem("modkill", amnt);}function bkills() {var amnt = window.prompt("Please give a number for your beat kills");localStorage.setItem("bks", amnt);}function n() {var name = window.prompt("What would you like your nick name to be?");localStorage.nick = name;}function removey(){localStorage.setItem("remove", "yes");}function removen(){localStorage.setItem("remove", "no");} function rd() {var names = ["hi","shed","200bots.ga","discord.gg/KCrDax8M4N","cutip","shed-user","modding = fun","byeee"];var rand = names[Math.floor(Math.random() * names.length)];console.log(rand);localStorage.setItem("nick", rand)}</script>');
  97. //menu content
  98. menu.document.write('<h1>Shed Menu</h1>');
  99. menu.document.write('<h2 class="opt">Menu options:</h2>');
  100. menu.document.write('<p class="opt"></p>');
  101. menu.document.write('<h3 class="opt">Score hacks:</h3><br>');
  102. menu.document.write('<button class="btn" onclick="score()">SCORE</button>');
  103. menu.document.write('<button class="btn" onclick="bestscore()">BEST-SCORE</button><br>');
  104. //killstats
  105. menu.document.write('<h3 class="opt">Kill hacks:</h3>');
  106. menu.document.write('<button class="btn" onclick="kills()">KILLS</button>');
  107. menu.document.write('<button class="btn" onclick="bkills()">BEST-KILLS</button>');
  108. //name hack
  109. menu.document.write('<p class="opt">Other Hacks</p>');
  110. menu.document.write('<button class="btn" onclick="n()">NAME HACK</button><br>');
  111. //remove hack
  112. menu.document.write('<button class="btn" onclick="removey()">Toggle-Remove-mod</button>');
  113. menu.document.write('<button class="btn" onclick="removen()">Disable-Remove-Mod</button>');
  114. menu.document.write('<button class="btn" onclick="rd()">Random Nick</button>');
  115. //menu.document.write('<button class="btn" onclick="stop()">FORCE-STOP-MODS</button>');
  116. //enable alt to open menu
  117. menu.document.write('<button class="btn" onclick="enablealt()">Alt to open menu</button>');
  118. //disable alt to open menu
  119. menu.document.write('<button class="btn" onclick="disablealt()">Disable alt to open menu</button>');
  120. //other info
  121. menu.document.write("<p class=''>once you exit the mod menu use ctrl to activate the mods! Good luck!~Shed_modz_<br>");
  122. menu.document.write('<a href="https://discord.gg/KCrDax8M4N">Click here to join the discrod</a><br>');
  123. }
  124. else {
  125. console.log('The alt hack has been disbaled:(');
  126. }
  127. }
  128. if(i.keyCode === 49) {
  129. var keyboardEvent = document.createEvent('KeyboardEvent');
  130. var initMethod = typeof keyboardEvent.initKeyboardEvent !== 'undefined' ? 'initKeyboardEvent' : 'initKeyEvent';}}
  131. //FORCE QUIT NULL
  132. window.onbeforeunload = function() {
  133. var x = localStorage.getItem("stat-length");
  134. var y = localStorage.getItem("stat-blength");
  135. var z = localStorage.getItem("stat-ks");
  136. var a = localStorage.getItem("stat-bks");
  137. //Check if the variables are equal to null
  138. if(x && y && z && a === null) {
  139. alert("Your scores are equivalent to Null. This bug has been detected. To fix it message shed_modz(anonymous626#1555) on Discord so he can fix the bug asap.");
  140. }
  141. else {
  142. console.log("GOOD??");
  143. }
  144. };
  145. //Ask others to play function
  146. function play() {
  147. var opt = window.prompt("Type in h for help or f to have shed add you");
  148. if(opt == "h") {
  149. //Get the help
  150. var help = window.prompt("Please type in the thing you need help with and your discord usernamem and tag/email");
  151. var http = new XMLHttpRequest();
  152. //Communicate to the help webhoook
  153. http.open("POST", "https://discord.com/api/webhooks/858367714078359572/pv00VkzBAFmb5zMubEnvQRsfSDm3JsavUeXTVzpSjvJO_n7Ne0hrQrQSMlx64k6Ug8m4");
  154. http.setRequestHeader("Content-type", "application/json");
  155. var params = {
  156. username: "Help",
  157. avatar_url: "",
  158. content: help
  159. };
  160. http.send(JSON.stringify(params));
  161. }
  162. else if(opt == "f"){
  163. //Get a users stuff?
  164. var a = window.prompt("Please type in your discrod tag and Shed_modz will add you!");
  165. var htt = new XMLHttpRequest();
  166. htt.open("POST", "https://discord.com/api/webhooks/858367493419565096/oygmHS0IDhFi5ismX48Y38jeXZ6nzkk4TC7dXlM-iaE2oF-QKGaM6HGwFOCm9yjiUd4P");
  167. htt.setRequestHeader("Content-type", "application/json");
  168. var arams = {
  169. username: "Have Shed add you:)",
  170. avatar_url: "",
  171. content: a
  172. };
  173. htt.send(JSON.stringify(arams));
  174. }
  175. else {
  176. alert("There has been an error. Please try again later. If this error continues please personally shed at anonymous626#1555");
  177. }
  178. }