SHOW:
|
|
- or go back to the newest paste.
1 | const playCount = 1; | |
2 | const authToken = "YOUR_TOKEN"; | |
3 | ||
4 | const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms)); | |
5 | ||
6 | const headers = { | |
7 | 'accept': 'application/json, text/plain, */*', | |
8 | 'accept-language': 'en-US,en;q=0.9', | |
9 | 'authorization': authToken, | |
10 | 'origin': 'https://telegram.blum.codes', | |
11 | 'priority': 'u=1, i', | |
12 | 'sec-ch-ua': '"Chromium";v="128", "Not;A=Brand";v="24", "Microsoft Edge";v="128", "Microsoft Edge WebView2";v="128"', | |
13 | 'sec-ch-ua-mobile': '?0', | |
14 | 'sec-ch-ua-platform': '"Windows"', | |
15 | 'sec-fetch-dest': 'empty', | |
16 | 'sec-fetch-mode': 'cors', | |
17 | 'sec-fetch-site': 'same-site', | |
18 | 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0' | |
19 | }; | |
20 | ||
21 | async function playAndClaimGame() { | |
22 | for (let i = 0; i < playCount; i++) { | |
23 | console.log(`[blum-bot] Starting game #${i}...`); | |
24 | ||
25 | const points = Math.floor(Math.random() * 41) + 80; | |
26 | const playResponse = await fetch('https://game-domain.blum.codes/api/v1/game/play', { | |
27 | method: 'POST', | |
28 | headers, | |
29 | }); | |
30 | ||
31 | const { gameId } = await playResponse.json(); | |
32 | console.log(`[blum-bot] Game ID: ${gameId}`); | |
33 | ||
34 | ||
35 | const sleepDuration = (Math.floor(Math.random() * 11) + 50) * 1000; | |
36 | console.log(`[blum-bot] Sleeping for ${sleepDuration / 1000} seconds`); | |
37 | await sleep(sleepDuration); | |
38 | ||
39 | headers['content-type'] = 'application/json'; | |
40 | ||
41 | const claimResponse = await fetch('https://game-domain.blum.codes/api/v1/game/claim', { | |
42 | method: 'POST', | |
43 | headers, | |
44 | body: JSON.stringify({ gameId, points }) | |
45 | }); | |
46 | ||
47 | const claimStatus = await claimResponse.text(); | |
48 | console.log(`[blum-bot] Game status: ${claimStatus} | Points: ${points}`); | |
49 | ||
50 | const additionalSleepDuration = (Math.floor(Math.random() * 6) + 15) * 1000; | |
51 | console.log(`[blum-bot] Sleeping for ${additionalSleepDuration / 1000} seconds`); | |
52 | await sleep(additionalSleepDuration); | |
53 | } | |
54 | console.log("[blum-bot] Execution completed"); | |
55 | } | |
56 | ||
57 | (async () => { | |
58 | await playAndClaimGame(); | |
59 | })(); | |
60 |