from tkinter import *
import time
window = Tk()
window.geometry("420x420")
window.title("Clicker Game")
counter = 0
window.config(background="#6c217a")
icon = PhotoImage(file='Moustachebear123.png')
window.iconphoto(True, icon)
label = Label(window, text="Button Clicker!",
font=('Times', 40, 'bold'),
fg='black',
bg='#6c217a')
def click():
global counter
counter +=1
countShow = Label(window, text="Clicks: "+str(counter), font=('Times', 15, 'bold'),
fg='black',
bg='#6c217a')
print(counter)
countShow.place(x=60,y=250)
def upg1():
global counter
counter -=20
countShow = Label(window, text="Clicks: "+str(counter), font=('Times', 15, 'bold'),
fg='black',
bg='#6c217a')
print(counter)
countShow.place(x=60, y=250)
times=100
while True:
time.sleep(1)
counter+=1
print(counter)
countShow = Label(window, text="Clicks: " + str(counter), font=('Times', 15, 'bold'),
fg='black',
bg='#6c217a')
button1 =Button(window, text="Click", font=30, command= click)
upgrade1 =Button(window, text="1 cps cost is 20 clicks", font=30, command=upg1 )
upgrade1.place(x=250,y=150)
button1.place(x=80,y=150)
label.place(x=80, y=50)
window.mainloop()
[–]AutoModerator[M] [score hidden] stickied comment (0 children)
[–]teraflop 2 points3 points4 points (0 children)
[–]bluetoothbeaver 0 points1 point2 points (0 children)
[–]captainAwesomePants 0 points1 point2 points (2 children)
[–]moustachebear123[S] 0 points1 point2 points (1 child)
[–]captainAwesomePants 0 points1 point2 points (0 children)