Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Level Infinite Auto Check-in Script
- // Define common values
- const profile = {
- cookie: "lip_user_name=XXXXXX; lip_uid=XXXXXX; lip_channelid=XXX; lip_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX; lip_openid=XXXXXXXXXXXXXXXXXX; lip_adult_status=X;lip_expire_time=XXXXXXXXXXXX",
- alchemy_stars: true,
- accountName: "NAVIGATOR"
- };
- const discordNotify = false;
- const discordWebhook = "";
- // The above is the config. Edit as needed.
- //===================================================================================================================================================================
- // The following is the script. DO NOT modify.
- const urlGetPoints = 'https://pass.levelinfinite.com/api/rewards/proxy/lipass/Points/GetUserTotalPoints';
- const urlCheckIn = 'https://pass.levelinfinite.com/api/rewards/proxy/lipass/Points/DailyCheckIn';
- const dataCheckIn = {'task_id': '15'};
- const headers = {
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0',
- 'Accept': 'application/json, text/plain, */*',
- 'Accept-Language': 'en-US,en;q=0.5',
- 'Accept-Encoding': 'gzip, deflate, br',
- 'x-common-params': '{"game_id":"4","area_id":"global","source":"pc_web"}',
- 'x-language': 'en',
- 'Referer': 'https://pass.levelinfinite.com/points/',
- 'Cookie': profile.cookie,
- 'Sec-Fetch-Dest': 'empty',
- 'Sec-Fetch-Mode': 'cors',
- 'Sec-Fetch-Site': 'same-origin',
- 'Pragma': 'no-cache',
- 'Cache-Control': 'no-cache',
- 'TE': 'trailers'
- };
- // Discord integration
- const postWebhook = (data) => {
- Logger.log('Starting postWebhook function');
- let payload = {
- 'username': 'Level Infinite Auto Check-in',
- 'avatar_url': 'https://i.imgur.com/hib7k6B.png',
- 'content': data
- };
- const options = {
- 'method': 'post',
- 'contentType': 'application/json',
- 'payload': JSON.stringify(payload)
- };
- UrlFetchApp.fetch(discordWebhook, options);
- Logger.log('Finished postWebhook function');
- }
- // Auto Check-in
- const main = () => {
- let levelinfResp = 'shrimp';
- const responseCheckIn = UrlFetchApp.fetch(urlCheckIn, {
- 'method': 'post',
- 'headers': headers,
- 'payload': JSON.stringify(dataCheckIn)
- });
- if (responseCheckIn.getResponseCode() == 200) {
- const responseData = JSON.parse(responseCheckIn.getContentText());
- if (responseData['msg'] == 'ok') {
- levelinfResp = 'Check-in success for ' + profile.accountName;
- } else {
- levelinfResp = 'Check-in failed for ' + profile.accountName + ': ' + responseData['msg'];
- }
- } else {
- levelinfResp = 'Check-in failed. Status code: ' + responseCheckIn.getResponseCode();
- }
- // Get Total Points
- const responseGetPoints = UrlFetchApp.fetch(urlGetPoints, {
- 'method': 'get',
- 'headers': headers
- });
- if (responseGetPoints.getResponseCode() == 200) {
- const dataGetPoints = JSON.parse(responseGetPoints.getContentText());
- const totalPoints = dataGetPoints['data']['total_points'];
- levelinfResp += '\nCurrent Points: ' + totalPoints;
- } else {
- levelinfResp += '\nError: ' + responseGetPoints.getResponseCode();
- }
- // Print Response
- if (discordNotify && discordWebhook) {
- postWebhook(levelinfResp);
- } else {
- Logger.log(levelinfResp);
- }
- Logger.log('Finished main function');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement