THIS IS A MINI SCRIPT -IT’S BASICALLY UNREADABLE You can check the normal one here : https://my.numworks.com/python/skue/numclick/
A fun idle game for NumWorks
Features - Basic clicker mechanic - Cool circle that shrinks when you click - Shop items that help you earn more points
Using Bindings : - OK to click - UP and DOWN to navigate the shop - EXE to buy
Developing This project is available on Github, https://github.com/skueee/numclick
Support Feel free to open an issue on the github repo (https://github.com/skueee/numclick/) if you encounter any problem, or to open a pull request if you know how to fix it
W='white';V=range;U=len;R=str;O='black';L='red';I=False;H=True;import kandinsky as A,ion as B,math as b,random as S class c: def __init__(A,name,count,price,cps,mult):A.name=name;A.count=count;A.price=price;A.cps=cps;A.mult=mult C=c('finger',0,5,1,1.15);D=c('granny',0,50,5,1.15);E=c('farm',0,100,15,1.15);F=0;J=H;X=I;Y=I;Z=I;a=I;G=1;f=0;K=0;M=I;d=S.randint(1000,2000);h=[B.KEY_ZERO,B.KEY_ONE,B.KEY_TWO,B.KEY_THREE,B.KEY_FOUR,B.KEY_FIVE,B.KEY_SIX,B.KEY_SEVEN,B.KEY_EIGHT,B.KEY_NINE];P=0 def g():B=U(R(F));C=80-B*5;A.fill_rect(0,55,149,15,A.color(W));A.draw_string(R(F),C,55) def T(x0,y0,r,c,t): E=y0;D=x0;B=0;C=r;F=1-r while B<=C: A.set_pixel(D+B,E+C,c);A.set_pixel(D-B,E+C,c);A.set_pixel(D+B,E-C,c);A.set_pixel(D-B,E-C,c);A.set_pixel(D+C,E+B,c);A.set_pixel(D-C,E+B,c);A.set_pixel(D+C,E-B,c);A.set_pixel(D-C,E-B,c);B+=1 if F<0:F+=2*B+1 else:C-=1;F+=2*(B-C)+1 if t>1: for G in V(t): B=0;C=r+G;F=G while B<=C: A.set_pixel(D+B,E+C,c);A.set_pixel(D-B,E+C,c);A.set_pixel(D+B,E-C,c);A.set_pixel(D-B,E-C,c);A.set_pixel(D+C,E+B,c);A.set_pixel(D-C,E+B,c);A.set_pixel(D+C,E-B,c);A.set_pixel(D-C,E-B,c);B+=1 if F<0:F+=2*B+1 else:C-=1;F+=2*(B-C)+1 def Q(name,count,price,cps,rank): F=count;B=rank;D=R(cps)+'c/ps';E='$'+R(price) if G==B: for C in V(150):A.set_pixel(C+150,B*50-25,A.color(L));A.set_pixel(C+150,B*50+25,A.color(L)) for C in V(50):A.set_pixel(150,C+B*50-25,A.color(L));A.set_pixel(300,C+B*50-25,A.color(L)) A.draw_string(name,155,B*50-20,A.color(L));A.draw_string(R(F),155,B*50+1,A.color(L));A.draw_string(E,295-U(E)*10,B*50-20,A.color(L));A.draw_string(D,295-U(D)*10,B*50+1,A.color(L)) else: for C in V(150):A.set_pixel(C+150,B*50-25,A.color(O));A.set_pixel(C+150,B*50+25,A.color(O)) for C in V(50):A.set_pixel(150,C+B*50-25,A.color(O));A.set_pixel(300,C+B*50-25,A.color(O)) A.draw_string(name,155,B*50-20);A.draw_string(R(F),155,B*50+1);A.draw_string(E,295-U(E)*10,B*50-20);A.draw_string(D,295-U(D)*10,B*50+1) def i():Q(E.name,E.count,E.price,E.cps,3);Q(D.name,D.count,D.price,D.cps,2);Q(C.name,C.count,C.price,C.cps,1) def N(item_rank): A=item_rank if A==1:Q(C.name,C.count,C.price,C.cps,1) elif A==2:Q(D.name,D.count,D.price,D.cps,2) elif A==3:Q(E.name,E.count,E.price,E.cps,3) def j():global F,J;F+=C.count*C.cps+D.count*D.cps+E.count*E.cps;J=H def k():global e,M,P;C={B.KEY_ZERO:'0',B.KEY_ONE:'1',B.KEY_TWO:'2',B.KEY_THREE:'3',B.KEY_FOUR:'4',B.KEY_FIVE:'5',B.KEY_SIX:'6',B.KEY_SEVEN:'7',B.KEY_EIGHT:'8',B.KEY_NINE:'9'};e=S.choice(h);A.draw_string('Press '+C[e]+'!',50,200,A.color(L));M=H;P=K g();T(80,130,40,A.color(O),4);i() while H: K=K+1 if B.keydown(B.KEY_OK)and not X:F=F+1;X=H;J=H;T(80,130,40,A.color(W),4);T(80,130,30,A.color(O),3) if not B.keydown(B.KEY_OK)and X:X=I;T(80,130,30,A.color(W),3);T(80,130,40,A.color(O),4) if B.keydown(B.KEY_DOWN)and not Y and G<3:G=G+1;N(G-1);N(G);Y=H if not B.keydown(B.KEY_DOWN)and Y:Y=I if B.keydown(B.KEY_UP)and not Z and G>1:G=G-1;N(G+1);N(G);Z=H if not B.keydown(B.KEY_UP)and Z:Z=I if B.keydown(B.KEY_EXE)and not a: if G==1 and F>=C.price: F=F-C.price;C.count=C.count+1;C.price=b.ceil(C.price*C.mult);N(1);J=H if C.mult>1.2:C.mult=C.mult-.05 elif G==2 and F>=D.price: F=F-D.price;D.count=D.count+1;D.price=b.ceil(D.price*D.mult);N(2);J=H if D.mult>1.2:D.mult=D.mult-.05 elif G==3 and F>=E.price: F=F-E.price;E.count=E.count+1;E.price=b.ceil(E.price*E.mult);N(3);J=H if E.mult>1.2:E.mult=E.mult-.05 a=H if not B.keydown(B.KEY_EXE)and a:a=I if K-f>=140:j();f=K if K-P>=d and not M:k() if M and B.keydown(e):F=int(F*S.uniform(2,4));A.fill_rect(0,200,145,15,A.color(W));J=H;M=I;d=S.randint(2000,5000);P=K if M and K-P>=500:M=I;A.fill_rect(0,200,145,15,A.color(W));P=K;d=S.randint(2000,5000) if J:g();J=I