G

Untitled

public
Guest Apr 26, 2025 Never 31
Clone
Plaintext paste1.txt 18 lines (17 loc) | 876 Bytes
1
function spinSlot() {
2
const symbols = ['🍒', '🍋', '🔔', '7️⃣', '⭐', '💎'];
3
4
let count = 0;
5
const interval = setInterval(() => {
6
document.getElementById('slot1').innerText = symbols[Math.floor(Math.random() * symbols.length)];
7
document.getElementById('slot2').innerText = symbols[Math.floor(Math.random() * symbols.length)];
8
document.getElementById('slot3').innerText = symbols[Math.floor(Math.random() * symbols.length)];
9
count++;
10
if (count > 20) { // After spinning 20 times, stop on jackpot
11
clearInterval(interval);
12
document.getElementById('slot1').innerText = '💎';
13
document.getElementById('slot2').innerText = '💎';
14
document.getElementById('slot3').innerText = '💎';
15
document.getElementById('result').innerText = "JACKPOT!!! You Win!";
16
}
17
}, 100); // spins every 100ms
18
}