Share your repls and programming experiences

← Back to all posts
Cycle Risk Game!!
JDOG787 (436)

Hi everyone

I made this cool game! I made this because I just recently learned frontend js so to practice I made this game!

How to play!

  • Try to get 200 1000 cycles by pressing buttons
  • Be careful. Theres a chance you will lose all
  • NEW: Better win/lose ratios
  • NEW: Uses localStorage

Enjoy :)

ChezCoder (1606)

paste this in console:

function win(){score=1000;cycles.textContent = score + " Cycles";cycles.textContent = "Yay You Won! You Got 1000 Cycles!"};function setscore(scr){score=scr;cycles.textContent = score + " Cycles";if(score === 1000){cycles.textContent = "Yay You Won! You Got 1000 Cycles!"; = "block";}};console.log("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\033[4m\033[3m\033[32mSuccess!\033[0m");function spam(btnId,amnt){if (btnId/btnId!=1){return 'Btn number has to be between 1-5';}var int_val_ = setInterval(()=>{if (score <= amnt) {document.getElementsByClassName("btn"+btnId)[0].click();}else{clearInterval(int_val_);}},10);scrollTo({top:0,behavior:"smooth"});}function removeRandom(){Math.random = function random(){ return 0 };console.log("Code given by @wulv")}

win() - ruin the fun
setscore() - set the score; example: setscore(30)
spam() - spam a button; example: spam("1",10) will spam the first button until the score reaches 10
removeRandom() - removes the possibility to lose (thanks @wulv!).

JDOG787 (436)

@ChezCoder lol. wow it works. CHEATER jk jk


wulv (61)

@ChezCoder Even better hack:

Math.random = function random(){ return 0 };

This eliminates the possibility to lose

JosephSanthosh (1182)

Python FAST and EASY Tutorial PART 1

HahaYes (1861)

I got 999 then I clicked 1 cycles and got destroyed :(

CodeLongAndPros (1622)

I would say:

1 -> 1/100
5 -> 1/20
10 -> 1/10
20 -> 1/5
50 -> 1/2

To make the risk/reward equal

JosephSanthosh (1182)

Python FAST and EASY Tutorial PART 1

Wilke000 (636)
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>Cycle Risk</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
    <link href="" rel="stylesheet">
Wilke000 (636)

Change title from <title></title> to <title>Cycle Risk</title>

Wilke000 (636)


This is easy

JDOG787 (436)

@IndyCarter thx forgot about that

install (8)

This works.<def count=100><count.button=fale>

install (8)

Sorry, I'll check again

install (8)

Wait. I think THIS is it <count=false><count tick=1000 def error><804def/point>

install (8)

None of the codes work. Its a scam.

HerculukeZeEpic (189)

Is it okay if I kind of copy the idea for a python code?
I won't use cycles as the Risk, and I will link you in the description.

firefish (947)

What? Fix this please: @JDOG787

Also in the console: I did this: it works: go(0,1000)

firefish (947)

@JDOG787 What did you fix? the difference between the numbers 200 and 1000? or the code...

JDOG787 (436)

@johnstev111 I made it so it doesn't say Yay you won! You got 200 cycles! but it says Yay you won! You got 1000 cycles! was that the problem?

nikilS (3)

Great! Keep up the good work :D

HZLPY (39)

Aw... I also made a cycles thing and it didn't get noticed ._.

studentAlfredAl (449)

Lol, based on the current posts on cycles, this is pretty good :)

LucasGonzalez19 (0)

i copy your game but i did it in python. here is the link if anyone wants to take a look but is in spanish

Jakman (454)

It seems that these cycle games are going to become popular. I presume these will be dead by June.

Warhawk947 (527)

Pro Strategy: Click the +50 button twice until you get 100 cycles,
then click the 20, 10, 5, 1, 1, 5, 10, 20, 50


HahaYes (1861)

uh oh... I knew these cycle games were coming....

JDOG787 (436)

@HahaYes lol. theres always been cycle games


Just a tip:
Make the goal higher(recommended 1000 to make it longer and fun!)
And you can use localStorage cuz if the user needs ro rest, closes the phone or computer and he will back with the same score! Ask @NoelBryan if you need him to help you with localStorage

JDOG787 (436)

@Zuhdi28 thx for the tip. i didnt want to make it to high but if its not then i will make it higher. and lll look into localStorage :) thx

JDOG787 (436)

@Zuhdi28 also does it need to be a server to use local storage?


@JDOG787 np😉


@JDOG787 defined all the time:

localStorage.setItem("thenameoftheitem", functionorvariable)



@JDOG787 np :D

Coder100 (18089)

you can only store type string @Zuhdi28

ChezCoder (1606)

@Coder100 yeah but a work around would be to use exec later on

ChezCoder (1606)

@Coder100 yea, also do u have experience with repl auth?

Coder100 (18089)

ye i made some tutorials @ChezCoder

JDOG787 (436)

@Coder100 look at discord pls :)

ChezCoder (1606)

@Coder100 oh well i dont read tutorials (xD) can u help me with something related to replauth?

JDOG787 (436)

@Zuhdi28 ok I added the local storage and 1000 cycles goal. @NoelBryan thx for the help with localStorage. :)


@JDOG787 cool!


javascript is cool


And also good job!


@JDOG787 np, YAY!

ChezCoder (1606)

hmm... time to make an exploit >:)

DannyIsCoding (698)

If you spam the 50 cycles key you can win pretty easily. Nice game!

RohilPatel (1581)

Ok, a few things. 1. It didn't say I won. Very minor, but you should make it if >= 100. Also, line 8 index.html, use & instead of the & sign. Idk why html is picky

JDOG787 (436)

@RohilPatel thx for the feedback. but wdym by &?

RohilPatel (1581)

In the url, if u see an & sign, just do this: & @JDOG787

I got u: replace line 8 with this:

<link href=";display=swap" rel="stylesheet">

Codemonkey51 (1057)

I'll check the odds (calculate) @JDOG787

JDOG787 (436)

@Warhawk947 thx I fixed the problem

RomanVannieuwen (2)

It's really a cool idea of balancing the cycle buttons.