Untitled
🧩 Syntax:
using System;
using System.IO;
using System.Media;
using System.Net;
using System.Threading;
class Program
{
static string pastebinRawLink = "https://pastes.io/raw/bxllgn9fcq"; // Replace YourRawLinkHere with your Pastebin raw link
static bool isLoggedIn = false;
static DateTime lastGenerationTime = DateTime.MinValue;
static Random random = new Random();
static void Main(string[] args)
{
Console.ForegroundColor = ConsoleColor.Blue;
// ASCII login system
Login();
// Play background music
PlayBackgroundMusic();
// Start the title changing timer
Timer titleTimer = new Timer(ChangeTitle, null, 0, 1000);
// Main loop
while (true)
{
Console.Clear(); // Clear the console for a clean interface
// Draw the box around the text
Console.WriteLine(" ");
Console.WriteLine(" ");
Console.WriteLine(" ");
Console.WriteLine(" ");
Console.WriteLine(" ");
Console.WriteLine(" ");
Console.WriteLine(" ");
Console.WriteLine(" ");
DrawCenteredBox("Select service to perform:");
DrawCenteredBox(" 1. Generate Account ");
DrawCenteredBox(" 2. Check Stock ");
DrawCenteredBox(" 3. Exit ");
string input = Console.ReadLine();
Console.Clear(); // Clear the console before processing user input
switch (input)
{
case "1":
GenerateAccount();
break;
case "2":
CheckStock();
break;
case "3":
Environment.Exit(0);
break;
default:
DrawCenteredBox("Invalid input. Please try again.");
break;
}
DrawCenteredBox("Press any key to continue...");
Console.ReadKey();
}
}
static void PlayBackgroundMusic()
{
try
{
// Using System.Media for playing background music
using (var player = new SoundPlayer("background_music.wav")) // Change file extension to .wav
{
player.PlayLooping();
}
}
catch (Exception ex)
{
DrawCenteredBox($"Error playing background music: {ex.Message}");
}
}
static void Login()
{
Console.Clear(); // Clear the console before displaying the login prompt
while (!isLoggedIn)
{
Console.Write("Username: ");
string username = Console.ReadLine();
Console.Write("Password: ");
string password = Console.ReadLine();
if (IsValidCredentials(username, password))
{
isLoggedIn = true;
DrawCenteredBox("Login successful!");
Thread.Sleep(1000); // Pause briefly to display success message
Console.Clear();
}
else
{
DrawCenteredBox("Invalid username or password. Please try again.");
Thread.Sleep(1000); // Pause briefly to display error message
Console.Clear();
}
}
}
static bool IsValidCredentials(string username, string password)
{
try
{
using (WebClient client = new WebClient())
{
string loginDetails = client.DownloadString(pastebinRawLink);
// Split the login details into lines
string[] lines = loginDetails.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
// Check if the provided username and password match any line in the login details
foreach (string line in lines)
{
string[] credentials = line.Split(':');
if (credentials.Length == 2 && credentials[0] == username && credentials[1] == password)
{
return true;
}
}
}
}
catch (Exception ex)
{
Console.WriteLine($"Failed to validate credentials: {ex.Message}");
}
return false;
}
static void GenerateAccount()
{
DrawCenteredBox("Generating account...");
Thread.Sleep(2000); // Simulate account generation
Console.Beep();
// Replace this URL with your desired Pastebin raw link for account details
string pastebinUrl = "https://pastes.io/raw/oqxbc3eidn";
using (WebClient client = new WebClient())
{
try
{
string accountDetails = client.DownloadString(pastebinUrl).Trim(); // Remove leading/trailing whitespace
string[] lines = accountDetails.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
// Generate a random index within the bounds of the array
int index = random.Next(0, lines.Length);
string account = lines[index];
// Draw the box around the text
Console.Clear();
Console.WriteLine(" ");
Console.WriteLine(" ");
Console.WriteLine(" ");
Console.WriteLine(" ");
Console.WriteLine(" ");
DrawCenteredBox("Generated account:");
DrawCenteredBox($"{PadCenter(account, Console.WindowWidth - 4)}");
// Update last generation time
lastGenerationTime = DateTime.Now;
}
catch (Exception ex)
{
DrawCenteredBox($"Failed to generate account: {ex.Message}");
}
}
}
static void CheckStock()
{
// Replace this URL with your desired Pastebin raw link for account details
string pastebinUrl = "https://pastes.io/raw/oqxbc3eidn";
using (WebClient client = new WebClient())
{
try
{
string accountDetails = client.DownloadString(pastebinUrl).Trim(); // Remove leading/trailing whitespace
string[] lines = accountDetails.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
// Draw the box around the text
Console.WriteLine(" ");
Console.WriteLine(" ");
Console.WriteLine(" ");
Console.WriteLine(" ");
Console.WriteLine(" ");
Console.WriteLine(" ");
DrawCenteredBox("Stock available:");
DrawCenteredBox($"│{PadCenter($"{lines.Length} accounts", Console.WindowWidth - 4)}");
}
catch (Exception ex)
{
DrawCenteredBox($"Failed to check stock: {ex.Message}");
}
}
}
static void ChangeTitle(object state)
{
// Alternate between titles every second
string[] titles = { "Void Gen", ".GG/VOIDGEN", "DEV: 1DA" };
int index = (DateTime.Now.Second % 2 == 0) ? 0 : 1;
Console.Title = titles[index];
}
static string PadCenter(string text, int width)
{
int spaces = width - text.Length;
int padLeft = spaces / 2 + text.Length;
return text.PadLeft(padLeft).PadRight(width);
}
static void DrawCenteredBox(string text)
{
int width = Console.WindowWidth;
int height = Console.WindowHeight;
int textLength = text.Length;
// Calculate the box position
int startX = (width - textLength - 2) / 2; // Subtracting 2 for the side brackets
// Top line
Console.Write(new string(' ', startX));
Console.WriteLine("┌" + new string('─', textLength) + "┐");
// Text line
Console.Write(new string(' ', startX));
Console.WriteLine("│" + PadCenter(text, textLength) + "│");
// Bottom line
Console.Write(new string(' ', startX));
Console.WriteLine("└" + new string('─', textLength) + "┘");
}
static void TypeWriterCredits(string text, int delay)
{
for (int i = 0; i < text.Length; i++)
{
Console.Write(text[i]);
Thread.Sleep(delay);
}
}
}clockwork
Member