import random import time import os from colorama import Fore, Style, init import pyfiglet # Initialize colorama init(autoreset=True) # Characters to rain down chars = "01ABCDEFGHIJKLMNOPQRSTUVWXYZ" # Special messages messages = [ "Mercy Bella Wangeci Theuri", "ACT ST Gertrude", "Keep Shining!", "Future Bright!" ] def matrix_rain(): try: while True: # Occasionally reveal ASCII art name if random.randint(1, 100) == 50: os.system("cls" if os.name == "nt" else "clear") ascii_art = pyfiglet.figlet_format("Mercy Bella") print(Fore.CYAN + ascii_art) time.sleep(2) os.system("cls" if os.name == "nt" else "clear") else: # Randomly choose a character or a message if random.randint(1, 50) == 25: text = random.choice(messages) color = Fore.CYAN else: text = random.choice(chars) color = random.choice([Fore.GREEN, Fore.YELLOW, Fore.RED]) print(color + text, end="", flush=True) # Random spacing if random.randint(1, 10) == 5: print() time.sleep(0.05) except KeyboardInterrupt: print(Style.RESET_ALL + "\nMatrix rain stopped.") if __name__ == "__main__": os.system("cls" if os.name == "nt" else "clear") matrix_rain()