Major update 2 / login

This commit is contained in:
2026-04-26 16:33:04 +03:00
parent 5bff9a287d
commit e8fd35105f
15 changed files with 999 additions and 96 deletions

View File

@@ -19,6 +19,17 @@
const MAX_TRIES = 3;
const RETRY_BASE = 3000; // 3 s, then 6 s
// ----------------------------------------------------------------
// CLAN_KEY: Set this to your clan's unique key.
// Leave it empty ('') and the bot will refuse to run.
// ----------------------------------------------------------------
const CLAN_KEY = ''; // <-- paste your clan key here
if (!CLAN_KEY || CLAN_KEY.trim() === '') {
console.error('[Loader] ❌ CLAN_KEY is not set. Bot will not start. Contact your admin for the key.');
return; // stop everything
}
function loadBot(attempt) {
attempt = attempt || 1;
console.log(`[Loader] Fetching bot code (attempt ${attempt}/${MAX_TRIES})...`);
@@ -26,10 +37,14 @@
GM_xmlhttpRequest({
method: 'GET',
url: `${BASE_URL}/api/bot?t=${Date.now()}`,
headers: {
'X-Clan-Key': CLAN_KEY
},
onload: function(response) {
if (response.status === 200) {
console.log('[Loader] Bot code downloaded. Executing...');
try {
window.__GRC_CLAN_KEY = CLAN_KEY; // make key available inside the bot's scope
eval(response.responseText);
} catch (e) {
console.error('[Loader] Execution error:', e);