Remove Cooldown | 2026

Gartic Instant Room Join, Anti‑AFK, No Kick Limit

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name             Remove Cooldown | 2026
// @namespace        https://github.com/GameSketchers
// @version          1.0
// @description      Gartic Instant Room Join, Anti‑AFK, No Kick Limit
// @author           Qwyua
// @match            *://gartic.io/*
// @run-at           document-body
// @grant            GM_setValue
// @grant            GM_getValue
// @grant            unsafeWindow
// @license          MIT
// ==/UserScript==

/gartic\.io$/.test(location.host)&&(()=>{
    sessionStorage.getItem('pastel')&&(alert('Pastel found! Disable Remove Cooldown Script'),(()=>{throw 0})());
    const [onElementAdded2,writePage]=[
        (s,c,m=1)=>{const f=()=>{document.querySelectorAll(s).forEach(c);o.observe(document.body,{childList:1,subtree:1})},o=new MutationObserver(r=>{for(let x of r)for(let n of x.addedNodes)if(n.nodeType==1&&(n.matches(s)||n.querySelector(s))){n.matches(s)&&c(n);n.querySelectorAll(s).forEach(c);if(!m)return o.disconnect()}});document.body?f():new MutationObserver((_,b)=>document.body&&(b.disconnect(),f())).observe(document.documentElement,{childList:1})},
        (t,m,d)=>{const id='__c',e=document.getElementById(id);if(e){e.textContent=t+'';return e}const bg=m==='dark'?'#000':'#fff',fg=m==='dark'?'#fff':'#000',s='position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:'+bg+';color:'+fg+';z-index:9999;font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:600;font-size:clamp(18px,4vw,48px);user-select:none;margin:0',mk=b=>{const el=document.createElement('div');el.id=id;el.style.cssText=s;el.textContent=t+'';b.appendChild(el);return el};if(d){document.documentElement.innerHTML='<head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"></head><body style=margin:0></body>';if(document.body)return mk(document.body);onElementAdded2('body',b=>mk(b));return}return document.body?mk(document.body):onElementAdded2('body',b=>mk(b))}
    ],TTL=27e4
    ;(o=>o[Object.keys(o).find(k=>location.href.includes(k))]?.())({
        gartic:()=>{
            new class{
                constructor(){
                    //localStorage.debug = '*'
                    //onElementAdded("button.ic-yes",e=>e.click())
                    const w=unsafeWindow
                    this._owner=w._owner||(w._owner={})
                    Object.defineProperty(this._owner,"self",{value:this,enumerable:0,configurable:1,writable:1})
                    const T=typeof unsafeWindow!=='undefined'?unsafeWindow:window,s={render:(...a)=>(a[1]?.callback||typeof a[1]==='function'&&a[1])?.('turnstile'),remove:()=>{}},l=()=>{try{Object.defineProperty(T,'turnstile',{value:s,writable:0,configurable:0,enumerable:1});return}catch(e){try{const d=Object.getOwnPropertyDescriptor(T,'turnstile');d?.configurable&&Object.defineProperty(T,'turnstile',{value:s,writable:0,configurable:0,enumerable:1});return}catch(e){try{Object.defineProperty(T,'turnstile',{configurable:1,enumerable:1,get:()=>s,set:()=>{throw 0}});return}catch(e){}}}};l(),setTimeout(l,0)
                    onElementAdded2("div#content",e=>{let d=[50,100,200,400],i=0,f=()=>{const k=Object.getOwnPropertyNames(e).find(x=>x.startsWith("__react")),r=k&&e[k];if(r)return this._owner._play=r.pendingProps.children[1]._owner.stateNode._play,eval(`const p=_owner._play;p.start=(...a)=>{p._data=CACHE_DATA;p._room=a[1];p._data.user||=window.CACHE_DATA.user;p._getServer();p._setPopup(10)};const j=p._join;p._join=(...a)=>(console.log(a),a[4]?.forEach?.(x=>x?.nick&&(x.nick=_owner.self.escapeInvisibles(x.nick))),j.apply(p,a));p._connect=()=>{const t=CACHE_DATA,e=t.user||CACHE_DATA.user,c=e.logado?0:e.avatar;p._reconnections=0;p._viewer?p._socket.emit(12,{v:2e4,platform:1,sala:p._room?.substr(2)}):p._room?(p._room===!0?p._socket.emit("2",{v:2e4,token:_owner.self.getToken(),nick:e.nome,avatar:c,platform:1,idioma:e.language,tipo:t.subject,limite:t.players,meta:t.points,visivel:t.visible,criado:t.created}):p._socket.emit("3",{v:2e4,token:_owner.self.getToken(),nick:e.nome,avatar:c,platform:1,sala:p._room.substr(2)})):p._socket.emit("1",{v:2e4,token:_owner.self.getToken(),nick:e.nome,avatar:c,platform:1,idioma:e.language})/*,p._ping()*/;p._socket.removeAllListeners("connect")}`);d[i]?setTimeout(f,d[i++]):0};f()},0)
                    onElementAdded2("div#screenRoom",e=>{let g,w=n=>n&&!g&&(n.tag==1&&(g=this._owner._game=n.stateNode?.props?.children?.[0]?._owner?.stateNode?._game)&&this.joinedRoom(g),!g&&w(n.child));for(let k in e)/^__r/.test(k)&&w(e[k])},1)
                }
                gT=()=>{let c="Zx1Yp8Qr7Wv6Ut5Os4Nm3Lk2Jh0GfAeBdCvHqIjKlMnOpQrStUvWxYz0123456789_-.",r=n=>Array.from({length:n},()=>c[Math.random()*c.length|0]).join(""),s=3+Math.random()*3|0;return"1."+Array.from({length:s},()=>r(80+Math.random()*120|0)).join(".")}
                antiAFK=()=>{const o=this._owner,g=o?._game,e=g?._events;if(!e)return;e.avisoInativo=()=>{g._ativo=Date.now();g._socket.io.engine.transport.ws.send(`42[42,${g._codigo}]`)}}
                escapeInvisibles=s=>s.replace(/\p{C}/gu,c=>`\\u${c.codePointAt(0).toString(16).toUpperCase().padStart(4,'0')}`)
                joinedRoom=()=>{
                    addEventListener("keydown",e=>e.code==="Escape"&&(this._owner?._game?.exit(),delete this._owner._game),{passive:1,once:1})
                    Object.defineProperty(this._owner._game,'_tempoVotekick',{get:()=>0,set:()=>{}})
                    this.antiAFK()
                }
                getToken=()=>{
                    const now=Date.now()
                    let tokens=GM_getValue("Tokens")||[]
                    let valid=tokens.filter(t=>!t.used && now-t.time<this.TTL)
                    if(!valid.length) return this.gT()
                    let tok=valid.reduce((a,b)=>(this.TTL-(now-b.time))<(this.TTL-(now-a.time))?b:a)
                    tok.used=1
                    GM_setValue("Tokens",tokens)
                    return tok.token
                }
            }
        },
        token:()=>{
            const w=unsafeWindow
            const upd=n=>writePage(`Token Genereting... (${n})`,'dark',false)
            const run=()=>setTimeout(()=>w.turnstile.render('#cf-turnstile',{
                sitekey:'0x4AAAAAABBPKaIbNwnPEfSo',
                size:'invisible',
                callback:t=>{
                    const now=Date.now()
                    const all=GM_getValue('Tokens')||[]
                    const clean=all.filter(x=>now-x.time<TTL)
                    clean.push({token:t,time:now})
                    GM_setValue('Tokens',clean)
                    upd(clean.length)
                    setTimeout(()=>{try{w.turnstile.reset()}catch{}},1e3+Math.random()*1e3)
                }
            }),1e3)
            upd((GM_getValue('Tokens')||[]).filter(x=>Date.now()-x.time<TTL).length)
            run()
        }
    });
})();