Utility Jewelry

A script by XenoS.exe

No reviews yet.
Utility Jewelry main image

Full Description

Utility Jewelry

Get ready for a fresh and realistic method of robbing Vangelico Jewelry.


Card (1)
Frame 2
Youtube Showcase Frame 6


Screenshots









Contains
  • 10+ Display case breaking animations
  • 20+ Stealable jewels
  • Hacking minigame
  • Easter egg
  • Glass cutter animation
Details
  • All shop display cases are breakable with any weapon (also melee!).
  • As soon as the alarm goes off, the shutters will trap you inside.
  • Hack the system to lift the shutters and escape.
  • Find the symbols scattered around the map and insert them into the vault to unlock it!
  • You can steal any jewel you see.
Config
Config = {}

Config.Target = true
Config.Debug = false

Config.BankResetTime = 0.0833333 -- (m) time the bank need to be empty to reset the robbery
Config.AlarmTriggerTime = 30 -- (s)

Config.Cameras = {
    Outline = {
        enabled = true, -- Outlines cameras on robbery start
        color = vec4(240, 200, 80, 40), -- RGBA (0-255)
    },
    Reward = 5, -- (s) this is the amount of time the camera will reward if broken
}

Config.Shutters = {
    closed = false, -- If true the shutters will be closed by default, this will also turn off the lights (can be opened only by the electric box outside of the store)

    item = "screwdriver", -- This will require ESX or QBCore. Set to nil or an empty to string to disable it
    command = "shutters_jewelry", -- This will be a restricted command, so make sure to give ACE permissions to a group/identifier that can use it
    distance = 30.0,

    -- You can also add a list of jobs that can open the shutters using the item/command (ESX or QBCore required)
    jobs = {
        -- ["police"] = 1,
        --
        -- OR
        -- 
        -- "police",
    }
}

-- TODO: Add localazy
Config.Translations = {
    ["vault_minigame_help"] = "~INPUT_FRONTEND_PAUSE_ALTERNATE~ / ~INPUT_AIM~ Confirm combination.",

    ["shutters_toggling"] = "Toggling shutters in the nearest Jewelry.",
    ["shutters_no_near"] = "~r~There is no jewelry near you.",
    ["no_auth"] = "~r~You are not authorized to use this.",

    ["electric_help_toggle"] = "Toggle puzzle",
    ["electric_help_rotate"] = "Rotate connector",

    ["robbery_cant_start_notify"] = "~r~You cannot start a robbery here."
}

Config.Bars = {
    -- Offsets for text and bar
    -- Text offset is relative to the bar (so 0.0 is the default position, - is left and + is right)

    -- values: 0.0 to 1.0
    -- x axis: left to right
    -- y axis: top to bottom
    barOffset = vec2(0.85, 0.938),
    textOffset = vec2(0.0, 0.0)
}

Config.Blips = {
    Robbery = {
        name = "Jewelry Robbery",
        sprite = 586,
        color = 1,
        scale = 1.0,
    
        duration = 30000 -- If the player does not approach the blip after this time it will be eliminated, set to -1 to disable
    }
}

Config.Interactions = {
    hackElectricBox = {
        label = "Hack electric box",
        icon = "fas fa-power-off",
        distance = 2.0,

        notify = "Press {E} to hack the electric box.",
    },
    enterVaultMinigame = {
        label = "Start vault minigame",
        icon = "fas fa-vault",
        distance = 5.0,

        notify = "Press {E} to start the vault minigame.",
    },
    lootStand = {
        label = "Loot",
        icon = "fa-regular fa-gem",
        distance = 2.0,

        notify = "Press {E} to loot the stand.",
    },
    lootItem = {
        label = "Loot",
        icon = "fa-regular fa-gem",
        distance = 2.0,

        notify = "Press {E} to loot the artifact.",
    },
    cuttGlass = {
        label = "Cut glass",
        icon = "fas fa-magnifying-glass",
        distance = 2.0,

        notify = "Press {E} to cut the glass.",
    },
    riffleButt = {
        label = "Smash glass",
        icon = "fas fa-person-rifle",
        distance = 2.0,

        notify = "Press {E} to smash the glass.",

        weaponGroups = {`GROUP_RIFLE`, `GROUP_SMG`}, -- allowed weapon groups, https://docs.fivem.net/natives/?_0xC3287EE3050FB74C
        fast = true -- If true it will not move the player at the correct position (this can be faster but less precise)
    }
}

-- How much every stands will drop (look at Config.Items for values)
Config.Stands = {
    [`mxc_jewelry_props_littletray_01_a`] = "small",
    [`mxc_jewelry_props_littletray_02_a`] = "medium",
    [`mxc_jewelry_props_littletray_03_a`] = "big",
    [`mxc_jewelry_props_littletray_04_a`] = "small",
    [`mxc_jewelry_props_littletray_05_a`] = "medium",
    [`mxc_jewelry_props_littletray_06_a`] = "medium",
    [`mxc_jewelry_props_littletray_07_a`] = "medium",

    [`mxc_jewelry_props_roundtray_01_a`] = "medium",
    [`mxc_jewelry_props_roundtray_02_a`] = "medium",
    [`mxc_jewelry_props_roundtray_03_a`] = "medium",
    [`mxc_jewelry_props_roundtray_04_a`] = "medium",

    [`mxc_jewelry_props_singletray_01_a`] = "small",
    [`mxc_jewelry_props_singletray_02_a`] = "small",
    [`mxc_jewelry_props_singletray_03_a`] = "small",

    [`mxc_jewelry_props_viptray_01_a`] = "medium",
    [`mxc_jewelry_props_viptray_02_a`] = "medium",
    [`mxc_jewelry_props_viptray_03_a`] = "medium",
    [`mxc_jewelry_props_viptray_04_a`] = "medium",
    [`mxc_jewelry_props_viptray_05_a`] = "medium",
}

Config.Items = {
    enabled = true, -- Enable all items drop/requirement (ESX or QBCore required)

    stands = {
        small = {1, 5}, -- Amount of jewels to drop (min, max)
        medium = {5, 10},
        big = {10, 20},
    },

    -- Artifacts (vault room)
    panther = "panther",
    ruby = "ruby",
    ruby_necklace = "ruby_necklace",
    emerald = "emerald",
    golden_banana = "golden_banana",
    
    jewels = "jewels",
    
    -- Minigames
    electric_box = "cable_cutter", -- Item required to hack the electric box (empty = no requirement)
    glass_cut = "glass_cutter" -- Item required to cut the glass (empty = no requirement)
}

Config.Cops = {
    required = 1, -- Number of cops required

    jobs = {
        esx = {"police", "sheriff"}, -- job.name
        qbcore = {"leo"}, -- job.type
    }
}
Config (functions)
Config.Functions = {
    StartFramework = function()
        if GetResourceState("es_extended") ~= "missing" then
            ESX = exports["es_extended"]:getSharedObject()
        elseif GetResourceState("qb-core") ~= "missing" then
            QBCore = exports["qb-core"]:GetCoreObject()
        end
    end,

    --------------------------------- Server ---------------------------------

    RegisterUsableItem = function(item, func)
        -- func: (source, item) => void
        -- source<number> Its the player id that uses the item
        -- item<string>   The name of the item that is being used

        if GetResourceState("es_extended") ~= "missing" then
            ESX.RegisterUsableItem(item, func)
        elseif GetResourceState("qb-core") ~= "missing" then
            QBCore.Functions.CreateUseableItem(item, func)
        end
    end,

    HaveItem = function(source, item)
        -- https://utility-library.github.io/documentation/server/esx_integration/xplayer/HasItem/
        return HaveItem(source, item)
    end,

    AddItem = function(source, item, amount)
        -- https://utility-library.github.io/documentation/server/esx_integration/xplayer/AddItem/
        AddItem(source, item, amount)
    end,

    --[[ 
    CustomJobCheck = function(filter)
            
    end, 
    ]]

    -- robbery: {
    --     id: number,
    --     coords: vec3,
    --     radius: number
    --}
    CanStartRobbery = function(robbery, source)
        local cops = RobberyManager.GetCops()

        return #cops >= Config.Cops.required
    end,

    StartAlarm = function(storeId)
        RobberyManager.ExecuteForEachCop(function(cop)
            if ESX then
                cop.showNotification(Config.Translations["robbery_started_notify"])
                TriggerClientAction("SetBlipToStore", cop.source, storeId)
            elseif QBCore then
                TriggerClientEvent('QBCore:Notify', cop.PlayerData.source, Config.Translations["robbery_started_notify"], "primary")
                TriggerClientAction("SetBlipToStore", cop.PlayerData.source, storeId)
            end
        end)
    end,
}

Products

Code is accessible Partially, open functions for compatibility
Subscription-based No
Lines (approximately) 4500+
Requirements utility_lib
Support Yes