VNS Bitcoin With Shop
A bitcoin hacking and shop script for FiveM. Players use a laptop item to run a chain of hacking minigames and earn bitcoin items, then spend those bitcoins in a shop at a marker on the map - bitcoin is the shop's currency, not your framework's money.
One resource runs on QBCore, QBox and ESX. Framework, inventory, usable items, progress bar and notification support comes from vns-core. The hacking rounds use mhacking by default.
Feature overview
- Laptop hacking - the hack starts by using an inventory item (a laptop by default). The player plays two mhacking rounds, then a brute-force minigame on GTA's hacking computer screen.
- Brute-force minigame - the classic 8-letter word cracking screen, with configurable lives, column speeds and word list.
- Bitcoin item rewards - a successful hack pays out a random amount of the bitcoin item between a configurable min and max.
- Breakable laptop - optionally, a failed hack breaks the laptop, and even a successful hack has a configurable chance to turn it into a broken laptop item.
- Bitcoin shop - a marker on the map opens an ox_lib menu where players buy items or weapons priced in bitcoins. Prices can be fixed or randomized per server start.
- Server-side validation - rewards are only paid for a hack session the server started and that ran for a plausible time, and shop prices always come from the server.
- Swappable minigame - replace mhacking with any hacking resource through one hook.
- Multi-language - notification texts live in
locales/.
How a hack plays out
- The player uses the laptop item (
druglaptopby default). - An 8-second "Connecting" progress bar runs (with a phone animation when on foot).
- Two mhacking rounds back to back - fail either one and the hack ends.
- The brute-force computer opens: the player finds the letters of a hidden 8-letter word before running out of lives.
- On success the server adds a random amount of bitcoin items and rolls the laptop-break chance.
The shop
A marker is drawn at the shop position (Config.Zones). Standing in it and pressing E opens the "BitCoin Shop" menu. Every item costs a number of bitcoin items, removed on purchase. The menu stays open after buying so players can buy several items.
Open vs Encrypted
The script ships in an Open and an Encrypted variant. In the Encrypted variant config.lua, the locales folder, client/client_open.lua and server/server_open.lua stay editable - minigame settings, rewards, items, the shop, texts and the minigame hook live there.