Rup-Lottery | QBCore | Script 🎰

Rup-Lottery

This is a qb-core script that uses LUA, JS and HTML.

Add this item to your stores for players to enjoy scratching away at tickets to try and win the big prize.

To keep supporting my projects please consider liking my forum post :hearts:

Buy Here

Tebex :hand_with_index_finger_and_thumb_crossed:

Docs

Git Book :closed_book:


  • Prizes are configurable
  • The price of the ticket on UI is configurable
  • The notify system is configurable
  • The chances of what you get is configurable
  • Players have to scratch the ticket and can’t glitch it.
  • Optimized

Images

image



Config.lua

Config = {}

Config.Notify = 'qb' -- okok, qb, ox, custom --[[ See functions.lua for custom ]]

Config.Chances = {
    { chance = 40, prize = "$0" },    -- 40% chance
    { chance = 30, prize = "$2" },    -- 30% chance
    { chance = 15, prize = "$5" },    -- 15% chance
    { chance = 10, prize = "$10" },   -- 10% chance
    { chance = 3, prize = "$50" },    -- 3% chance
    { chance = 1, prize = "$500" },   -- 1% chance
    { chance = 1, prize = "$5000" }   -- 1% chance
}

Config.ScratchPrice = 5 -- Price of Scratch Ticket on the ticket

Config.MinimumScratch = 20 -- The mimimun pixels they need to scratch (Wouldnt reccomend going lower than 20 or higher than 35)

shared/functions.lua is NOT escrowed

Code is accessible No
Subscription-based No
Lines (approximately) 109
Requirements QB-Core
Support Yes
2 Likes

whats the real difference with your and this one [FREE] [ESX + QBCORE] Scratch Tickets :ticket: - FiveM Resource Development & Modding / Releases - Cfx.re Community … apart from your is paid

1 Like

Optimized, from scratch, better and less logic for the tickets, custom UI that I made with Photo Shop :man_shrugging:

Plus if you don’t want to buy it you can use his free one as well

Hi, author of [FREE] [ESX + QBCORE] Scratch Tickets here!

  1. So basically the script is ALWAYS running 0.00ms as it literally doesn’t really run any loops when idling. Calling it ‘more optimized’ is a false statement.
  1. Less logic is probably not any good and doesn’t matter because your code isn’t even accessible :thinking:?? The code might appear to be a bit all over the place but there is actually a reason behind it: the resource caches data and checks while using the card from the server-side for any attempt to change its value. Could probably improve on some coding practises but it works and there haven’t been any cheating issues caused by the script- reported.

Everyone can change how the UI looks like, I know the UI was not beautiful, but it works and you can actually go and completely customize it yourself.

3 Likes

I didn’t mean that your script wasn’t good and it looks very good. I didn’t mean with my message that is was a bad script at all. I am sorry if it seemed that way :slight_smile:

As when I said more optimized I meant smaller code means faster code in a sense of a script this small though there is really no difference. In the sense of the resource monitor no it is not less optimized. Again my message before this I didn’t mean for it to sound like your script is bad as it looks very well made :slight_smile: