-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsad.py
514 lines (334 loc) · 32.1 KB
/
sad.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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# ████████ ██████
# █░░░░░░░░██_██░░░░░░█
# █░░░░░░░░░░░█░░░░░░░░░█
# █░░░░░░░███░░░█░░░░░░░░░█
# █░░░░███░░░███░█░░░████░█
# █░░░██░░░░░░░░███░██░░░░██
# █░░░░░░░░░░░░░░░░░█░░░░░░░░███
# █░░░░░░░░░░░░░██████░░░░░████░░█
# █░░░░░░░░░█████░░░████░░██░░██░░█
# ██░░░░░░░███░░░░░░░░░░█░░░░░░░░███
# █░░░░░░░░░░░░░░█████████░░█████████
# █░░░░░░░░░░█████ ████ ████ █████ █
# █░░░░░░░░░░█ █ ███ █ ███ █ █
#█░░░░░░░░░░░░█ ████ ████ ██ ████
#░░░░░░░░░░░░░█████████░░░████████░░░█
#░░░░░░░░░░░░░░░░█░░░░░█░░░░░░░░░░░░█
#░░░░░░░░░░░░░░░░░░░░██░░░░█░░░░░░██
#░░░░░░░░░░░░░░░░░░██░░░░░░░███████
#░░░░░░░░░░░░░░░░██░░░░░░░░░░█░░░░░█ _____ _____ _____ _____
#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ /\ \ /\ \ /\ \ /\ \
#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ :: /::\ \ /::\ \ /::\____\ /::\____\
#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ /::::\ \ /::::\ \ ::: :: ::: ::/ / : :: ::/ /
#░░░░░░░░░░░█████████░░░░░░░░░░░░░░██ /::::::\ \ /::::::\ \ ::: : :::/ / /:::/ /
#░░░░░░░░░░█▒▒▒▒▒▒▒▒███████████████▒▒█ /:::/\:::\ \ :: ::::/\:::\ \ /:::/ / /:::/ /
#░░░░░░░░░█▒▒███████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█ /:::/__\:::\ \ /:::/__\:::\ \ /:::/ / :::: :/____/
#░░░░░░░░░█▒▒▒█▓▓▓▓██████████████████ /::::\ \:::\ \ /::::\ \:::\ \ /:::/ / /::::\ \
#░░░░░░░░░██▒▒█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█ /::::::\ \:::\ \ /::::::\ \:::\ \ /: / _____ /::::::\ \ _____
#░░░░░░░░░░█▒▒█▓█████████████████ ████ /:::/\:::\ \:::\ ___\ /:::/\:::\ \:::\____\ /:::/____/ /\ \ /:::/\:::\ \ /\ \
#░░░░░░░░░░█▒▒██▓▓▒▓▒▓▒▓▒▒▒▒▒▒▒▒▓█▓▒▒▒█ /:::/__\:::\ \:::| | /:::/ \:::\ \:::| | :::| / /::\____\ ::::::: :::/ : :::\ /::\____\
#░░░░░░░░░█▒▒████████▓▒███▓██▒▒▒▒▒▒▒▒▒█ : \:::\ \:::\ /:::|____| \::/ |::::\ /:::|____| : :: :|____\ /:::/ / \::/ \:::\: ::::/ /
#░░░░░░░░░█▒▒▒▒▒▒▒▒▒█████████████▓█▓██ \:::\ \:::\/:::/ / \/____|:::::\/:::/ / \:::\ \ /:::/ / \/____/: :::\/:::/ /
#░░░░░░░░░░████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█ \:::\ \::::::/ / |:::::::::/ / \:::\ :: : ::/ / : : : : :::::::/ /
#░░░░░░░░░░░░░░░░░░██████████████████ \:::\ \::::/ / : : |::|\::::/ / :: \:::\ /:::/ / :::: \:: /
#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ :: \:::\ /:::/ / :: ::| \::/____/ \:::\__/:::/ / /:::/ /
#██░░░░░░░░░░░░░░░░░░░░░░░░░░░██ \:::\/:::/ / |::| ~| \::::::::/ / : :::/ /
#▓██░░░░░░░░░░░░░░░░░░░░░░░░██ \::::::/ / |::| | \::::::/ / /:::/ /
#▓▓▓███░░░░░░░░░░░░░░░░░░░░█ \::::/ / \::| | \::::/ / ::: : /:::/ /
#▓▓▓▓▓▓███░░░░░░░░░░░░░░░██ : \::/____/ : \:| | : :::: \::/____/ \::/ /
#▓▓▓▓▓▓▓▓▓███████████████▓▓█ ⠋ \|___| ⠩ \/____/
#▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██
#▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█ | | |
#▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█ | |
#______________________________ | | | |
#___________________________
#_ ______ _____ _________
# / / | | | | | | | | | | | | |
# \ | | | | | | | | | | | | | | |
# | | |
# | | | | | | | | | | |
# | | |
# | | | | | | | | | | | | | |
# | | | |
# | | | | | | | | | | | | | | | | |
# | | | | | | | | | | | | | | | |
# | | | | | | | | | | |
# | | | | | | | | | | | | | | | | | |
# | |
# | | | | | | | | | | | | | | | | |
# | | | | | | | | | | | | | | |
# | | PRESENTATION | | | | | | | | | | | |
# | | | | | | | | | | |
# | | | | | | | | | | | | | | |
# | This little tool will remind you purpose of your life
# | | | | | | | | | | | | | |
# | | Anyway | | | | | | | | | | | | |
# | | have | | | | | | | | | | | | | |
# | FUN | | | | | | | | | | | | | |
# =)
#
# | or | | | | | | | | | | |
# | | DIE ! ! | | | | | | | | | | |# | | | |
#
# ! | | | | | | | | | | | |
# | | !
# | | | | | | | | | | |
# | ! |
# | | | | | | | | | | | | | |
# | | | |
# | | | | | | | | | | | | | | | | | |
# | | | | | | | | | | | | | | |
# | | | | | | | | | | |
# | | | | | | | | | | | | | | | | |
# | |
# | | | | | | | | | | | | | | | |
#____ _ ____ _ _ ____ _ _ ___ ____ _ ____
#|__| | |___ \/ |__| |\ | | \ |__/ | |__|
#| | |___ |___ _/\_ | | | \| |__/ | \ | | |
import sys
import os
import random
import tkinter as tk
from tkinter.ttk import Label
from tkinter import *
from tkinter.ttk import *
#Wonderful possibilities
feelings = [":)"]
reality = ["death", ":'(", "decease", "empoisoined", "choke", "demise", "extinction", "collapse", "mortality",
"anxiety", "mind controlled", "insect invasion", "alien invasion", "meteor crash", "explosion", "obsolescence",
"debt", "betrayed", "bitconnect", "one coin", "shooted", "bad police control", "neo-nazis", "Social Justice Warriored",
"Karen", "Giga chad","giga chads","No sex","Alien's cows","Karenized", "science experimentation", "nuclear bomb",
"toxic gas", "starvation", "cannibalism", "car crash", "plane crash",
"boat crash", "scammed", "killed", "raped", "jail", "jail but innocent", "jail but straight",
"victimized", "murdered", "play fortnite", "robbed", "killed during robbery",
"be alive", "kill a familly with car", "killed by alcoholic", "killed by junky", "be a junky", "4chaned",
"tsunami", "hurricane", "hurrycane of lost bullets", "Necrosis", "visit backrooms",
"SCP's collateral damage", "Collateral damage", "Burn", "Psycho-neighbors"]
feelings2 = ["peace","religion","lgbt","justice"]
reality2 = ["war", "forcibly mobilized", "sect","cult","religion","homophobia",
"North Korea", "Gulag", "lost bullet", "Burn", "Collateral damage", "victimized", "murdered", "death",
":'(", "decease", "empoisoined", "madness", "demise", "neo-nazis", "killed by junky", "be a junky",
"alien invasion", "obsolescence", "killing machine", "not bullet proof", "science experimentation", "empoisoined",
"killed", "raped", "jail", "jail but innocent", "jail but straight", "jail innocent & straight", "nuclear bomb",
"toxic gas", "starvation", "cannibalism", "car crash", "plane crash", "mind controlled",
"boat crash", ]
feelings3 = ["rich","stonks","crypto","bullrun","holding", "hedgefunds","blackrock","finance","money","gold", "€", "$","silver","work","job","employement"]
reality3 = ["luna classic","bitconnect","vegeta inu","shib","gamestop","one coin","not stonks","money value = 0","taxes","fees","bearmarket","inflation","bankrupt","homeless","hate","greed","robbed"]
feelings4 = ["police","control","racism","hitler", "Hitler"]
reality4 = ["can't breath", "Burn", "alien invasion", "scammed", "killed", "raped", "jail", "jail but innocent",
"jail but straight", "anxiety", "mind controlled", "explosion", "neo-nazis", "shooted", "No more sex",
"Karen", "Giga chad", "Karenized", "car crash", "plane crash", "play fortnite", "jail", "jail but innocent", "jail but straight",
"jail innocent & straight", "victimized", "murdered", "kill a familly with car", "killed by alcoholic",
"killed by junky", "visit backrooms", "SCP's collateral damage", "Collateral damage", "Burn", "Psycho-neighbors","racism"]
feelings5 = ["love","couple","friend","friends","friendship"]
reality5 = ["cheated", "friendzone", "Karenized", "plane crash", "boat crash", "scammed", "killed", "raped", "jail", "jail but innocent", "jail but straight",
"jail innocent & straight", "play fortnite", "robbed","bald", "cancer" ,"AIDS","decease", "poisoined", "Karen", "Giga chad", "giga chads", "No more sex",
"knives in the back"]
feelings6 = ["internet","4chan","forum","social","network","twitter","messenger","memes","dank","memes","pepe","way","knuckle","vr","vrchat","gaming","games"]
reality6 = ["Karen", "Giga chad", "giga chads", "No more sex", "Alien's cows", "Karenized", "science experimentation", "nuclear bomb","complot", "illuminatis"
,"obsolescence", "death by swatting", "mind controlled", "death", "decease", "alien invasion", "visit backrooms","depression"
, "play fortnite", "scammed", "bitconnect", "one coin", "vegeta inu", "luna classic", "SCP's collateral damage", "Collateral damage", "Burn", "Psycho-neighbors"]
#OPENING | https://secretguest9.bandcamp.com/track/secret-guest-g-a-t-t-s-u-w-a-v-e
# OR
# https://www.youtube.com/watch?v=8A-WYkuXX30 :3
master = tk.Tk()
life = Label(master)
mood = tk.StringVar()
#Ambiance tonight
master.geometry("800x800")
master.resizable(False, False)
master.title("LIFE SIMULATOR")
#___ ____ _ _ _ ____ ____ ___ _ ____ _ _ ___
#|__] | | | | | |___ |__/ |__] | |__| |\ | |
#| |__| |_|_| |___ | \ | |___ | | | \| |
#function to make an exe file with py to exe
def ressource_path(relative_path):
try:
base_path=sys._MEIPASS
except Exception:
base_path = os.path.abspath('.')
return os.path.join(base_path ,relative_path)
#to make it works, you have to rename all your path with ressource_path (/path/) WHEN YOU WILL TURN THE SCRIPT TO EXE
#Example : /icon/lol.png BECOME ressource_path(/icon/lol.png)
#Iconic
program_directory = sys.path[0]
master.iconphoto(True, PhotoImage(
file=os.path.join(program_directory, ressource_path("ico/sad.png"))))
#Little function to reset the icon
def icon():
program_directory = sys.path[0]
master.iconphoto(True, PhotoImage(
file=os.path.join(program_directory, ressource_path(ressource_path("ico/sad.png")))))
#NEW WINDOW !INSIDE! THE MAIN ONE for ERRORs
def new_window(self):
self.newWindow = tk.Toplevel(self.master)
self.app = w2(self.newWindow)
#Create an answer using the variable
def getvalue():
#Turn "spaces" to lower case for python searches
if mood.get().count(" ") == 0:
mood.set(mood.get().lower())
happening = random.choice(reality)
life['text'] = happening
happening2 = random.choice(reality + reality2*28)
life['text'] = happening2
happening3 = random.choice(reality + reality3*28)
life['text'] = happening3
happening4 = random.choice(reality + reality4*28)
life['text'] = happening4
happening5 = random.choice(reality + reality5*28)
life['text'] = happening5
happening6 = random.choice(reality + reality6*28)
life['text'] = happening6
happening7 = random.choice(reality + reality2 + reality3 + reality4 + reality5 + reality6)
life['text'] = happening7
if mood.get() in feelings:
happening = random.choice(reality)
life['text'] = happening
world = Label(master,
width=108,
text=happening,
font=("Arial", 50)
)
elif mood.get() in feelings:
world = Label(master,
width=108,
text=happening,
font=("Arial", 50)
)
elif mood.get() in feelings2:
world = Label(master,
width=108,
text=happening2,
font=("Arial", 50)
)
elif mood.get() in feelings3:
world = Label(master,
width=108,
text=happening3,
font=("Arial", 50)
)
elif mood.get() in feelings4:
world = Label(master,
width=108,
text=happening4,
font=("Arial", 50)
)
elif mood.get() in feelings5:
world = Label(master,
width=108,
text=happening5,
font=("Arial", 50)
)
elif mood.get() in feelings6:
world = Label(master,
width=108,
text=happening6,
font=("Arial", 50)
)
else:
world = Label(master,
width=108,
text=happening7,
font=("Arial", 50)
)
world.pack()
world.place(rely=0.8)
else:
new_window(master)
#___ ____ ____ ____ ____ ____ _ _
#|__] |__/ | | | __ |__/ |__| |\/|
#| | \ |__| |__] | \ | | | |
want = Label(master,
text="This is what I want",
font=("Arial", 72)
)
have = Label(master,
text="This is what I get",
font=("Arial", 72)
)
expected = Entry(master,
textvariable= mood,
width=21,
font=("Arial", 50)
)
submit = tk.Button(master,
text='Submit',
font=("tahoma", 50),
fg='black',
bg='yellow',
command=(lambda: getvalue()))
#Submit by pushing return
expected.bind("<Return>", (lambda event: getvalue()))
want.pack()
expected.pack()
expected.place(rely=.15, relx=.01)
submit.pack()
submit.place(rely=.3, relx=.3)
have.pack()
have.place(rely=.6, relx=.5, anchor=CENTER)
#=============== TUTORIAL WINDOW ===============#
#Manage the window by creating its class
class w2:
def __init__(self, master):
self.master = master
self.frame = tk.Frame(self.master)
self.frame.pack(fill=None, expand=False)
self.master.geometry("800x404")
self.master.resizable(False, False)
self.master.title(
"ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR")
#set icons to ERROR;
program_directory = sys.path[0]
master.iconphoto(True, PhotoImage(
file=os.path.join(program_directory, ressource_path("ico/er.png"))))
#Disable closing windows and reset icon if closed;
def close_win():
program_directory = sys.path[0]
master.iconphoto(True, PhotoImage(
file=os.path.join(program_directory, ressource_path("ico/sad.png"))))
self.master.destroy()
def disable_event():
pass
self.master.protocol("WM_DELETE_WINDOW", disable_event)
#Close the window by pushing "escape button"
master.bind('<Escape>', lambda e: close_win())
#Buttons to close the window
self.btn =tk.Button(self.master,
width=50,
text="/ / Click here to CLOSE or press ESCAPE \ \ ",
bg='yellow',
font=("Arial", 28),
command=close_win)
self.btn2 =tk.Button(self.master,
width=50,
text="\ \ Press ESCAPE or click here to CLOSE / / ",
bg='yellow',
font=("Arial", 28),
command=close_win)
#TITLE error message
self.title = Label(self.master,
width=50,
text="TUTORIAL",
font=("Arial", 28))
#Set what's wrong
self.error = Label(self.master,
width=50,
text="CHOOSE ONLY ONE WORD \n AND REMOVE SPACES",
font=("Arial, bold", 40))
#Widget's places
self.title.pack()
self.title.place(relx=1, rely=.05, anchor=CENTER)
self.error.pack()
self.error.place(relx=.97, rely=.5, anchor=CENTER)
self.btn.pack()
self.btn.place(relx=.5, rely=.8, anchor=CENTER)
self.btn2.pack()
self.btn2.place(relx=.5, rely=.2, anchor=CENTER)
self.frame.pack()
self.frame.place(relx=0, rely=0, anchor=NW)
#____ ____ ____ _ _ ____ ___ _ ____ _ _ _ _ ____ _ _
#|__/ | | | |_/ |___ | | |__| | | |\ | | |__|
#| \ |__| |___ | \_ |___ | |___ | | |__| | \| |___ | |
#ENDING | https://www.youtube.com/watch?v=2MVGRb1ffWQ :3
mainloop()