@aceprogramer/

UnPython

Python

It is python. Ps. It is a Most Useful Program clone. I copied myself. LOLZ I hope this doesn't fail()

fork
loading
Files
  • main.py
  • convo.py
  • data.txt
  • ex1.aos
  • ex2.aos
  • Name.txt
  • tools.py
  • xyzsdfg1aos2fedsx3uilt*.aos
main.py
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
import time
from random import randint
from termcolor import cprint, colored
import convo as ac
import os
import tools as tl
#import sound

mode = []


def program():
    secFound = 0
    secLeft = 1

    def test():
        print("Success")

    def fail():
        for i in range(5):
            cprint("ERROR: Matrix PATH Courpted", "red")
            time.sleep(0.1)
            cprint("Fix: Matrix PATH", "red")
            time.sleep(0.1)
            cprint("Fix: 10%", "red")
            time.sleep(0.1)
            cprint("Fix: 20%", "red")
            time.sleep(0.1)
            cprint("Fix: 30%", "red")
            time.sleep(0.1)
            cprint("ERROR: Fix Failed", "red")
            time.sleep(0.1)
            cprint("Security Mesures Enabled", "red")
            time.sleep(0.1)
            cprint("Security: 100% power", "red")
            time.sleep(0.1)
            cprint("Security: 90% power", "red")
            time.sleep(0.1)
            cprint("Security: 0% power", "red")
            time.sleep(0.1)
            cprint("ERROR: Security Mesures Depleted", "red")
            time.sleep(0.1)
            cprint("//retry", "red")
            time.sleep(0.1)
        cprint("ERROR: Matrix PATH Broken. He has excaped.", "red")
        time.sleep(1)
        os.system('clear')
        eval("This Fails")

    def clear():
        os.system('clear')

    def math():
        x = input("Input math problem/")
        print(eval(x))

    def randomNumber():
        x = int(input("Input first number/"))
        y = int(input("Input last number/"))
        cprint(randint(x, y), 'cyan')

    def spam():
        x = input("Input text/")
        y = int(input("Input ammount/"))
        for i in range(y):
            print(x)

    def hack():
        dat2 = open('data.txt')
        lines = dat2.readlines()
        for line in lines:
            time.sleep(0.1)
            cprint(line, "green")

    def loop(x, y):
        for i in range(int(x)):
            try:
                eval(y)
            except:
                print(y)

    def run(x="ex1.aos"):
        if x == "egg":
            x="xyzsdfg1aos2fedsx3uilt*.aos"
        dat = open(x)
        lines = dat.readlines()
        for line in lines:
            time.sleep(0.1)
            eval(line)

    try:
        command = input("user/")
        #command exeptions

        if command == 'command/' or command == 'command':
            command = input("user/command/").lower()
            chopped = list(command)
            if "debug" in mode:
                print(chopped)
            if "(" in chopped or ")" in chopped:
                try:
                    eval(command)
                except NameError:
                    cprint("Python/command not found...", "red")
            elif command == 'test':
                test()
            elif command == 'math':
                math()
            elif command == 'spam':
                spam()
            elif command == 'clear':
                clear()
            elif command == 'fail':
                fail()
            elif command == 'random':
                randomNumber()
            elif command == "add name":
                n = input(
                    "Add your name to list of people who have played this?"
                ).lower()
                na = input("Type name.")

                if n == "yes" or n == "y":

                    name = open("Name.txt", "at")
                    nb = na + "\n"
                    nc = open('Name.txt').read().splitlines()

                    if na in nc:
                        cprint(
                            "{} has already been added to the list.".format(
                                na), "cyan")
                        addName = input("Add to list anyway?").lower()
                        if addName == "yes" or addName == "y":
                            cprint(
                                "{} has been added to the list of players.".
                                format(na), "cyan")
                            name.write(nb)
                            name.close()
                    else:
                        print("{} has been added to the list of players.".
                              format(na))
                        name.write(nb)
                        name.close()
        elif command == "?" or command == "help":
            cprint("main", "green")
            time.sleep(1)
            cprint("help or ?", "cyan")
            cprint("more_help", "cyan")
            cprint("add name", "cyan")
            time.sleep(1)
            cprint("command", "green")
            time.sleep(1)
            cprint("test", "cyan")
            cprint("math", "cyan")
            cprint("spam", "cyan")
            cprint("more_help", "cyan")
        elif command == "more_help":
            print(
                "Green text is a main key word. Cyan text are subcommands. Ex: To run test you would type 'command' hit enter then type 'test'. anything under main does not need to have main typed first. Also you can type egghunt for some fun"
            )
        elif command == "debug" or command == "~":
            mode.append("debug")
        elif command == "secret" or command == "egg":
            mode.append("secret")
            print("Secrets mode enabled.")
        elif command == "oof":
            mode.append("oof")
            print("OOF mode enabled.")
        elif command == "egghunt":
            print(
                "Find the {} eastereggs scattered through out the program. First you must unlock 'secret mode' with out it you will not be able to find the easter eggs."
                .format(secLeft))
            print()
            print(
                colored(
                    "Disclaimer: The eggs are not real eggs, they are secrets found in the program. They are not found in the source code and can be found with out looking in the source code. If you use the source code to cheat you have already failed this chalange.",
                    "red"))
        elif command == "LOLZ" and "secret" in mode:
            secFound + 1
            secLeft - 1
            print("You have found {} secrets, only {} left to find".format(
                secFound, secLeft))
        elif command in ac.players:
            pname = open('Name.txt').read().splitlines()
            print("These people have played this game!")
            print(pname)
        elif command == "hack":
            cprint("//Ace Of Spades Hacking Tool\\", "green")
            time.sleep(0.5)
            print()
            cprint("Starting up...", "cyan")
            time.sleep(0.3)
            cprint("10%", "cyan")
            time.sleep(0.8)
            cprint("25%", "cyan")
            time.sleep(1)
            cprint("90%", "cyan")
            time.sleep(0.6)
            cprint("Done!", "cyan")
            time.sleep(0.2)
            print()
            x = input("Begin? Y/N").lower()
            if x == "y":
                hack()
                cprint("Hack complete. Sending data.dat to AOS_Vault", "green")
            else:
                clear()
        elif command == "loop":
            x = input("How many times/")
            y = input("Loop what/")
            loop(x, y)

        else:
            eval(command)
    except NameError:
        cprint("Python/command not found...", "red")
    except SyntaxError:
        cprint("UnPython ran into a problem...", "red")
        time.sleep(1)
        cprint("UnPython restarting...", "red")
        time.sleep(2)
        cprint("Done", "red")
        time.sleep(0.5)
        print()
    if 'oof' in mode:
        print("OOF")
    program()


time.sleep(0.2)
print()
cprint("///Welcome to my WIP command style program. Have fun///", "green")
time.sleep(0.5)
print()
cprint("For help type 'help'", "cyan")
time.sleep(0.2)
print()
program()