Reverse Controls

Reverse controls for the game agar paper To start press S and it will reverse controls also will change the play button to give an indication, press S again to go back to normal controls

  1. // ==UserScript==
  2. // @name Reverse Controls
  3. // @version 1.2
  4. // @description Reverse controls for the game agar paper To start press S and it will reverse controls also will change the play button to give an indication, press S again to go back to normal controls
  5. // @namespace http://tampermonkey.net/
  6. // @author P_M_9_8_6
  7. // @match *http://paper-io.com/agar/*
  8. // @match *http://agarpaper.io/*
  9. // @require http://code.jquery.com/jquery-3.4.1.min.js
  10. // @compatible chrome
  11. // @compatible firefox
  12. // @grant none
  13. // ==/UserScript==
  14. $("document").ready(console.log("Script is ready"));
  15. $("body").append("<div id = 'indicatorText' Style ='Color:black; position:absolute; top:33px; left:10px;font-size:25px;opacity:0.2;'><i>Controls Reversed</i></div>")
  16. $("#indicatorText").hide();
  17. //To eject mass at the press of SpaceBar(keyCode = 32) and keep ejecting if SpaceBar is held down
  18. var interval;
  19. var switchy = false;
  20. var count = 0;
  21. var rev_control = 0;
  22.  
  23. $(document).on('keydown',function(e){
  24. if(e.keyCode == 83){//When S key is pressed
  25.  
  26. window.onkeydown = null;
  27. window.onkeyup = null;
  28.  
  29. if(rev_control == 0){
  30. $(".play").html("PLAY<sub>O</sub>");
  31. $("#indicatorText").show();
  32. rev_control = 1;
  33. }
  34. else if(rev_control == 1){
  35. $(".play").html("PLAY");
  36. $("#indicatorText").hide();
  37. rev_control = 0;
  38. }
  39. }
  40. if(rev_control == 1){
  41. if(e.keyCode == 87){
  42. Split();
  43. }
  44.  
  45. if(e.keyCode == 32){
  46. Feed();
  47. }
  48. }
  49. else if(rev_control == 0){
  50. if(e.keyCode == 87){
  51. Feed();
  52. }
  53.  
  54. if(e.keyCode == 32){
  55. Split();
  56. }
  57. }
  58. }
  59. );
  60.  
  61. var global_i = 0;
  62. function Split() {
  63. if (global_i < 1) {
  64. global_i++;
  65. sp(17);
  66. console.log("Split");
  67. setTimeout(Split, 170); // Increase this number to make its double split slower dont decrease it the server might not accept the split below this number
  68. }
  69. else
  70. global_i = 0;
  71. }
  72.  
  73. function Feed() {
  74. if (global_i < 1) {
  75. global_i++;
  76. sp(21);
  77. console.log("Feed");
  78. setTimeout(Feed, 170); // Increase this number to make its double split slower dont decrease it the server might not accept the split below this number
  79. }
  80. else
  81. global_i = 0;
  82. }
  83.  

QingJ © 2025

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