-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
156 lines (134 loc) · 4.14 KB
/
Copy pathindex.html
File metadata and controls
156 lines (134 loc) · 4.14 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Tequila Clicker</title>
<link rel="icon" href="https://png.pngtree.com/png-vector/20230923/ourmid/pngtree-tequila-white-gold-thirsty-png-image_10062670.png" type="image/png">
<style>
body {
background-color: #fff7cc;
font-family: 'Segoe UI', sans-serif;
text-align: center;
padding-top: 60px;
color: #333;
overflow-x: hidden;
}
h1 {
color: #d4a100;
font-size: 3em;
margin-bottom: 20px;
text-shadow: 1px 1px #fff0a6;
}
#cookie {
width: 220px;
height: 220px;
cursor: pointer;
border-radius: 50%;
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
transition: transform 0.1s ease, box-shadow 0.2s ease;
object-fit: cover;
}
#cookie:active {
transform: scale(0.95);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
#counter {
font-size: 24px;
margin-top: 20px;
color: #a87300;
}
.container {
background: #fffbe0;
padding: 40px;
border-radius: 20px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
display: inline-block;
z-index: 10;
position: relative;
}
/* Falling image styles */
#falling-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
overflow: hidden;
z-index: 1;
}
.falling-image {
position: absolute;
width: 50px;
animation: fall 6s linear forwards;
}
@keyframes fall {
0% {
transform: translateY(-100px) rotate(0deg);
opacity: 1;
}
100% {
transform: translateY(110vh) rotate(360deg);
opacity: 0;
}
}
</style>
</head>
<body>
<div class="container">
<h1>Tequila Clicker</h1>
<img id="cookie"
src="https://media.tenor.com/vvDBcPwg2-8AAAAM/mommy-oni-toni-fowler.gif"
alt="Cookie">
<div id="counter">Clicks: 0</div>
</div>
<div id="falling-container"></div>
<!-- Sound Effects -->
<audio id="sound1" src="tikila.mp3" preload="auto"></audio>
<audio id="sound2" src="dilah.mp3" preload="auto"></audio>
<audio id="sound3" src="lemon.mp3" preload="auto"></audio>
<script>
let clicks = 0;
const cookie = document.getElementById('cookie');
const counter = document.getElementById('counter');
const normalCookie = "https://media.tenor.com/vvDBcPwg2-8AAAAM/mommy-oni-toni-fowler.gif";
const pressedCookie = "Twerk.gif"; // Ensure this exists
const sounds = [
document.getElementById('sound1'),
document.getElementById('sound2'),
document.getElementById('sound3')
];
function handleClickStart() {
cookie.src = pressedCookie;
const randomSound = sounds[Math.floor(Math.random() * sounds.length)];
randomSound.currentTime = 0;
randomSound.play();
clicks++;
counter.textContent = `Clicks: ${clicks}`;
}
function handleClickEnd() {
cookie.src = normalCookie;
}
// Mouse events for desktop
cookie.addEventListener('mousedown', handleClickStart);
cookie.addEventListener('mouseup', handleClickEnd);
cookie.addEventListener('mouseleave', handleClickEnd);
// Touch events for mobile/tablet
cookie.addEventListener('touchstart', (e) => {
e.preventDefault(); // prevent double triggering
handleClickStart();
});
cookie.addEventListener('touchend', handleClickEnd);
// Falling image function
function spawnFallingImage() {
const img = document.createElement('img');
img.src = 'https://png.pngtree.com/png-vector/20230923/ourmid/pngtree-tequila-white-gold-thirsty-png-image_10062670.png';
img.className = 'falling-image';
img.style.left = Math.random() * window.innerWidth + 'px';
document.getElementById('falling-container').appendChild(img);
setTimeout(() => img.remove(), 6000);
}
setInterval(spawnFallingImage, 3000);
</script>
</body>
</html>