Categories > Coding > Python >
Simple console clicker game
Posted
Hi, i am learning python so i decided to make this basic clicker game using the console. Its all open source. You do not need to give credit if using. It uses loops, variables and other basic stuff :)
import os
value = 0
multiplier = 1
userinput = input("Press any key to get more > ")
while True:
if userinput != "":
value += multiplier
os.system("clear")
print(value)
userinput = input("Press any key to get more > ")
if value >= 10:
multiplier = 2
elif value >= 20:
multiplier = 4
elif value >= 30:
multiplier = 8
elif value >= 100:
multiplier = 100
elif value >= 1000:
multiplier = 1000
Try the cheat launcher verve today ⬇
https://i.imgur.com/QdS8sQ5.png
Join Neuron Discord Server - https://discord.gg/harAKHv32K
Replied
try using tkinter (gui) :)
tkinter is pretty good for simple stuff
example code for simple tkinter clicker:
from tkinter import *
from tkinter import messagebox
root = Tk()
root.counter = 0
root.increment = 1
def ckd():
root.counter += root.increment
L['text'] = 'Button clicked: ' + str(root.counter)
def ckd2():
if root.counter >= 1:
root.increment += 1
root.counter -= 1
else:
messagebox.showwarning("Not enough clicks", "You currently have 0 clicks.")
b = Button(root, text="Click Me", command=ckd)
b.pack()
b = Button(root, text="+1 increment", command=ckd2)
b.pack()
L = Label(root, text="No clicks yet.")
L.pack()
root.mainloop()
what it shows:
https://media.discordapp.net/attachments/1058388446705627228/1064780641549422603/Screenshot_2023-01-17_133748.png
Cancel
Post
!!!!!marcus__!!!!!#8611
https://cdn.discordapp.com/attachments/1066053366758780978/1078052772567597127/image.png
Replied
Flutter
Content length must be 10-5000 chars
Cancel
Post
I bet you a dollar you saw this.
Try the cheat launcher verve today ⬇
https://i.imgur.com/QdS8sQ5.png
Join Neuron Discord Server - https://discord.gg/harAKHv32K
Replied
just now there was a bug where when you clicked on +1 increment the counter wouldn't update so
from tkinter import *
from tkinter import messagebox
root = Tk()
root.counter = 0
root.increment = 1
def ckd():
root.counter += root.increment
L['text'] = 'Button clicked: ' + str(root.counter)
def ckd2():
if root.counter >= 1:
root.increment += 1
root.counter -= 1
L['text'] = 'Button clicked: ' + str(root.counter)
else:
messagebox.showwarning("Not enough clicks", "You currently have 0 clicks.")
b = Button(root, text="Click Me", command=ckd)
b.pack()
b = Button(root, text="+1 increment", command=ckd2)
b.pack()
L = Label(root, text="No clicks yet.")
L.pack()
root.mainloop()
Cancel
Post
!!!!!marcus__!!!!!#8611
https://cdn.discordapp.com/attachments/1066053366758780978/1078052772567597127/image.png
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post