Fiu
// ==UserScript==
// @name _Fiu Gartic.io Remove Cooldown 2026 (Fix)
// @name:en _Fiu Gartic.io Remove Cooldown 2026 (Fix)
// @name:tr Fiu Gartic.io Bekleme Süresi Kaldırma 2026 (Düzeltme)
// @name:es Fiu Gartic.io Eliminar Cooldown 2026 (Corrección)
// @name:pt Fiu Gartic.io Remover Cooldown 2026 (Correção)
// @name:az Fiu Gartic.io Gözləmə Müddətini Sil 2026 (Düzəliş)
// @name:vi Fiu Gartic.io Xóa Cooldown 2026 (Sửa lỗi)
// @name:ru Fiu Gartic.io Удалить Cooldown 2026 (Исправление)
// @namespace fiugarticiofix
// @version 2.0
// @description Fiu
// @description:en Fiu
// @description:tr Fiu
// @description:es Fiu
// @description:pt Fiu
// @description:az Fiu
// @description:vi Fiu
// @description:ru Fiu
// @author Fiu & Qwyua
// @icon data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🕒</text></svg>
// @match *://gartic.io/*
// @match https://gartic.io/
// @match gartic.io/*
// @run-at document-body
// @grant GM_setValue
// @grant GM_getValue
// @grant unsafeWindow
// @license MIT
// ==/UserScript==
/gartic\.io$/.test(location.host)&&(()=>{
const onElementAdded2 = (s,c,m=1)=>{
const f=()=>{document.querySelectorAll(s).forEach(c);o.observe(document.body,{childList:1,subtree:1})};
const 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})
};
const TTL=27e4;
const MAX_STORED_TOKENS=4;
const FARM_RESET_MIN_MS=14e3;
const FARM_RESET_MAX_MS=26e3;
const TURNSTILE_WAIT_START_MS=400;
const TURNSTILE_WAIT_MAX_MS=12e3;
const mode = location.search.includes('farms') ? 'token' : 'gartic';
const app = {
gartic: () => {
onElementAdded2("body", b => {
if(!document.getElementById("token_farmer")) {
const frm = document.createElement("iframe");
frm.id = "token_farmer";
frm.src = "/?farms=1";
frm.style.display = "none";
b.appendChild(frm);
}
}, 0);
new class{
constructor(){
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)=>{
return (a[1]?.callback||typeof a[1]==='function'&&a[1])?.('turnstile')
},remove:()=>{}};
const 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"));
const r=k&&e[k];
if(r){
try {
this._owner._play=r.pendingProps.children[1]._owner.stateNode._play;
const injectCode = `
const p=_owner._play;
p._lastConnectTry = 0;
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)=>{
a[4]?.forEach?.(x=>x?.nick&&(x.nick=_owner.self.escapeInvisibles(x.nick)));
return j.apply(p,a)
};
p._connect=()=>{
const now=Date.now();
const t=CACHE_DATA,e=t.user||CACHE_DATA.user,c=e.logado?0:e.avatar;
p._reconnections=0;
let token=null;
if(!p._viewer){
token=_owner.self.getToken();
if(!token){
setTimeout(p._connect,600);
return;
}
}
if(now-p._lastConnectTry<2e3){
setTimeout(p._connect,2e3-(now-p._lastConnectTry));
return;
}
p._lastConnectTry=now;
if(p._viewer){
p._socket.emit(12,{v:2e4,platform:0,sala:p._room?.substr(2)});
} else if(p._room){
if(p._room===!0){
p._socket.emit("2",{v:2e4,token:token,nick:e.nome,avatar:c,platform:0,idioma:e.language,tipo:t.subject,limite:t.players,meta:t.points,visivel:t.visible,criado:t.created});
} else {
p._socket.emit("3",{v:2e4,token:token,nick:e.nome,avatar:c,platform:0,sala:p._room.substr(2)});
}
} else {
p._socket.emit("1",{v:2e4,token:token,nick:e.nome,avatar:c,platform:0,idioma:e.language});
}
p._socket.removeAllListeners("connect");
};
`;
eval(injectCode);
return;
} catch(err) {}
}
if(d[i]) setTimeout(f,d[i++]);
};
f()
},0);
onElementAdded2("div#screenRoom",e=>{
let g,w=n=>{
if(n&&!g){
if(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) if(/^__r/.test(k)) w(e[k]);
},1)
}
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=>{
return s.replace(/\p{C}/gu,c=>`\\u${c.codePointAt(0).toString(16).toUpperCase().padStart(4,'0')}`)
}
joinedRoom=()=>{
addEventListener("keydown",e=>{
if(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 raw=GM_getValue("Tokens")||[]
if(!Array.isArray(raw)) raw=[]
let tokens=raw.filter(t=>t&&t.token&&typeof t.token==="string"&&now-t.time<TTL)
let valid=tokens.filter(t=>!t.used)
if(!valid.length) return null
let tok=valid.reduce((a,b)=>(TTL-(now-b.time))<(TTL-(now-a.time))?b:a)
tok.used=1
GM_setValue("Tokens",tokens)
return tok.token
}
}
},
token: () => {
const w = unsafeWindow;
let farmStarted = 0;
onElementAdded2("body", b => b.style.opacity = '0');
const scheduleReset = () => {
setTimeout(() => {
try { w.turnstile?.reset?.(); } catch(e) {}
}, FARM_RESET_MIN_MS + Math.random() * (FARM_RESET_MAX_MS - FARM_RESET_MIN_MS));
};
const run = (attempt = 0) => {
if (farmStarted) return;
if (!w.turnstile) {
const exp = Math.min(attempt, 22);
const delay = Math.min(TURNSTILE_WAIT_START_MS * Math.pow(1.28, exp), TURNSTILE_WAIT_MAX_MS);
return setTimeout(() => run(attempt + 1), delay);
}
farmStarted = 1;
const tkDiv = document.createElement('div');
document.body.appendChild(tkDiv);
try {
w.turnstile.render(tkDiv, {
sitekey: '0x4AAAAAABBPKaIbNwnPEfSo',
size: 'invisible',
callback: t => {
if (!t || typeof t !== 'string' || t.length < 40) {
scheduleReset();
return;
}
const now = Date.now();
const all = GM_getValue('Tokens') || [];
const base = Array.isArray(all) ? all : [];
let clean = base.filter(x => x && x.token && now - x.time < TTL && !x.used);
clean.push({ token: t, time: now, used: false });
if (clean.length > MAX_STORED_TOKENS) clean = clean.slice(-MAX_STORED_TOKENS);
GM_setValue('Tokens', clean);
scheduleReset();
}
});
} catch(e) {
farmStarted = 0;
setTimeout(() => run(0), 2500);
}
};
run();
}
};
app[mode]();
})();