IHateMyselfx

Forked

Sep 9th, 2022
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.64 KB | None | 0 0
  1. import sys
  2. from tkinter import *
  3. import threading
  4. import time as t
  5. master = Tk()
  6.  
  7. global click                                ## GLOBAL VARS
  8. global elso                                 ## ELSO - MASODIK - HARMADIK - NEGYEDIK FOR THE ACHIVEMENT
  9. elso = True
  10. global masodik
  11. masodik = True
  12. global  harmadik
  13. harmadik = True
  14. global negyedik
  15. negyedik= True
  16.  
  17.  
  18.  
  19. def uiPrint():                                          ## dont need these anymore
  20.     info()
  21.     print("")
  22.     print(click)
  23.     blankLine()
  24.  
  25. def info():                                             ##useless
  26.     print("Double click purchases need 50 clicks!")
  27.     print("Auto clicker purchases need 75 clicks!")
  28.  
  29. info()
  30.  
  31. click = 0
  32. mult = 1
  33. dcp1 = 0
  34.  
  35. def blankLine():
  36.     for i in range(5):                                  ##useless
  37.         print("")
  38.  
  39. def purchaseDoubleClicksCommand():
  40.     global click
  41.     global mult
  42.     if click < 5:
  43.         print("Not enough clicks!")
  44.         blankLine()
  45.     elif click >= 5:
  46.         mult = mult*2
  47.         click = click - 5
  48.         print("Double Clicks Purchased!")
  49.         blankLine()
  50.  
  51.  
  52. def purchaseAutoClickerCommand():
  53.     global click
  54.    
  55.     if click < 7:
  56.         print("Not enough clicks!")
  57.         blankLine()
  58.     elif click >= 7:
  59.         click = click - 7
  60.         print("Auto clicker purchased!")
  61.         threading.Thread(target=clickek, daemon=True).start()
  62.        
  63.  
  64.  
  65.  
  66. def clickek():
  67.     global click
  68.    
  69.     while True:
  70.         t.sleep(1)
  71.         click+= 1
  72.         uiPrint()
  73.         PointLabel["text"] = f"Points: {click}"
  74.  
  75.  
  76. def buttonCommand():
  77.     global elso
  78.     global masodik
  79.     global harmadik
  80.     global negyedik
  81.    
  82.     global click
  83.     global mult
  84.     click += 1*(mult)
  85.     uiPrint()
  86.     PointLabel["text"] = f"Points: {click}"
  87.    
  88.     if click >= 5 and elso == True:
  89.         achivement = Tk()
  90.         achivementLabel = Label(achivement,text="Achievement Unlocked: Junior Clicker! BONUS 100 clicks!")
  91.         achivementLabel.pack()
  92.         #print('''Achievement Unlocked: Junior Clicker!
  93.         #BONUS 100 clicks!''')
  94.         click += 100
  95.         elso = False
  96.  
  97.     elif click >= 400 and masodik == True:
  98.         achivement = Tk()
  99.         achivementLabel = Label(achivement,text="Achievement Unlocked: Little Ninja Clicks! BONUS 200!")
  100.         achivementLabel.pack()
  101.         click += 300
  102.         masodik = False
  103.  
  104.     elif click >= 1500 and harmadik == True:
  105.         achivement = Tk()
  106.         achivementLabel = Label(achivement,text="Achievement Unlocked: Click Ninja Master! QUAD CLICKS!")
  107.         achivementLabel.pack()
  108.         mult = mult * 4
  109.         harmadik = False
  110.  
  111.     elif click >= 3000 and negyedik == True:
  112.         achivement = Tk()
  113.         achivementLabel = Label(achivement,text="Achievement Unlocked:  Jackie Chan Style! 8 TIMES THE CLICKS!")
  114.         achivementLabel.pack()
  115.         mult = mult * 8
  116.         negyedik = False
  117.  
  118.  
  119. def kilep():
  120.     sys.exit()
  121.    
  122.    
  123.  
  124. PointLabel = Label(master, text=f"points: {click}")
  125. PointLabel.pack(pady=5)
  126.  
  127.  
  128. mainClickButton = Button(master, text="Click!", command = buttonCommand)
  129. mainClickButton.pack(pady=20)
  130.  
  131. purchaseDoubleClickButton = Button(master, text="Purchase Double Clicks", command = purchaseDoubleClicksCommand)
  132. purchaseDoubleClickButton.pack(pady=20)
  133.  
  134. purchaseAutoClickerButton = Button(master, text="Purchase Auto Clicker", command = purchaseAutoClickerCommand)
  135. purchaseAutoClickerButton.pack(pady=20)
  136.  
  137. Quit_App_Button = Button(master, text="Quit", command=kilep)
  138. Quit_App_Button.pack(pady=20)
  139.  
  140. master.title("0.0.0.1")
  141. #master.geometry("%sx%s+%s+%s" % (200,70,512,512))
  142. master.geometry('300x560')
  143. mainloop()
Advertisement
Add Comment
Please, Sign In to add comment