ESX [ESX/OX] HsScripts - Vending Machines - Advanced (Buy & Rob)

SaifNeon

Administrators
Joined
Apr 25, 2022
Messages
897
Credits
47,230
[ESX/OX] HsScripts - Vending Machines - Advanced (Buy & Rob)

Check out My Vending Machine Script with a Robbery Feature!
:moneybag:

Hey everyone! I’ve cooked up this script for my server. It adds some cool interactive vending machines for drinks and snacks, and get this – you can even try to rob them!
:smiling_imp:

What My Script Can Do:
  • Buying Goodies
    :cup_with_straw:
    :
    Players can grab items from the machines like usual.
    • Pay with cash or from their bank account.
      :credit_card:
    • Choose how many they want.
    • There’s a neat animation when they buy.
  • Vending Machine Heists!
    :bomb:
    :
    • You can decide which machines can be robbed in the settings – super flexible!
    • Thieves will need a specific item (like a “lockpick” – you can set this in the config).
      :hammer_and_wrench:
    • When they try to rob it, a minigame pops up (it’s a skill check from ox_lib ).
    • If they nail the minigame, they get a random amount of cash (you set the min/max in the config).
      :money_with_wings:
    • After a successful score, that machine goes on a cooldown so it can’t be hit again right away.
      :stopwatch:
  • Easy Configuration
    :gear:
    :
    • Translations: All the text players see (notifications, labels, etc.) can be easily translated. Just edit Config.Translations !
      :earth_africa:
    • Machine Setup:
      • Adding new machines is a breeze using their model name or hash.
      • Set up what each machine sells, the prices, and labels.
      • Fine-tune the robbery settings for every single machine:
        • enableRobbery (true/false)
        • robberyItemNeeded (what item they need)
        • robberyMoneyMin / robberyMoneyMax (how much they can get)
        • robberyCooldownMinutes (how long till it can be robbed again)
    • Animations: You can even define animations for buying and robbing if you want!
      :man_dancing:
  • Works with ox_target & ox_lib :
    • I’m using ox_target for the interaction with the machines.
    • And ox_lib handles the cool dialogues and the skill check minigame.
  • Security First!
    :lock:
    :
    • Don’t worry, the server checks all the important stuff (item prices, if players actually have the items needed for robbing, cooldowns) to keep cheaters out.
What You’ll Need:
  • ESX Framework (I tested it with es_extended, should be fine!)
  • ox_lib (for those sweet dialogues and the skill check)
  • ox_target (for making the machines interactive)
Please, Log in or Register to view URLs content!

Please, Log in or Register to view URLs content!
Please, Log in or Register to view URLs content!

Please, Log in or Register to view URLs content!

Please, Log in or Register to view URLs content!

Code is accessibleYes
Subscription-basedNo
Lines (approximately)250
RequirementsESX, OxLib, OxTarget
SupportNo
 
Back
Top Bottom