-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
141 lines (105 loc) · 4.21 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
const readline = require('readline');
const axios = require('axios');
const client = require('discord.js-self-v21');
function centerText(text, width, height) {
const lines = text.trim().split('\n');
const maxWidth = lines.reduce((max, line) => Math.max(max, line.trim().length), 0);
const paddingX = Math.max(0, Math.floor((width - maxWidth) / 2));
const paddingY = Math.max(0, Math.floor((height - lines.length) / 6));
return '\n'.repeat(paddingY) + lines.map(line => ' '.repeat(paddingX) + line.trim()).join('\n');
}
function changeTerminalName(newName) {
process.title = newName;
}
changeTerminalName("exarc SB † | made by trixo");
async function clearAndShowLoadingAnimation(task, message = 'Updating to the latest API handlers...') {
clearTerminal();
// Show loading animation
const simulateAndUpdate = showLoadingAnimation(async () => {
// Simulate an asynchronous task (e.g., API request)
await new Promise((resolve) => setTimeout(resolve, 30000));
}, message);
// Execute the loading animation
await simulateAndUpdate();
}
function clearTerminal() {
// ANSI escape code to clear the terminal
process.stdout.write('\x1B[2J\x1B[H');
}
function showLoadingAnimation(task, message = 'Updating to the latest API handlers dont close...') {
let i = 0;
const frames = ['-', '\\', '|', '/'];
const loadingInterval = setInterval(() => {
const frame = frames[i = ++i % frames.length];
readline.cursorTo(process.stdout, 0);
process.stdout.write(`${message}${frame}`);
}, 100);
const hideLoadingAnimation = () => {
clearInterval(loadingInterval);
readline.cursorTo(process.stdout, 0);
process.stdout.clearLine();
};
const simulateAsyncTask = async () => {
try {
await task();
hideLoadingAnimation();
console.log('\nTask completed...');
} catch (error) {
console.error('Error:', error.message);
hideLoadingAnimation();
}
};
return simulateAsyncTask;
}
function askQuestions(question, callback) {
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
rl.question(question, function (userInput) {
rl.close();
callback(userInput);
});
}
function displayMenu() {
return (
" \x1b[31mSelect an option:\n" + // \x1b[31m sets the color to red
" 1. Self V1\n" +
" 2. Self V2\n" +
" 3. Vanity sniper\n" +
" 4. Server Nuker\n" +
" 5. Username checker and claimer \n" +
" 6. Mass DM Friends\n" +
" 7. Webhook Spammer\n" +
" 8. Credits\x1b[0m" // Reset color to default
);
}
const questions = [
"Enter your token: ",
"Enter your user ID: ",
"Do you want to use a custom RPC? (Y/N): "
];
async function runScript() {
// First, show the loading animation
await clearAndShowLoadingAnimation();
// Get the size of the terminal
const terminalWidth = process.stdout.columns || 80; // Default to 80 if columns is undefined
const terminalHeight = process.stdout.rows || 20; // Default to 24 if rows is undefined
// Updated ASCII art (ensure it fits within the terminal dimensions)
const asciiArt = `
███████ ██ ██ █████ ██████ ██████
██ ██ ██ ██ ██ ██ ██ ██
█████ ███ ███████ ██████ ██
██ ██ ██ ██ ██ ██ ██ ██
███████ ██ ██ ██ ██ ██ ██ ██████
`;
clearTerminal();
console.log('\x1b[31m%s\x1b[0m', centerText(asciiArt, terminalWidth, terminalHeight));
console.log(displayMenu());
// Keep the script running for 10 seconds (you can adjust the duration)
setTimeout(() => {
process.exit(100000); // Exit after 10 seconds
}, 100000); // 10 seconds delay
}
// Start the script
runScript();