import subprocess
import winreg 
import shutil
import os
import webbrowser
import ctypes
import platform
import random
print("type'run code' to run your code and show code to show your code")
outs = 1
user_name = ""  # Initialize user_name to an empty string
choice = input("Enter choice: ").strip().lower()
print ("This script has two functions and is meant to make running oython scripts from the terminal easier and can also show your decompiled code (this script is still in beta and is just part of a big project)")
print ("to run the code press run code and to show your decompiled code type showcode")
if choice == "run code":
    print("This script runs code in a dedicated terminal by the user. However, rather than a file, you just copy and paste your code. Never run malicious or dangerous scripts; we are not responsible for what you do.")
    
    print("Please paste your Python code below and type 'done' when finished:")
    code_lines = []
    while True:
        line = input()
        if line.strip().lower() == 'done':
            break
        code_lines.append(line)
    
    code = "\n".join(code_lines)  # Join all lines into a single string
    
    try:
        exec(code)
        print("Code executed successfully!")
    except Exception as e:
        print(f"Parts of the code don't work as so they: {e}")
    
    user_name = input("debug ")
    print("Execution complete.")
elif choice == "show code":
    if user_name:
        print("doing,", user_name + "!")
    else:
        print("No action was taken. Please run code first.")
else:
    print("Invalid choice. Please enter 'run code' or 'show code'.")
    #thisisadevelopertag
    #developers
    #haha
    #freethewholeentireinternetfromthis
    print ("this script is by scriptcobra.com")
input("Press Enter to exit...")  # Used to make the script not end immediately
