Text Content
import requests
import random
import time
import os
import threading
# Settings
NAMES = 10
FILE = "valid.txt"
BIRTHDAY = "1999-04-20"
WEBHOOK_URL = "https://discord.com/api/webhooks/1527005396181585971/KDcaLJnM-18HlUkCTY3sJYZV1BPJfCEDpKUtTblOYNyxfoTw0onumHq8882QK0vc2nfu"
THREADS = 26 # fixed at 26
valid_usernames = []
taken_count = 0
error_count = 0
# Sequential counter variables
TOTAL = 26 ** 5
current_index = random.randint(0, TOTAL - 1) # random start
attempts_done = 0
lock = threading.Lock()
def clear():
os.system("cls" if os.name == "nt" else "clear")
def redraw():
clear()
print("=== VALID USERNAMES ===\n")
for username in valid_usernames:
print(username)
print("\n=======================\n")
print(f"taken : {taken_count}")
print(f"valid : {len(valid_usernames)}")
print(f"error : {error_count}")
print(f"threads : {THREADS}")
def int_to_username(n):
chars = []
for _ in range(5):
chars.append(chr(ord('a') + (n % 26)))
n //= 26
return ''.join(reversed(chars))
def check_username(username):
url = (
f"https://auth.roblox.com/v1/usernames/validate"
f"?request.username={username}&request.birthday={BIRTHDAY}"
)
response = requests.get(url, timeout=5)
response.raise_for_status()
return response.json().get("code")
def send_webhook(username):
"""Send found username to Discord webhook."""
try:
payload = {"content": f"naslo je username : {username}"}
requests.post(WEBHOOK_URL, json=payload, timeout=5)
except Exception:
pass # silently ignore webhook errors so the script keeps running
def worker():
global taken_count, error_count, current_index, attempts_done
while True:
with lock:
if len(valid_usernames) >= NAMES or attempts_done >= TOTAL:
return
idx = current_index
current_index = (current_index + 1) % TOTAL
attempts_done += 1
username = int_to_username(idx)
try:
code = check_username(username)
with lock:
if len(valid_usernames) >= NAMES:
return
if code == 0:
valid_usernames.append(username)
with open(FILE, "a") as f:
f.write(username + "\n")
send_webhook(username) # <-- notify Discord
else:
taken_count += 1
redraw()
except requests.exceptions.RequestException:
with lock:
error_count += 1
redraw()
except Exception:
with lock:
error_count += 1
redraw()
time.sleep(0.05)
redraw()
threads = []
for _ in range(THREADS):
t = threading.Thread(target=worker, daemon=True)
t.start()
threads.append(t)
try:
for t in threads:
t.join()
except KeyboardInterrupt:
print("\nStopped.")
print("\nFinished!")