Every tap of Try Your Luck is guaranteed to award a prize — there are no losing tickets in Tiket. However, the distribution of prize amounts is heavily skewed, so while you will always win something, truly large payouts are quite rare by design.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/mr-sunset/tiket/llms.txt
Use this file to discover all available pages before exploring further.
Prize Range
All prizes fall between 1,000 inclusive. The value is calculated bygetRandomInt() in script.js:
Math.random() produces a float between 0 and 1. Raising that value to the 5th power skews the distribution strongly toward 0 — for example, a raw value of 0.5 becomes just 0.03125 after exponentiation. This means the vast majority of tickets land in the lower end of the 50 range, while prizes approaching $1,000 are extremely unlikely.
Prize Distribution
- Common Outcomes
- Rare Outcomes
Because the raw random number is raised to the 5th power before being scaled, the probability density is heavily concentrated near the minimum prize. In practical terms:
- 50 — the overwhelming majority of tickets fall in this band. A raw
Math.random()value below 0.55 (which covers roughly 55% of all rolls) maps to a prize below $50 after the x⁵ weighting. - 100 — noticeably less frequent, but still a common occurrence over a long session.
- 200 — occasional; you will see these periodically but they are not the norm.
Confetti Celebration
Whenever a single ticket pays out $300 or more, thecelebrate() function fires immediately after the prize is calculated:
@hiseb/confetti library loaded via CDN. The celebration triggers on the same click event that updates the balance, so the confetti burst and the balance animation play together.
Balance Display
After every ticket, two things happen to the on-screen numbers:- Balance update — the cumulative balance is recalculated with
(+balance) + moneyWonand written back to the#moneyelement usingbalance.toLocaleString(), which formats the number according to the user’s locale (for example,1,234in en-US or1.234in de-DE). - Pop animation — the balance figure briefly plays a CSS
popkeyframe animation: letter-spacing expands and the text turns yellow, then snaps back, all within 200 ms. The class is added and then removed viasetTimeoutto allow replaying on every tap.
toLocaleString() so both numbers always use consistent locale-aware formatting.