Powerline.io mod menu

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

当前为 2021-03-05 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Powerline.io mod menu
  3. // @namespace http://tampermonkey.net/
  4. // @version 15.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.  
  12.  
  13. //window.onload = function() {
  14. //document.getElementById("firstRightBox").innerHTML = "Press ctrl to see the stats change!";
  15. //};
  16.  
  17. //Make mod menu button
  18. $("#firstRightBox").after('<center><button id="menubtn">MOD MENU</button></center>');
  19. $('#menubtn').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;}</style>');
  23. //js
  24. //make script
  25. menu.document.write('<script>function score() {var amnt = window.prompt("Please type in the amount of score you want");localStorage.setItem("scor", amnt);}function bestscore() {var amnt = window.prompt("Please type in what you want your best score to be"); localStorage.setItem("bestscore", amnt);}</script>');
  26. //menu content
  27. menu.document.write('<h1>Shed Menu</h1>');
  28. menu.document.write('<h2 class="opt">Menu options:</h2>');
  29. menu.document.write('<p class="opt">press enter to save</p>');
  30. menu.document.write('<h3 class="opt">Score hacks:</h3><br>');
  31. menu.document.write('<button class="btn" onclick="score()">SCORE</button>');
  32. menu.document.write('<button class="btn" onclick="bestscore()">BEST-SCORE</button>');
  33. menu.document.write("<p>This mod menu is still being made, I just wanna see how you guys like it. PLEASE message me on discord about your feed back! Sincere your's truly~shed_modz_");
  34. menu.document.write('<a href="https://discord.gg/KCrDax8M4N">Click here to join the discrod</a>');
  35. });
  36.  
  37. function o() {
  38. window.open("", "", "width=233,height=400");
  39. }
  40.  
  41. window.addEventListener('keydown', mod, false);
  42. function mod(i) {
  43. if(i.keyCode === 17) {
  44. var score = localStorage.getItem('score');
  45. var bscore = localStorage.getItem('bestscore');
  46. document.getElementById('stat-length').innerHTML = score;
  47. document.getElementById('stat-blength').innerHTML = bscore;
  48. }
  49. }