YGN GARTIC.IO SCRIPT 2022 EDITION (2x Fast)

YGN GARTIC.IO SCRIPT 2022 EDITION (2x Faster)

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

  1. // ==UserScript==
  2. // @name YGN GARTIC.IO SCRIPT 2022 EDITION (2x Fast)
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.1
  5. // @description YGN GARTIC.IO SCRIPT 2022 EDITION (2x Faster)
  6. // @author YGN
  7. // @match *://*/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=gartic.io
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. if(window.location.href.indexOf("gartic.io")!=-1||window.location.href.indexOf("_cp")!=-1){
  13. let url,loop,usertype="admin",lastGM,rand,admin="OYUNDAKİ ADIN",cmd,kbotready=0,t,c,ev,ev2,e,lv,res,i //ADMİN KISMINI OYUNDAKİ ADIN YAP
  14.  
  15. function f(a){return document.querySelector(a)}
  16. function fa(a){return document.querySelectorAll(a)}
  17. function retry(type=""){url=window.location.href+type;f("#exit").click();loop=setInterval(()=>{if(document.querySelector("#nprogress")){clearInterval(loop);loop=setInterval(()=>{if(!document.querySelector("#nprogress")){clearInterval(loop);window.location.href=url}},1)}},1)}
  18. function resetchat(){setTimeout(()=>{if(f("#chat")){for(let i of fa(".scrollElements")[2].querySelectorAll("span")){i.innerText="YGN"}setTimeout(()=>{kbotready=1},300)}},300)}
  19. function w(x){e=document.querySelector('input[name="chat"]');lv=e.value;e.value=x;ev=new Event('input',{bubbles:true});ev.simulated=true;t=e._valueTracker;if(t){t.setValue(lv);}e.dispatchEvent(ev);}
  20. function en(x){res="";for(i in x){res+=String.fromCharCode(x[i].charCodeAt()+1)}return res}
  21. function de(x){res="";for(i in x){res+=String.fromCharCode(x[i].charCodeAt()-1)}return res}
  22.  
  23. window.location.href.indexOf("?bot")!=-1?usertype="bot":0
  24. window.location.href.indexOf("_cp")!=-1?usertype="kicklibot":0
  25.  
  26. localStorage.setItem("cmd","")
  27.  
  28. window.addEventListener("keydown",(event)=>{
  29. if(window.event.keyCode==27){retry()}
  30. if(window.event.keyCode==192&&usertype=="admin"){rand=Math.floor(Math.random()*10000+1);localStorage.setItem("cmd", prompt()+"_"+rand)}
  31. })
  32.  
  33. setInterval(()=>{
  34. if(usertype=="admin"&&f("#chat")&&f(".contentPopup")){
  35. if(f(".contentPopup").querySelector(".avatar")&&f(".contentPopup").querySelector(".nick")){
  36. for(let i of f("#users").querySelectorAll(".user")){
  37. if(i.querySelector(".nick").innerText==f(".contentPopup").querySelector(".nick").innerText){
  38. w("k "+en(i.querySelector(".nick").innerText))
  39. }
  40. }
  41. }
  42. }
  43. if(usertype=="kicklibot"&&f("#chat")&&kbotready==1){
  44. for(let i of f("#chat").querySelectorAll(".msg")){
  45. if(i.querySelector("strong").innerText==admin&&i.getAttribute("class").indexOf(" ")==-1){
  46. cmd=i.querySelector("span").innerText
  47. i.querySelector("span").innerText="YGN"
  48. cmd=="r"?f(".denounce").click():0
  49. cmd=="rr"?retry():0
  50. if(cmd.split(" ")[0]=="k"){
  51. for(let i of f("#users").querySelectorAll(".user")){
  52. if(i.querySelector(".nick").innerText==de(cmd.split(" ")[1])){
  53. i.click();
  54. f(".btYellowBig.ic-votekick").click();
  55. }
  56. }
  57. }
  58. }
  59. }
  60. }
  61. if(usertype=="bot"&&f("#chat")){
  62. if(lastGM!=localStorage.getItem("cmd")){
  63. lastGM=localStorage.getItem("cmd")
  64. lastGM.split("_")[0]=="r"?f(".denounce").click():0
  65. lastGM.split("_")[0]=="rr"?retry("?bot"):0
  66. }
  67. }
  68. if(document.querySelector(".btYellowBig.ic-yes")){
  69. document.querySelector(".btYellowBig.ic-yes").click()
  70. resetchat()
  71. }
  72. f(".btYellowBig.ic-playHome")&&f("#popUp").style.display=="none"&&f(".content.join")?f(".btYellowBig.ic-playHome").click():0
  73. },50)
  74. }