JAPON BOT

JAPON

  1. // ==UserScript==
  2. // @name JAPON BOT
  3. // @namespace http://tampermonkey.net/
  4. // @version 4.0.1
  5. // @description JAPON
  6. // @author QuweD
  7. // @match *://*/*
  8. // @icon https://gartic.io/static/images/avatar/svg/16.svg
  9. // @grant GM_addStyle
  10. // @grant GM_setValue
  11. // @grant GM_getValue
  12. // @grant GM_addValueChangeListener
  13. // ==/UserScript==
  14.  
  15. function f(ygn){return document.querySelector(ygn)}
  16. function fa(ygn){return document.querySelectorAll(ygn)}
  17. function rc(ygn){let e=f('input[name="chat"]');let lv=e.value;e.value="";let ev=new Event('input',{bubbles:true});ev.simulated=true;let t=e._valueTracker;if(t){t.setValue(lv);};e.dispatchEvent(ev);}
  18. function rs(ygn){let e=f(".search input");let lv=e.value;e.value="";let ev=new Event('input',{bubbles:true});ev.simulated=true;let t=e._valueTracker;if(t){t.setValue(lv);};e.dispatchEvent(ev);}
  19. function num(ygn){return Math.ceil(Math.random()*ygn+1)}
  20. function removeOldItems(data){const now = Date.now();const newData = data.filter(item => (now - item.timestamp) <= (6 * 60 * 60 * 1000));return newData;}
  21. function rnext(kelime) {const hd = kelime.split('');const hu = hd.length;const yh = [];for (let i = 0; i < hu; i++) {yh.push(hd[i]);if (i < hu - 1){const re = Math.floor(Math.random() * 3);const eh = '‏'.repeat(re);yh.push(eh);}}return yh.join('');}
  22.  
  23. let cmd="",wss=[],tojoin=0,usersinroom=[]
  24.  
  25. if(window.location.href.indexOf("aHR0cHM6Ly9nYXJ0aWMuaW8")!=-1){
  26. let room,kicknewstat=false,kickjoinstat=false,waitforkick=0
  27.  
  28. document.body.innerHTML=`
  29. <h2 style="line-height:40px;position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);">BU SEKME HAZIR. CROXYPROXY.COM ADRESİNDEN BAŞKA BOT SEKMESİ AÇABİLİR YA DA GARTİCO ADRESİNDEN BOT ATMAYA BAŞLAYABİLİRSİN.</h2>
  30. `
  31. GM_setValue("botekle",num(6000))
  32.  
  33. GM_addValueChangeListener("resetcount", function(n,o,nv,r) {
  34. GM_setValue("botekle",num(6000))
  35. })
  36. setTimeout(()=>{waitforkick=0},1000)
  37.  
  38. GM_addValueChangeListener("gir", function(n,o,nv,r) {
  39. room=nv.split(".")[0]
  40. fetch("https://"+window.location.href.split("/")[2]+"/server?check=1&v3=1&room="+room+"&__cpo=aHR0cHM6Ly9nYXJ0aWMuaW8#").then(x=>x.text()).then(x=>{
  41. let myws=new WebSocket("wss://"+window.location.href.split("/")[2]+"/__cpw.php?u="+btoa("wss://"+x.split("https://")[1].split(".")[0]+".gartic.io/socket.io/?c="+x.split("?c=")[1]+"&EIO=3&transport=websocket")+"&o=aHR0cHM6Ly9nYXJ0aWMuaW8=");
  42. myws.onopen=()=>{
  43. GM_setValue("ready",num(6000))
  44. let inter=setInterval(()=>{
  45. if(tojoin==1){
  46. tojoin=0
  47. myws.send('42[3,{"v":20000,"nick":"'+rnext("金 木 研")+'","avatar":16,"platform":0,"sala":"'+room.slice(-4)+'"}]')
  48. clearInterval(inter)
  49. }
  50. },50)
  51. }
  52. myws.onclose=()=>{
  53. wss.length=0
  54. myws.close();
  55. }
  56. myws.onmessage=(msg)=>{
  57. if(msg.data.indexOf('42["23"')!=-1){
  58. let user=JSON.parse("{"+msg.data.split("{")[1].split("}")[0]+"}")
  59. usersinroom.push(user)
  60. if(waitforkick==0&&user.nick.split("‏").join("")!="金 木 研"&&kicknewstat){typeof(user.id)=="string"?myws.send('42[45,'+myws.id+',["'+user.id+'",true]]'):myws.send('42[45,'+myws.id+',['+user.id+',true]]');waitforkick=1}
  61. }
  62. if(msg.data.indexOf('42["5"')!=-1){
  63. let objlist=JSON.parse('["5"'+msg.data.split('42["5"')[1])
  64. myws.id=objlist[2]
  65. objlist[5].forEach(item=>{usersinroom.push(item)})
  66. let targetid=objlist[5][0].id
  67. kickjoinstat?typeof(targetid)=="string"?myws.send('42[45,'+myws.id+',["'+targetid+'",true]]'):myws.send('42[45,'+myws.id+',['+targetid+',true]]'):0
  68. myws.send('42[46,'+objlist[2]+']')
  69. JSON.stringify(wss).indexOf(objlist[2])==-1?wss.push({"ws":myws,"id":objlist[2],"lengthID":objlist[1]}):0
  70. let interval=setInterval(()=>{
  71. myws.readyState==1?myws.send('42[42,'+objlist[2]+']'):clearInterval(interval)
  72. myws.readyState==1?myws.send('2'):clearInterval(interval)
  73. },20000);
  74. setTimeout(()=>{wss.forEach(item=>{item.ws.send('42[24,'+item.id+']');wss.length=0;usersinroom.length=0;GM_setValue("gir",room)})},100*1000)
  75. }
  76. }
  77. })
  78. });
  79. GM_addValueChangeListener("çık", function(n,o,nv,r) {
  80. wss.forEach(item=>{item.ws.send('42[24,'+item.id+']')})
  81. wss.length=0
  82. usersinroom.length=0
  83. });
  84. GM_addValueChangeListener("join", function(n,o,nv,r) {
  85. tojoin=1
  86. });//42[11,1700993873558,"sa"]
  87. GM_addValueChangeListener("msg", function(n,o,nv,r) {
  88. wss.forEach(item=>{item.ws.send('42[11,'+item.id+',"'+nv.split("►")[0]+'"]')})
  89. });
  90. GM_addValueChangeListener("kicknewset", function(n,o,nv,r) {
  91. kicknewstat=nv
  92. });
  93. GM_addValueChangeListener("kickjoinset", function(n,o,nv,r) {
  94. kickjoinstat=nv
  95. });
  96. GM_addValueChangeListener("rep", function(n,o,nv,r) {
  97. wss.forEach(item=>{item.ws.send('42[35,'+item.id+']')})
  98. });
  99. GM_addValueChangeListener("kickle", function(n,o,nv,r) {
  100. let username=nv.split("..")[0],userid
  101. usersinroom.forEach(x=>{
  102. if(x.nick==username){
  103. let userid=x.id
  104. wss.forEach(ws=>{
  105. x.nick.split("‏").join("")!="金 木 研"?typeof(userid)=="string"?ws.ws.send('42[45,'+ws.id+',["'+userid+'",true]]'):ws.ws.send('42[45,'+ws.id+',['+userid+',true]]'):0
  106. })
  107. }
  108. })
  109.  
  110. });
  111. window.addEventListener("beforeunload",()=>{
  112. GM_setValue("botçıkar",window.location.href.split("/")[2]+"--"+num(3131))
  113. })
  114. }
  115.  
  116. if(window.location.href.indexOf("gartic.io")!=-1){
  117. let readyc=0,botc=0,otoeven=0,roomusers=[]
  118.  
  119. let WebSocket=window.WebSocket
  120. window.ginterval=0
  121. window.selectlevel=-1
  122. let originalSend = WebSocket.prototype.send,setTrue=false;
  123. window.wsObj={}
  124. console.log("running")
  125. WebSocket.prototype.send=function(data){
  126. originalSend.apply(this, arguments)
  127. if(Object.keys(window.wsObj).length==0){window.wsObj=this;window.eventAdd()}
  128. };
  129.  
  130. function updatespeckicks(){
  131. f(".userkickmenu").innerHTML=""
  132. roomusers.forEach(user=>{
  133. user.nick.split("‏").join("")!="金 木 研"?f(".userkickmenu").innerHTML+=`<input type="submit" class="kickmenubtn" value="`+user.nick+`" onclick="window.postMessage('kickuser.`+user.nick+`','*')">`:0
  134. })
  135. }
  136.  
  137. window.eventAdd=()=>{
  138. if(!setTrue){
  139. setTrue=1
  140. window.wsObj.addEventListener("message",(msg)=>{
  141. if(msg.data.indexOf('42["5"')!=-1){
  142. let objlist=JSON.parse('["5"'+msg.data.split('42["5"')[1])
  143. objlist[5].forEach(item=>{roomusers.push(item)})
  144. updatespeckicks()
  145. }
  146. if(msg.data.indexOf('42["23"')!=-1){
  147. let user=JSON.parse("{"+msg.data.split("{")[1].split("}")[0]+"}")
  148. roomusers.push(user)
  149. updatespeckicks()
  150. }
  151. if(msg.data.indexOf('42["24"')!=-1){
  152. let user=msg.data.split(",")[1].split('"')[1]
  153. for(let i=0;i<roomusers.length;i++){
  154. typeof(roomusers[i].id)==='undefined'?0:roomusers[i].id==user?roomusers.splice(i,1):0
  155. }
  156. updatespeckicks()
  157. }
  158. })
  159. }
  160. }
  161.  
  162. let html=`
  163. <div class="rb4">
  164. <h3 style="color:purple;">japonbot <span style="font-size:9pt;">(<span style="font-size:9pt;" class="taktifbot">0</span> bot)</span></h3>
  165. <input type="text" style="width:140px;" class="roomlink" placeholder="oda linki">
  166. <input type="submit" style="width:25px;" onclick="window.postMessage('gir','*')" value="gir">
  167. <input type="submit" style="width:25px;" onclick="window.postMessage('çık','*')" value="çık"><br>
  168. <input type="text" style="width:100px;" class="mesg" placeholder="chat mesaj">
  169. <input type="submit" style="width:45px;" onclick="window.postMessage('mess','*')" value="gönder">
  170. <input type="submit" style="width:45px;" onclick="window.postMessage('rep','*')" value="report"><br>
  171. <input type="checkbox" class="kickonjoin">&nbsp;&nbsp;&nbsp;girişte ilk sıradakini oyla<br>
  172. <input type="checkbox" class="kicknew">&nbsp;yeni giren oyuncuları oyla<hr>
  173. <div class="userkickmenu"></div>
  174. </div>
  175. `
  176.  
  177. function setCSS(){
  178. var css = `
  179. @import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
  180. .rb4 *{box-sizing:border-box;}
  181.  
  182.  
  183. .rb4{
  184. display:block;text-align:center;opacity:0.9;font-size:10pt;color:purple;font-style:italic;
  185. position:fixed;left:50%;top:3px;padding:5px 3px !important;margin:0px;background:#101112;font-family: 'Roboto', sans-serif;border:2px solid #492276;
  186. transform:translate(-50%,0);border-radius:15px;z-index:999999999;display:block !important;height:auto !important;width:200px !important;
  187. }
  188. .rb4 input[type=text]{height:20px;border-radius:3px;font-size:9pt;background:brown;color:white;padding-left:3px;}
  189. .rb4 input[type=submit]{height:20px;border-radius:3px;background:purple;}
  190. .rb4 input[type=checkbox]{margin-top:2px;}
  191.  
  192. #background{
  193. z-index:999;width:0px;height:0px;position:fixed;left:0px;top:0px;
  194. }
  195.  
  196. `;
  197. GM_addStyle(css);
  198. f(".kicknew").addEventListener("change",()=>{
  199. GM_setValue("kicknewset",f(".kicknew").checked)
  200. })
  201. f(".kickonjoin").addEventListener("change",()=>{
  202. GM_setValue("kickjoinset",f(".kickonjoin").checked)
  203. })
  204. }
  205.  
  206. window.addEventListener("message",function(event){
  207. if(typeof(event.data)==="string"){
  208. if(event.data=="gir"){
  209. f(".roomlink").value==""?f(".roomlink").value=window.location.href:0
  210. botc=0;GM_setValue("resetcount",num(10000))
  211. readyc=0
  212. GM_setValue("gir",f(".roomlink").value.split("/")[3]+"."+num(5000)+"."+f(".kickonjoin").checked)
  213. }
  214. if(event.data.indexOf("kickuser.")!=-1){
  215. let username=event.data.split("kickuser.")[1]
  216. GM_setValue("kickle",username+".."+num(10000))
  217. }
  218. if(event.data=="çık"){
  219. GM_setValue("çık",num(5000))
  220. botc=0
  221. GM_setValue("resetcount",num(10000))
  222. }
  223. if(event.data=="rep"){
  224. GM_setValue("rep",num(5000))
  225. }
  226. if(event.data=="mess"){
  227. GM_setValue("msg",f(".mesg").value+"►"+num(5000))
  228. f(".mesg").value=""
  229. }
  230. }
  231. })
  232.  
  233. localStorage.getItem("botc")?0:window.localStorage.setItem("botc",0)
  234. GM_setValue("resetcount",num(10000))
  235. //
  236. setInterval(()=>{
  237. if(f("#users")){
  238. fa(".kickmenubtn").forEach(ele=>{
  239. f(".scrollElements").innerText.indexOf(ele.value)==-1?ele.remove():0
  240. })
  241. f("g")?f("g").remove():0;
  242. }
  243. if(f("input[name=chat]")){
  244. f(".contentPopup")&&f(".btYellowBig.ic-yes")?f(".btYellowBig.ic-yes").click():0;
  245. if(f("input[name=chat]").value=="!gir"){
  246. botc=0;GM_setValue("resetcount",num(10000))
  247. rc()
  248. readyc=0
  249. GM_setValue("gir",window.location.href.split("/")[3]+"."+num(5000))
  250. }
  251. if(f("input[name=chat]").value=="!yenile"){
  252. GM_setValue("resetcount",num(10000))
  253. rc()
  254. }
  255. if(f("input[name=chat]").value=="!çık"){
  256. rc()
  257. GM_setValue("çık",window.location.href.split("/")[3]+"."+num(5000))
  258. }
  259. if(f("input[name=chat]").value=="!rep"){
  260. rc()
  261. GM_setValue("rep",window.location.href.split("/")[3]+"."+num(5000))
  262. }
  263. if(f(".contentPopup .nick")&&f(".ic-votekick")&&otoeven==0){
  264. otoeven=1//
  265. f(".close").addEventListener("click",()=>{otoeven=0})
  266. f(".ic-ignore").addEventListener("click",()=>{otoeven=0})
  267. f(".ic-votekick").addEventListener("click",()=>{
  268. otoeven=0
  269. GM_setValue("kickle",f(".contentPopup .nick").innerText+".."+num(10000))
  270. })
  271. }
  272. }
  273. f("input[name=chat]")?f("input[name=chat]").setAttribute("placeholder",+botc+" bot aktif"):0
  274. f(".taktifbot")?f(".taktifbot").innerText=botc:0
  275.  
  276. if(f("#background")&&!f(".rb4")){
  277. f("#background").innerHTML+=html
  278. setCSS()
  279. }
  280. },100)
  281. GM_addValueChangeListener("botekle", function(n,o,nv,r) {
  282. botc++
  283. f(".taktifbot")?f(".taktifbot").innerText=botc:0
  284. })
  285.  
  286. GM_addValueChangeListener("ready", function(n,o,nv,r) {
  287. readyc++
  288. readyc>=botc&&botc!=0?GM_setValue("join",num(1000)):0
  289. })
  290.  
  291. GM_addValueChangeListener("botçıkar", function(n,o,nv,r) {
  292. //botc--
  293. })
  294. }

QingJ © 2025

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