Bot panel (teste3)(x)kick

Bot Panel for gartic.io

  1. // ==UserScript==
  2. // @name Bot panel (teste3)(x)kick
  3. // @name:tr made by frio
  4. // @name:az hello
  5. // @description Bot Panel for gartic.io
  6. // @description:tr Bot Panel for gartic.io (in Turkish)
  7. // @description:az Bot Panel for gartic.io (in Azerbaijani)
  8. // @version 1.0
  9. // @author frio
  10. // @license MIT
  11. // @match *://gartic.io/*
  12. // @match *://*/*?__cpo=aHR0cHM6Ly9nYXJ0aWMuaW8
  13. // @icon https://cdn.discordapp.com/attachments/1124451069204910161/1177654466523189360/MOSHED-2023-11-24-13-55-23.jpg?ex=65734b30&is=6560d630&hm=1b42ff32759ea222cc3b1eac33cb7852209358d47e44c560b10efe0f8f230752&
  14. // @grant GM_setValue
  15. // @grant GM_getValue
  16. // @grant GM_addValueChangeListener
  17. // @grant GM_addStyle
  18. // @namespace https://gf.qytechs.cn/users/1220697
  19. // ==/UserScript==
  20.  
  21. function fa(hv){return document.querySelectorAll(hv)}
  22. if(window.location.href.indexOf("gartic.io")!=-1){
  23. let readyc=0,botc=0,otoeven=0,roomusers=[]
  24.  
  25. let WebSocket=window.WebSocket
  26. window.ginterval=0
  27. window.selectlevel=-1
  28. let originalSend = WebSocket.prototype.send,setTrue=false;
  29. window.wsObj={}
  30. console.log("running")
  31. WebSocket.prototype.send=function(data){
  32. originalSend.apply(this, arguments)
  33. if(Object.keys(window.wsObj).length==0){window.wsObj=this;window.eventAdd()}
  34. };
  35.  
  36. function updatespeckicks(){
  37. f(".userkickmenu").innerHTML=""
  38. roomusers.forEach(user=>{
  39.  
  40. user.nick.split("‏").join("")!="RED"?f(".userkickmenu").innerHTML+=`<input type="submit" class="kickmenubtn" value="`+user.nick+`" onclick="window.postMessage('kickuser.`+user.id+`','*')">`:0
  41. })
  42. }
  43.  
  44. window.eventAdd=()=>{
  45. if(!setTrue){
  46. setTrue=1
  47. window.wsObj.addEventListener("message",(msg)=>{
  48. if(msg.data.indexOf('42["5"')!=-1){
  49. let objlist=JSON.parse('["5"'+msg.data.split('42["5"')[1])
  50. objlist[5].forEach(item=>{roomusers.push(item)})
  51. updatespeckicks()
  52. window.addEventListener("message",function(event){
  53. if(typeof(event.data)==="string"){
  54. if(event.data.indexOf("kickuser.")!=-1){
  55. let userid=event.data.split("kickuser.")[1]
  56.  
  57. let objlist=JSON.parse('["5"'+msg.data.split('42["5"')[1])
  58. var longID = objlist[1]
  59. var id = objlist[2]
  60. window.wsObj.send('42[45,'+id+',["'+userid+'",true]]')
  61. window.wsObj.send('42[45,'+id+',["'+userid+'",false]]')
  62. }
  63.  
  64.  
  65. }
  66. })
  67. }
  68. if(msg.data.indexOf('42["23"')!=-1){
  69. let user=JSON.parse("{"+msg.data.split("{")[1].split("}")[0]+"}")
  70. roomusers.push(user)
  71. updatespeckicks()
  72. document.querySelector("body > div:nth-child(19) > input:nth-child(12)").value = user.nick
  73. }
  74. if(msg.data.indexOf('42["24"')!=-1){
  75. let user=msg.data.split(",")[1].split('"')[1]
  76. for(let i=0;i<roomusers.length;i++){
  77. typeof(roomusers[i].id)==='undefined'?0:roomusers[i].id==user?roomusers.splice(i,1):0
  78. }
  79. updatespeckicks()
  80. }
  81. })
  82. }
  83. }
  84.  
  85.  
  86. let html=`
  87. <div class="userlist">
  88. <div class="userkickmenu"></div>
  89. </div>
  90. `
  91.  
  92. function setCSS(){
  93. var css = `
  94. @import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
  95. .rb4 *{box-sizing:border-box;}
  96.  
  97.  
  98. .userlist {
  99. display:block;text-align:center;opacity:none;font-size:10pt;color:#FFD700;font-style:italic;
  100. position:fixed;left:50%;top:3px;padding:5px 3px !important;margin:0px;background:#333333;font-family: 'Roboto', sans-serif;border:2px solid #303132;
  101. transform:translate(-50%,0);border-radius:15px;z-index:999999999;display:block !important;height:auto !important;width:200px !important;
  102. }
  103. .userlist input[type=text]{height:20px;border-radius:3px;font-size:9pt;background:brown;color:white;padding-left:3px;}
  104. .userlist input[type=submit]{height:25px;border-radius:3px;background:#FFD700;}
  105. .userlist input[type=checkbox]{margin-top:2px;}
  106.  
  107. #background{
  108. z-index:999;width:0px;height:0px;position:fixed;left:0px;top:0px;
  109. }
  110.  
  111. `;
  112. GM_addStyle(css);
  113. }
  114.  
  115.  
  116. setInterval(()=>{
  117. if(f("#users")){
  118. fa(".kickmenubtn").forEach(ele=>{
  119. f(".scrollElements").innerText.indexOf(ele.value)==-1?ele.remove():0
  120. })
  121. f("g")?f("g").remove():0;
  122. }
  123.  
  124. if(f("#background")&&!f(".userlist")){
  125. f("#background").innerHTML+=html
  126. setCSS()
  127. }
  128. },100)
  129.  
  130. }
  131. let m_s, a_i, m_a, m_z, m_b;
  132.  
  133. const f = x => document.querySelector(x),
  134. sendMessage = (inputSelector, mesaj) => {
  135. a_i = document.querySelector(inputSelector);
  136. m_a = a_i.value;
  137.  
  138. // Add a random invisible character from the list before the message
  139. const invisibleChars = ["\u200B", "\u200C", "\u200D", "\u2060", "\u180E", "\uFEFF"];
  140. const randomChar = invisibleChars[Math.floor(Math.random() * invisibleChars.length)];
  141. a_i.value = randomChar + mesaj + m_a;
  142.  
  143. m_z = new Event("input", { bubbles: !0 });
  144. m_z.simulated = !0;
  145. m_b = new Event("submit", { bubbles: !0 });
  146. m_b.simulated = !0;
  147. m_s = a_i._valueTracker;
  148. m_s && m_s.setValue(m_a);
  149. a_i.dispatchEvent(m_z);
  150. a_i.form.dispatchEvent(m_b);
  151. },
  152. rand = x => Math.floor(Math.random() * 1000000),
  153. GM_onMessage = (label, cb) => GM_addValueChangeListener(label, (_, __, data) => cb(...data)),
  154. GM_sendMessage = (label, ...data) => GM_setValue(label, data);
  155.  
  156. GM_onMessage('ucur', (atılacak, _) => {
  157. atılacak && document.querySelectorAll(".nick").forEach(nick => {
  158. nick.innerText === atılacak && (nick.click(), f(".ic-votekick")?.click())
  159. })
  160. });
  161. GM_onMessage('msg', (i, w, _) => {
  162. sendMessage(i, w)
  163. })
  164. GM_onMessage('skip', (_, __) => {
  165. let leButton = document.evaluate('//*[@id="notification"]/div/div[2]/div[1]/button', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
  166. if (leButton) {
  167. leButton.click();}
  168. let reportButton = document.evaluate('//*[@id="tools"]/div/div[1]/button[4]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
  169. if (reportButton) {
  170. reportButton.click();
  171. let confirmButton = document.evaluate('//*[@id="popUp"]/div/div/div[3]/button[2]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
  172. if (confirmButton) {
  173. confirmButton.click();
  174.  
  175. }
  176. }
  177. });
  178. GM_onMessage('report', (_, __) => {
  179. let reportButton = document.evaluate('//*[@id="canvas"]/button', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
  180. if (reportButton) {
  181. reportButton.click();
  182. let confirmButton = document.evaluate('//*[@id="popUp"]/div[1]/div/div[3]/button[2]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
  183. if (confirmButton) {
  184. confirmButton.click();
  185. }
  186. }
  187. });
  188. GM_onMessage('exit', (_, __) => {
  189. let exitButton = document.evaluate('//*[@id="exit"]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
  190. if (exitButton) {
  191. setTimeout(function () {
  192. exitButton.click();
  193. let confirmButton = document.evaluate('//*[@id="popUp"]/div[1]/div/div[3]/button[2]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
  194. if (confirmButton) {
  195. confirmButton.click();
  196. }
  197. }, 0); // Delay of 1 second
  198. }
  199. });
  200.  
  201. window.onload = function () {
  202.  
  203. const roomConsole = document.createElement("div");
  204. roomConsole.style = "color:#FFD700;margin-top:5px;";
  205. container.appendChild(roomConsole);
  206.  
  207. let currentGarticRoom;
  208.  
  209. // Function to check if the current page is a gartic.io room
  210. function getGarticRoom() {
  211. let garticRegex = /gartic\.io\/(.+)$/;
  212. let match = window.location.href.match(garticRegex);
  213. if (match && match[1]) {
  214. return match[1];
  215. }
  216. return null;
  217. }
  218.  
  219. // Function to update the current gartic.io room
  220. function updateCurrentRoom() {
  221. let room = getGarticRoom();
  222. if (room !== currentGarticRoom) {
  223. currentGarticRoom = room;
  224. roomConsole.innerText = `Current Room: ${currentGarticRoom || 'No room found'}`;
  225. }
  226. }
  227.  
  228. // Update the room initially
  229. updateCurrentRoom();
  230.  
  231. // Check for room changes every 5 seconds
  232. setInterval(updateCurrentRoom, 5000);
  233. };
  234.  
  235. function createInput(width, height) {
  236. const input = document.createElement("input");
  237. input.style = `width:${width};height:${height};border-radius:5px;padding:5px;border:1px solid #FFD700;background-color:#333333;color:#FFD700;`;
  238. return input;
  239. }
  240.  
  241. function createButton(width, height, text, clickHandler) {
  242. const button = document.createElement("button");
  243. button.style = `width:${width};height:${height};background-color:#FFD700;color:black;border-radius:5px;border:1px solid black;margin-top:5px;`;
  244. button.textContent = text;
  245. button.addEventListener("mousedown", clickHandler);
  246. return button;
  247. }

QingJ © 2025

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