This repository has been archived by the owner on Sep 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathscript.js
1093 lines (991 loc) · 29.6 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// SHUT DOWN FOR GOOD SRRY! \\
// it doesnt work anymore, and its way too hard to fix with 1k+ lines \\
window.location.replace("https://cookieclicker.applecoders.repl.co/assets/other/broken.html");
//---- LocalStorage ----\\
if(localStorage.getItem('cookies') == undefined) {
localStorage.setItem('cookies', 0);
}
if(localStorage.getItem('name') == undefined) {
localStorage.setItem('name', 'User');
}
document.getElementById('bakeryName').innerHTML = localStorage.getItem('name') + "'s Bakery!"
notifyMe("Welcome to Cookie Clicker")
var cookies = document.getElementById("cookies");
var codeText = document.getElementById("codeText");
var cookiesNum = localStorage.getItem('cookies'); /* Use this for Changing Cookie Value! */
cookies.innerHTML = cookiesNum + " Cookies";
localStorage.setItem("lead", 12333)
var lead = localStorage.getItem("lead")
var cookieimg = document.getElementById("cookie");
var upgrade = 1;
var upgradebutton = document.getElementById("upgradebtn");
var cookieamount = 50;
var grandmaAmount = 100;
var grandmas = 0;
var grandmaInterval;
var body = document.getElementById("body");
var chefAmount = 200;
var chefs = 0;
var chefInterval;
var chefcookieAmount = 5;
var chefcookies = chefs * chefcookieAmount;
var factoryAmount = 1000;
var factories = 0;
var factoryInterval;
var factoryCookieAmount = 25;
var factoryCookies = factories * factoryCookieAmount;
var opacityScale = 0;
var upgradebtn = document.getElementById("upgradebtn");
var grandmabtn = document.getElementById("grandmalol");
var chefbtn = document.getElementById("chef");
var factorybtn = document.getElementById("factory");
var showUpgrades = document.getElementById("showUpgrades");
var highspeedbtn = document.getElementById("HighSpeedProcessor");
var processorAmount = 1500;
var processors = 0;
var processorInterval;
var processorCookieAmount = 50;
var processorCookies = processors * processorCookieAmount;
var hackerbtn = document.getElementById("CookieHacker");
var hackerAmount = 2000;
var hackers = 0;
var hackerInterval;
var hackerCookieAmount = 150;
var hackerCookies = hackers * hackerCookieAmount;
var halloweentheme = document.getElementById("halloweenbutton");
var thanksgivingtheme = document.getElementById("thanksgiving");
var robotbtn = document.getElementById("robot");
var robotAmount = 5000;
var robots = 0;
var robotInterval;
robotCookieAmount = 500;
var robotCookies = robots * robotCookieAmount;
var robot2btn = document.getElementById("robot2");
var robot2Amount = 10000;
var robots2 = 0;
var robot2Interval;
robot2CookieAmount = 1000;
var robot2Cookies = robots2 * robot2CookieAmount;
var bakery = document.getElementById("bakery")
var thanosAmount = 15000;
var thanos = 0;
var thanosInterval;
thanosCookieAmount = 15000;
var thanosCookies = robots2 * robot2CookieAmount;
var thanosbtn = document.getElementById("thanos");
// Mystery Button (Bug Fixed!) \\
var mysteryAmount = 100000;
var mysteries = 0;
var mysteryInterval;
var mysteryCookieAmount = 150000;
var mysteryCookies = mysteries * mysteryCookieAmount;
var mysterybtn = document.getElementById("mystery");
// Legend Button (Bug Fixed!) \\
var legendAmount = 1000000;
var legends = 0;
var legendInterval;
var legendCookieAmount = 1000000;
var legendCookies = legends * legendCookieAmount;
var legendbtn = document.getElementById("legendbtn");
// BitCookie Button (Bug Fixed!) \\
var bitAmount = 10000000;
var bits = 0;
var bitInterval;
var bitCookieAmount = 5000000;
var bitCookies = bits * bitCookieAmount;
var bitbtn = document.getElementById("bitbtn");
// Laser Cutter Button (Bug Fixed by SQcodes!) \\
var laserAmount = 1000000000;
var lasers = 0;
var laserInterval;
var laserCookieAmount = 500000000;
var laserCookies = lasers * laserCookieAmount;
var laserbtn = document.getElementById("laserbtn");
// New Realm 🌍 Button (Bug Fixed by SQcodes!) \\
var realmAmount = 10000000000;
var realms = 0;
var realmInterval;
var realmCookieAmount = 1000000000;
var realmCookies = bits * realmCookieAmount;
var realmbtn = document.getElementById("realmbtn");
// Cookie Malware Button (Bug Fixed!) \\
var malwareAmount = 100000000;
var malwares = 0;
var malwareInterval;
var malwareCookieAmount = 50000000;
var malwareCookies = malwares * malwareCookieAmount;
var malwarebtn = document.getElementById("malwarebtn");
// Legend Cutter Button (Bug Fixed by DaxCodes!) \\
var LegendCutterAmount = 50000000000;
var LegendCutters = 0;
var LegendCutterInterval;
var LegendCutterCookieAmount = 50000000000;
var LegendCutterCookies = LegendCutters * LegendCutterCookieAmount;
var LegendCutterbtn = document.getElementById("legendcookiecutterbtn");
// GOD TIER LASER CUTTER BUTTON (Bug Fixed by DaxCodes!) \\
var GodTLaserAmount = 150000000000;
var GodTLasers = 0;
var GodTLaserInterval;
var GodTLaserCookieAmount = 125000000000;
var GodTLaserCookies = GodTLasers * GodTLaserCookieAmount;
var GodTLaserbtn = document.getElementById("godtlaserbtn");
//////////////////////////////
// End of Buttons \\
//////////////////////////////
// Code Values \\
var eggdexValue = false
var fireValue = false
var dinoValue = false
// More DevTools & Other
var goldencookie = document.getElementById("GoldCookie")
var newCode = document.getElementById("newCode")
var homeopen = document.getElementById("openhomepage")
// DevTools Variables \\
var cookiegiver = document.getElementById("cookiegiver");
//if(window.location.href == 'https://cookie-clicker.applecoders.repl.co/'{window.location.replace("https://cookieclicker.applecoders.repl.co/assets/other/down.html");}
// Functions \\
var leaders = document.getElementById("leaders")
function addcookie() {
localStorage.setItem('cookies', parseInt(localStorage.getItem('cookies')) + upgrade);
cookiesNum = localStorage.getItem('cookies');
cookies.innerHTML = cookiesNum + " Cookies";
}
function upgradefunc() {
if (cookiesNum == cookieamount) {
upgrade += 1;
cookiesNum -= cookieamount;
cookies.innerHTML = cookiesNum + " Cookies";
codeText.innerHTML = "Success";
}
/* dont kill the grandmas in the js factory*/
if (cookiesNum >= cookieamount) {
upgrade += 1;
cookiesNum -= cookieamount;
cookies.innerHTML = cookiesNum + " Cookies";
}
}
function grandma() {
if (cookiesNum == grandmaAmount) {
cookiesNum -= grandmaAmount;
grandmas += 1;
cookies.innerHTML = cookiesNum + " Cookies";
grandmaIntFunc()
codeText.innerHTML = "Success";
}
if (cookiesNum >= grandmaAmount) {
cookiesNum -= grandmaAmount;
grandmas += 1;
cookies.innerHTML = cookiesNum + " Cookies";
grandmaIntFunc()
}
}
function grandmaIntFunc() {
grandmaInterval = setInterval(grandmaNum, 1000);
}
function grandmaNum() {
cookiesNum += grandmas;
cookies.innerHTML = cookiesNum + " Cookies";
}
function chef() {
if (cookiesNum == chefAmount) {
cookiesNum -= chefAmount;
chefs += 1;
cookies.innerHTML = cookiesNum + " Cookies";
chefIntervalFunc()
}
if (cookiesNum >= chefAmount) {
cookiesNum -= chefAmount;
chefs += 1;
cookies.innerHTML = cookiesNum + " Cookies";
chefIntervalFunc()
}
}
function chefIntervalFunc() {
chefInterval = setInterval(chefNum, 1000);
}
function chefNum() {
chefcookies = chefs * chefcookieAmount;
cookiesNum += chefcookies;
cookies.innerHTML = cookiesNum + " Cookies";
}
function factory() {
if (cookiesNum == factoryAmount) {
cookiesNum -= factoryAmount;
factories += 1;
cookies.innerHTML = cookiesNum + " Cookies";
factoryIntervalFunc()
}
if (cookiesNum >= factoryAmount) {
cookiesNum -= factoryAmount;
factories += 1;
cookies.innerHTML = cookiesNum + " Cookies";
factoryIntervalFunc()
}
}
function factoryIntervalFunc() {
factoryInterval = setInterval(factoryNum, 1000)
}
function factoryNum() {
factoryCookies = factories * factoryCookieAmount;
cookiesNum += factoryCookies;
cookies.innerHTML = cookiesNum + " Cookies";
}
function processor() {
if (cookiesNum == processorAmount) {
cookiesNum -= processorAmount;
processors += 1;
cookies.innerHTML = cookiesNum + " Cookies";
processorIntervalFunc()
}
if (cookiesNum >= processorAmount) {
cookiesNum -= processorAmount;
processors += 1;
cookies.innerHTML = cookiesNum + " Cookies";
processorIntervalFunc()
}
}
function processorIntervalFunc() {
processorInterval = setInterval(processorNum, 1000)
}
function processorNum() {
processorCookies = processors * processorCookieAmount;
cookiesNum += processorCookies;
cookies.innerHTML = cookiesNum + " Cookies";
}
function hacker() {
if (cookiesNum == hackerAmount) {
cookiesNum -= hackerAmount;
hackers += 1;
cookies.innerHTML = cookiesNum + " Cookies";
hackerIntervalFunc()
}
if (cookiesNum >= hackerAmount) {
cookiesNum -= hackerAmount;
hackers += 1;
cookies.innerHTML = cookiesNum + " Cookies";
hackerIntervalFunc()
}
}
function hackerIntervalFunc() {
hackerInterval = setInterval(hackerNum, 1000)
}
function hackerNum() {
hackerCookies = hackers * hackerCookieAmount;
cookiesNum += hackerCookies;
cookies.innerHTML = cookiesNum + " Cookies";
}
function robot() {
if (cookiesNum == robotAmount) {
cookiesNum -= robotAmount;
robots += 1;
cookies.innerHTML = cookiesNum + " Cookies";
robotIntervalFunc()
}
if (cookiesNum >= robotAmount) {
cookiesNum -= robotAmount;
robots += 1;
cookies.innerHTML = cookiesNum + " Cookies";
robotIntervalFunc()
}
}
function robotIntervalFunc() {
robotInterval = setInterval(robotNum, 1000)
}
function robotNum() {
robotCookies = robots * robotCookieAmount;
cookiesNum += robotCookies;
cookies.innerHTML = cookiesNum + " Cookies";
}
function robot2() {
if (cookiesNum == robot2Amount) {
cookiesNum -= robot2Amount;
robots2 += 1;
cookies.innerHTML = cookiesNum + " Cookies";
robot2IntervalFunc()
}
if (cookiesNum >= robot2Amount) {
cookiesNum -= robot2Amount;
robots2 += 1;
cookies.innerHTML = cookiesNum + " Cookies";
robot2IntervalFunc()
}
}
function robot2IntervalFunc() {
robot2Interval = setInterval(robot2Num, 1000)
}
function robot2Num() {
robot2Cookies = robots2 * robot2CookieAmount;
cookiesNum += robot2Cookies;
cookies.innerHTML = cookiesNum + " Cookies";
}
function infinitecookies() {
cookiesNum += 99999999999999;
cookies.innerHTML = cookiesNum + " Cookies";
}
function messageText(message) {
codeText.innerHTML = message;
setTimeout(() => { codeText.innerHTML = "" }, 2500);
}
// CC Codes Below! \\
function verifyLogin() {
if (bakery.value == "corn mod") {
codeText.innerHTML = "Code Accepted: will expire soon i swear :/";
setTimeout(() => { codeText.innerHTML = "" }, 2500);
bakery.value = "yellow squishy stuff in a corn";
cookie.src = "assets/images/snot-sick.gif";
}
if (bakery.value == "dev tools") {
codeText.innerHTML = "Code Accepted: Developer Tools Added!";
setTimeout(() => { codeText.innerHTML = "" }, 2500);
cookies.innerHTML = cookiesNum + " Cookies";
opendev()
}
if (bakery.value == "AppleCoders") {
codeText.innerHTML = "Message: AppleCoders is cool!";
setTimeout(() => { codeText.innerHTML = "" }, 2500);
}
if (bakery.value == "devtools") {
messageText("DeveloperTools Added!")
cookies.innerHTML = cookiesNum + " Cookies";
dev.style.opacity = 1;
opendev()
}
if (bakery.value == "dev") {
codeText.innerHTML = "Code Invalid: Expired or Invalid.";
setTimeout(() => { codeText.innerHTML = "" }, 2500);
}
if (bakery.value == "creeper") {
codeText.innerHTML = "Code Accepted: Creeper Mode Activated!";
setTimeout(() => { codeText.innerHTML = "" }, 2500);
body.style.background = "url(assets/images/creeper.jpg)"
}
if (bakery.value == "rootbeer") {
codeText.innerHTML = "Code Invalid: Expired or Invalid.";
setTimeout(() => { codeText.innerHTML = "" }, 2500);
}
if (bakery.value == "100key") {
codeText.innerHTML = "Code Accepted: Gave 100 of Each Upgrade!";
setTimeout(() => { codeText.innerHTML = "" }, 2500);
thanos = 100
thanosIntervalFunc()
robots2 = 100
robot2IntervalFunc()
robots = 100
robotIntervalFunc()
grandmas = 100
grandmaIntFunc()
chefs = 100
chefIntervalFunc()
hackers = 100
hackerIntervalFunc()
processors = 100
processorIntervalFunc()
factories = 100
factoryIntervalFunc()
}
if (bakery.value == "suskey10i") {
codeText.innerHTML = "Code Accepted: Gave 1000 of Each Upgrade!";
setTimeout(() => { codeText.innerHTML = "" }, 2500);
thanos = 1000
thanosIntervalFunc()
robots2 = 1000
robot2IntervalFunc()
robots = 1000
robotIntervalFunc()
grandmas = 1000
grandmaIntFunc()
chefs = 1000
chefIntervalFunc()
hackers = 1000
hackerIntervalFunc()
processors = 1000
processorIntervalFunc()
factories = 1000
factoryIntervalFunc()
}
if (bakery.value == "one") {
codeText.innerHTML = "Code Accepted: Gave 10000 of Each Upgrade!";
setTimeout(() => { codeText.innerHTML = "" }, 2500);
thanos = 10000
thanosIntervalFunc()
robots2 = 10000
robot2IntervalFunc()
robots = 10000
robotIntervalFunc()
grandmas = 10000
grandmaIntFunc()
chefs = 10000
chefIntervalFunc()
hackers = 10000
hackerIntervalFunc()
processors = 10000
processorIntervalFunc()
factories = 10000
factoryIntervalFunc()
}
if (bakery.value == "suskey1000i") {
codeText.innerHTML = "Code Accepted: Gave 100000 of Each Upgrade!";
setTimeout(() => { codeText.innerHTML = "" }, 2500);
thanos = 100000
thanosIntervalFunc()
robots2 = 100000
robot2IntervalFunc()
robots = 100000
robotIntervalFunc()
grandmas = 100000
grandmaIntFunc()
chefs = 100000
chefIntervalFunc()
hackers = 100000
hackerIntervalFunc()
processors = 100000
processorIntervalFunc()
factories = 100000
factoryIntervalFunc()
}
if (bakery.value == "suskey1000000i") {
messageText("Code Accepted: Gave 1000000 of Each Upgrade!");
thanos = 1000000
thanosIntervalFunc()
robots2 = 1000000
robot2IntervalFunc()
robots = 1000000
robotIntervalFunc()
grandmas = 1000000
grandmaIntFunc()
chefs = 1000000
chefIntervalFunc()
hackers = 1000000
hackerIntervalFunc()
processors = 10000000
processorIntervalFunc()
factories = 1000000
factoryIntervalFunc()
}
if (bakery.value == "suskeyi") {
messageText("DevCode Accepted: Gave 100M of every upgrade!")
thanos = 100000000
thanosIntervalFunc()
robots2 = 100000000
robot2IntervalFunc()
robots = 100000000
robotIntervalFunc()
grandmas = 100000000
grandmaIntFunc()
chefs = 100000000
chefIntervalFunc()
hackers = 100000000
hackerIntervalFunc()
processors = 100000000
processorIntervalFunc()
factories = 100000000
factoryIntervalFunc()
legends = 100000000
legendIntervalFunc()
mysteries = 100000000
mysteryIntervalFunc()
bits = 100000000
bitIntervalFunc()
}
if (bakery.value == "eggdex") {
if (eggdexValue == true) {
messageText("Code Already Redeemed!")
} else {
eggdexValue = true;
messageText("Code Accepted: E G G D E X");
cookiesNum += 100000;
cookies.innerHTML = cookiesNum + " Cookies";
}
}
if (bakery.value == "suskey1") {
codeText.innerHTML = "Code Accepted: Hi supreme member.";
thanos += 10000000000000000000000000000000000000000000000
thanosIntervalFunc()
robots2 += 10000000000000000000000000000000000000000000000
robot2IntervalFunc()
robots += 10000000000000000000000000000000000000000000000
robotIntervalFunc()
grandmas += 10000000000000000000000000000000000000000000000
grandmaIntFunc()
chefs += 10000000000000000000000000000000000000000000000
chefIntervalFunc()
hackers += 10000000000000000000000000000000000000000000000
hackerIntervalFunc()
processors += 10000000000000000000000000000000000000000000000
processorIntervalFunc()
factories += 10000000000000000000000000000000000000000000000
factoryIntervalFunc()
}
if (bakery.value == "fire") {
if (fireValue == true) {
messageText("Code Already Redeemed!")
} else {
fireValue = true;
messageText("Code Accepted: Good job on all the fire alarms the class has done!");
cookiesNum += 85000;
cookies.innerHTML = cookiesNum + " Cookies";
}
}
if(bakery.value == "dino") {
if(dinoValue == true) {
messageText("Code Already Redeemed!")
} else {
dinoValue = true;
messageText("Code Accepted: bean said it.");
cookiesNum += 50000;
cookies.innerHTML = cookiesNum + " Cookies";
}
}
}
function thanosgo() {
if (cookiesNum == thanosAmount) {
cookiesNum -= thanosAmount;
thanos += 1;
cookies.innerHTML = cookiesNum + " Cookies";
thanosIntervalFunc()
}
if (cookiesNum >= thanosAmount) {
cookiesNum -= thanosAmount;
thanos += 1;
cookies.innerHTML = cookiesNum + " Cookies";
thanosIntervalFunc()
}
}
function thanosIntervalFunc() {
thanosInterval = setInterval(thanosNum, 1000)
}
function thanosNum() {
thanosCookies = thanos * thanosCookieAmount;
cookiesNum += thanosCookies;
cookies.innerHTML = cookiesNum + " Cookies";
}
function x10() {
cookiesNum *= 10;
cookies.innerHTML = cookiesNum + " Cookies";
}
function x100() {
cookiesNum *= 100;
cookies.innerHTML = cookiesNum + " Cookies";
}
function x1000() {
cookiesNum *= 1000;
cookies.innerHTML = cookiesNum + " Cookies";
}
function x10000() {
cookiesNum *= 10000;
cookies.innerHTML = cookiesNum + " Cookies";
}
function x100000() {
cookiesNum *= 100000;
cookies.innerHTML = cookiesNum + " Cookies";
}
function wipedev() {
cookiesNum = 0;
cookies.innerHTML = cookiesNum + " Cookies";
thanos = 0
robots2 = 0
robots = 0
processors = 0
factories = 0
grandmas = 0
chefs = 0
hackers = 0
legends = 0
mysteries = 0
bits = 0
}
function ruinfun() {
cookiesNum = 99999999999999999999999999999999999999;
cookies.innerHTML = cookiesNum + " Cookies";
thanos = 9999999999999999999999999999999999
thanosIntervalFunc()
robots2 = 9999999999999999999999999999999999999
robot2IntervalFunc()
robots = 9999999999999999999999999999999999999999
robotIntervalFunc()
grandmas = 999999999999999999999999999999999999999999
grandmaIntFunc()
chefs = 999999999999999999999999999999999999999999999999999999999999
chefIntervalFunc()
hackers = 99999999999999999999999999999999999999999999999999999999
hackerIntervalFunc()
processors = 999999999999999999999999999999999999999999999999999999999999999
processorIntervalFunc()
factories = 99999999999999999999999999999999999999999999999999999999999999999999999999999
factoryIntervalFunc()
legends = 99999999999999999999999999999999999999999999999999999999999999999999999999999
legendIntervalFunc()
mysteries = 99999999999999999999999999999999999999999999999999999999999999999999999999999
mysteryIntervalFunc()
bits = 99999999999999999999999999999999999999999999999999999999999999999999999999999
bitIntervalFunc()
}
function closedev() {
dev.style.opacity = 0;
devopen.style.opacity = 1;
devopen.style.pointerEvents = "all";
dev.style.pointerEvents = "none";
}
function opendev() {
dev.style.opacity = 1;
devopen.style.opacity = 0;
devopen.style.pointerEvents = "all";
dev.style.pointerEvents = "all";
}
function goldcookiess() {
goldencookie.style.pointerEvents = 'all';
goldencookie.style.opacity = 1;
}
function goldclick() {
cookiesNum += 1000;
cookies.innerHTML = cookiesNum + " Cookies";
goldencookie.style.opacity = 0;
goldencookie.style.pointerEvents = 'none';
// Golden Cookie Fixed on May 10, 2021
}
function newestCode() {
newCode.innerHTML = "Code: fire";
setTimeout(() => { newCode.innerHTML = "" }, 2500);
}
function buyeveryupgrade() {
thanos += 100
thanosIntervalFunc()
robots2 += 100
robot2IntervalFunc()
robots += 100
robotIntervalFunc()
grandmas += 100
grandmaIntFunc()
chefs += 100
chefIntervalFunc()
hackers += 100
hackerIntervalFunc()
processors += 100
processorIntervalFunc()
factories += 100
factoryIntervalFunc()
legends += 100
legendIntervalFunc()
mysteries += 100
mysteryIntervalFunc()
bits += 100
bitIntervalFunc()
console.log("Gave x100 of every upgrade!")
}
function giveCookiesdev() {
var cookiesDev = cookiegiver.value;
var devCookieAmount = parseInt(cookiesDev);
cookiesNum += devCookieAmount;
cookies.innerHTML = cookiesNum + " Cookies";
codeText.innerHTML = "Gave " + devCookieAmount + " Cookies Succesfully!";
setTimeout(() => { codeText.innerHTML = "" }, 2500);
}
function developerTools() {
// Only used for Console Triggers //
codeText.innerHTML = "DeveloperTools Added";
setTimeout(() => { codeText.innerHTML = "" }, 2500);
dev.style.opacity = 1
dev.style.pointerEvents = "all";
console.log("Opened Developer Tools!")
console.log("CC DevTools created by DaxCodes, sqcodes")
}
function giveCookies(ccamount) {
console.log("Gave " + ccamount + " Cookies!")
cookiesNum += ccamount
cookies.innerHTML = cookiesNum + " Cookies";
codeText.innerHTML = "Gave " + ccamount + " Cookies Succesfully!";
setTimeout(() => { codeText.innerHTML = "" }, 2500);
}
function closehomeopen() {
homeopen.style.opacity = 0;
homeopen.style.pointerEvents = "none";
}
function mysterymode() {
if (cookiesNum == mysteryAmount) {
cookiesNum -= mysteryAmount;
mysteries += 1;
cookies.innerHTML = cookiesNum + " Cookies";
mysteryIntervalFunc()
}
if (cookiesNum >= mysteryAmount) {
cookiesNum -= mysteryAmount;
mysteries += 1;
cookies.innerHTML = cookiesNum + " Cookies";
mysteryIntervalFunc()
}
}
function mysteryIntervalFunc() {
mysteryInterval = setInterval(mysteryNuma, 1000)
}
function mysteryNuma() {
mysteryCookies = mysteries * mysteryCookieAmount;
cookiesNum += mysteryCookies;
cookies.innerHTML = cookiesNum + " Cookies";
}
function legendminer() {
if (cookiesNum == legendAmount) {
cookiesNum -= legendAmount;
legends += 1;
cookies.innerHTML = cookiesNum + " Cookies";
legendIntervalFunc()
}
if (cookiesNum >= legendAmount) {
cookiesNum -= legendAmount;
legends += 1;
cookies.innerHTML = cookiesNum + " Cookies";
legendIntervalFunc()
}
}
function legendIntervalFunc() {
legendInterval = setInterval(legendNum, 1000)
}
function legendNum() {
legendCookies = legends * legendCookieAmount;
cookiesNum += legendCookies;
cookies.innerHTML = cookiesNum + " Cookies";
}
function bitminer() {
if (cookiesNum == bitAmount) {
cookiesNum -= bitAmount;
bits += 1;
cookies.innerHTML = cookiesNum + " Cookies";
bitIntervalFunc()
}
if (cookiesNum >= bitAmount) {
cookiesNum -= bitAmount;
bits += 1;
cookies.innerHTML = cookiesNum + " Cookies";
bitIntervalFunc()
}
}
function bitIntervalFunc() {
bitInterval = setInterval(bitNum, 1000)
}
function bitNum() {
bitCookies = bits * bitCookieAmount;
cookiesNum += bitCookies;
cookies.innerHTML = cookiesNum + " Cookies";
}
function malware() {
if (cookiesNum == malwareAmount) {
cookiesNum -= malwareAmount;
malwares += 1;
cookies.innerHTML = cookiesNum + " Cookies";
malwareIntervalFunc()
}
if (cookiesNum >= malwareAmount) {
cookiesNum -= malwareAmount;
malwares += 1;
cookies.innerHTML = cookiesNum + " Cookies";
malwareIntervalFunc()
}
}
function malwareIntervalFunc() {
malwareInterval = setInterval(malwareNum, 1000)
}
function malwareNum() {
malwareCookies = malwares * malwareCookieAmount;
cookiesNum += malwareCookies;
cookies.innerHTML = cookiesNum + " Cookies";
}
function lasercutter() {
if (cookiesNum == laserAmount) {
cookiesNum -= laserAmount;
lasers += 1;
cookies.innerHTML = cookiesNum + " Cookies";
laserIntervalFunc()
}
if (cookiesNum >= laserAmount) {
cookiesNum -= laserAmount;
lasers += 1;
cookies.innerHTML = cookiesNum + " Cookies";
laserIntervalFunc()
}
}
function laserIntervalFunc() {
laserInterval = setInterval(laserNum, 1000)
}
function laserNum() {
laserCookies = lasers * laserCookieAmount;
cookiesNum += laserCookies;
cookies.innerHTML = cookiesNum + " Cookies";
}
function newrealm() {
if (cookiesNum == realmAmount) {
cookiesNum -= realmAmount;
realms += 1;
cookies.innerHTML = cookiesNum + " Cookies";
realmIntervalFunc()
}
if (cookiesNum >= realmAmount) {
cookiesNum -= realmAmount;
reamls += 1;
cookies.innerHTML = cookiesNum + " Cookies";
realmIntervalFunc()
}
}
function realmIntervalFunc() {
realmInterval = setInterval(realmNum, 1000)
}
function realmNum() {
realmCookies = realm * realmCookieAmount;
cookiesNum += realmCookies;
cookies.innerHTML = cookiesNum + " Cookies";
}
function notifyMe(msg) {
// Let's check if the browser supports notifications
if (!("Notification" in window)) {
alert(msg);
}
// Let's check whether notification permissions have already been granted
else if (Notification.permission === "granted") {
// If it's okay let's create a notification
var notification = new Notification(msg);
}
// Otherwise, we need to ask the user for permission
else if (Notification.permission !== "denied") {
Notification.requestPermission().then(function (permission) {
// If the user accepts, let's create a notification
if (permission === "granted") {
var notification = new Notification(msg);
}
});
}
}
function legendcutter() {
// 1000 LINES OF JS :OOOOOOOo \\
if (cookiesNum == LegendCutterAmount) {
cookiesNum -= LegendCutterAmount;
LegendCutters += 1;
cookies.innerHTML = cookiesNum + " Cookies";
legendcutterIntervalFunc()
}
if (cookiesNum >= LegendCutterAmount) {
cookiesNum -= LegendCutterAmount;
LegendCutters += 1;
cookies.innerHTML = cookiesNum + " Cookies";
legendcutterIntervalFunc()
}
}
function legendcutterIntervalFunc() {
LegendCutterInterval = setInterval(legendcutterNum, 1000)
}
function legendcutterNum() {
LegendCutterCookies = LegendCutters * LegendCutterCookieAmount;
cookiesNum += LegendCutterCookies;
cookies.innerHTML = cookiesNum + " Cookies";
}
// God Tier Laser Function \\
function godtlaser() {
if (cookiesNum == GodTLaserAmount) {
cookiesNum -= GodTLaserAmount;
GodTLasers += 1;
cookies.innerHTML = cookiesNum + " Cookies";
godtlaserIntervalFunc()
}
if (cookiesNum >= GodTLaserAmount) {
cookiesNum -= GodTLaserAmount;
GodTLasers += 1;
cookies.innerHTML = cookiesNum + " Cookies";
godtlaserIntervalFunc()
}
}
function godtlaserIntervalFunc() {
GodTLaserInterval = setInterval(godtlaserNum, 1000)
}
function godtlaserNum() {
GodTLaserCookies = GodTLasers * GodTLaserCookieAmount;
cookiesNum += GodTLaserCookies;
cookies.innerHTML = cookiesNum + " Cookies";
}