Advanced Addiction Script [ESX,QBcore,Qbox, any framework]

PRICE: 14.99$ + VAT
PURCHASE ON TEBEX: Lorenzo Chica Store (New 2025)

:pushpin: Features

  • Addiction, more you use an item, more you will be addict on it
  • Alcohol, Smoking, Weed, Cocaine, Heroine addictions are already set but you can add your own one ! (exemple : sugar addiction, everytime you don’t eat healthy food, you will have a sugar addiction with withdrawal effects)
  • Items are consumed multiple times and no longer in a single use (exemple : beer need 3 use to dissapear, bottle need 7 uses,.. everything is configurable)
  • Use drugs/alcohol item with many effects (timecycle, camshake, clipset, spawnPed, sound, video, ..)
  • Different animations when using items, smoking, eating, drinking, sniffing and injecting syringue
  • Item can have bonus effects like gain health, armor, increase speed.
  • Overdose system : If you are too much addict to something and you continue to consume item for that addiction, you will increase the possibility to do a overdose.
  • Medication system : doctor can help you fight your addiction by giving you a treatments but follow the dosage, if you don’t follow, you risk to decrease you health, vomit or coma
  • You can replace the notifs by your own system (client/custom.lua)
  • Add your own code when using certain item, reduce stress, add/reduce hunger, or whatever you want (see ‘custom.usingItem’ function in client/custom.lua)
  • Config highly configurable
  • Support ESX, QBcore, QBox, custom framework (for the last one, you have to add the code of your framework yourself)
  • Language en and fr
  • Work with ox_inventory, qs_inventory and tgiann_inventory but you can adapt to your inventory

:books: Dependencies

:open_hands: Credit

While this script is entirely custom and written from scratch, some of its features were inspired by the design and behavior of other systems such as DEVCORE Realistic Needs, Hito Drug Effects and Rcore Drunk System. Respect to the original authors for their influence on the final vision.

Thanks to the Overextended and Community ox team for generously providing the resources that have empowered me to bring this script to life. (ox_lib and ox_target)

:world_map: Translation available

  • English
  • French

Video Preview :

Config file :

Summary
Config = {}

Config.debug = false

Config.settingsAddiction = {
    maxLevel = 100, -- max level of addiction,
    withdrawalEffectsDuration = 30, -- time in seconds
    cooldownBetweenEffects = 300, -- (300 seconds = 5 minutes) time in seconds between two withdrawal effects
    menuAddiction = {
        enabled = true, -- if true, the player can see the addiction menu
        needPrescription = false, -- if true, the player will need to see a doctor to know which medicine he can take / if false, he can see by himself in the addiction menu
        command = 'addiction', -- Command to open the addiction menu
    },
    menuMedication = {
        enabled = true, -- if true, player can see how many pills they take already
        command = 'medication'
    },
    enableVomitSound = true, -- Enable the vomit sound when the player vomit
    ambulanceJob = {
        ['ambulance'] = true,
        ['ems'] = true
    }
}

Config.addiction = {
    ['Alcohol'] = {
        increaseAddictionPerUse = 1, -- increase addiction everytime you use a drug
        decreaseAddictionOverTime = 0.1, -- decrease addiction every x minute if you don't use the drug
        decreaseToxicityOverTime = 1, -- decrease toxicity every x minute if you don't use the drug
        effects = { -- this effects will be applied if the player is using the drug
            {
                level = 20,
                timecycle = "Drunk",
                timecycleStrength = 0.25,
                camShake = "ROAD_VIBRATION_SHAKE",
                shakeIntensity = 0.25,
                SetPedMotionBlur = true,
                clipset = "MOVE_M@DRUNK@SLIGHTLYDRUNK",
            },
            {
                level = 50,
                timecycle = "Drunk",
                timecycleStrength = 0.50,
                camShake = "ROAD_VIBRATION_SHAKE",
                shakeIntensity = 0.50,
                SetPedMotionBlur = true,
                clipset = "MOVE_M@DRUNK@MODERATEDRUNK",
                SetPedIsDrunk = true,
            },
            {
                level = 80,
                timecycle = "Drunk",
                timecycleStrength = 0.50,
                camShake = "ROAD_VIBRATION_SHAKE",
                shakeIntensity = 1.00,
                sound = "heartbeat.ogg",
                ragdollChance = 30,
                SetPedMotionBlur = true,
                clipset = "MOVE_M@DRUNK@VERYDRUNK",
                SetPedIsDrunk = true,
                vomitChance = 10,
            }
        },
        withdrawalEffects = { -- this effects will be applied if the player is not using the drug and he have addicion to this drug
            {
                level = 20,
                camShake = "ROAD_VIBRATION_SHAKE",
                shakeIntensity = 0.25,
                sound = "heartbeat.ogg",
                decreaseHealth = 5 -- in %
            },
            {
                level = 50,
                timecycle = "Drunk",
                camShake = "ROAD_VIBRATION_SHAKE",
                shakeIntensity = 0.50,
                sound = "heartbeat.ogg",
                decreaseHealth = 10 -- in %
            },
            {
                level = 80,
                timecycle = "Drunk",
                camShake = "ROAD_VIBRATION_SHAKE",
                shakeIntensity = 1.00,
                sound = "heartbeat.ogg",
                decreaseHealth = 20 -- in %
            }
        },
        coma = {
            enabled = true,
            overdoseRisk = {
                minAddictionLevel = 70, -- Minimum addiction level to have a risk of coma (not toxicity level)
                baseChance = 15, -- Base chance percentage
                chanceIncreasePerLevel = 0.5, -- Chance increase per addiction level above minimum
            },
        },
    },
    ['Smoking'] = {
        decreaseAddictionOverTime = 1, -- decrease addiction every x minute if you don't use the drug
        increaseAddictionPerUse = 1, -- increase addiction everytime you use a drug
        decreaseToxicityOverTime = 1, -- decrease toxicity every x minute if you don't use the drug
        effects = {},
        withdrawalEffects = {
            {
                level = 50,
                timecycle = "Drunk",
                camShake = "ROAD_VIBRATION_SHAKE",
                shakeIntensity = 0.50,
                sound = "heartbeat.ogg",
                decreaseHealth = 10 -- in %
            },
            {
                level = 80,
                timecycle = "Drunk",
                camShake = "ROAD_VIBRATION_SHAKE",
                shakeIntensity = 1.00,
                sound = "heartbeat.ogg",
                decreaseHealth = 20 -- in %
            }
        },
    },
    ['Weed'] = {
        decreaseAddictionOverTime = 1, -- decrease addiction every x minute if you don't use the drug
        increaseAddictionPerUse = 1, -- increase addiction everytime you use a drug
        decreaseToxicityOverTime = 1, -- decrease toxicity every x minute if you don't use the drug
        effects = { -- this effects will be applied if the player is using the drug
            {
                level = 0,
                timecycle = "spectator5",
                timecycleStrength = 0.25,
                camShake = "ROAD_VIBRATION_SHAKE",
                shakeIntensity = 0.25,
                clipset = "move_f@scared",
                animPostFx = {
                    "DMT_flight",
                },
                spawnPed = {
                    enabled = false,
                    quantity = math.random(20, 50),
                    agressive = false,
                    canDamagePlayer = false,
                    model = {
                        `u_m_y_zombie_01`,
                    },
                    anim = { -- this is a loop anim who trigger if the ped are not aggressive
                        { dict = "reaction@points@", name = "loop_0" },
                        { dict = "anim@amb@nightclub@lazlow@hi_podium@", name = "danceidle_hi_15_crazyrobot_laz" },
                        { dict = "mini@strip_club@private_dance@part1",  name = "priv_dance_p1" },
                    }
                },
                sound = 'grain.ogg', -- .ogg only
            },
        },
        withdrawalEffects = {
            {
                level = 20,
                camShake = "ROAD_VIBRATION_SHAKE",
                shakeIntensity = 0.25,
                sound = "heartbeat.ogg",
                decreaseHealth = 5 -- in %
            },
            {
                level = 50,
                timecycle = "Drunk",
                camShake = "ROAD_VIBRATION_SHAKE",
                shakeIntensity = 0.50,
                sound = "heartbeat.ogg",
                decreaseHealth = 10 -- in %
            },
            {
                level = 80,
                timecycle = "Drunk",
                camShake = "ROAD_VIBRATION_SHAKE",
                shakeIntensity = 1.00,
                sound = "heartbeat.ogg",
                decreaseHealth = 20 -- in %
            }
        },
    },
    ['Cocaine'] = {
        increaseAddictionPerUse = 60, -- increase addiction everytime you use a drug
        decreaseAddictionOverTime = 0.5, -- decrease addiction every x minute if you don't use the drug
        decreaseToxicityOverTime = 1, -- decrease toxicity every x minute if you don't use the drug
        effects = { -- this effects will be applied if the player is using the drug
            {
                level = 0,
                timecycle = "spectator5",
                timecycleStrength = 0.25,
                camShake = "ROAD_VIBRATION_SHAKE",
                shakeIntensity = 0.25,
                clipset = "move_characters@jimmy@nervous@",
                animPostFx = {
                    "DMT_flight",
                },
                spawnPed = {
                    enabled = false,
                    quantity = 20,
                    agressive = false,
                    canDamagePlayer = false,
                    model = {
                        `a_m_m_tranvest_01`,
                    },
                    anim = { -- this is a loop anim who trigger if the ped are not aggressive
                    { dict = "anim@amb@nightclub@lazlow@hi_podium@", name = "danceidle_hi_15_crazyrobot_laz" },
                    { dict = "mini@strip_club@private_dance@part1",  name = "priv_dance_p1" },
                }
                },
                increaseSpeed = 1.49, -- number from 1 to 1.49 max (under or above this number will have no effects)
                sound = 'grain.ogg', -- .ogg only
            },
        },
        withdrawalEffects = {
            {
                level = 20,
                camShake = "ROAD_VIBRATION_SHAKE",
                shakeIntensity = 0.25,
                sound = "heartbeat.ogg",
                decreaseHealth = 5 -- in %
            },
            {
                level = 50,
                timecycle = "Drunk",
                camShake = "ROAD_VIBRATION_SHAKE",
                shakeIntensity = 0.50,
                sound = "heartbeat.ogg",
                decreaseHealth = 10 -- in %
            },
            {
                level = 80,
                timecycle = "Drunk",
                camShake = "ROAD_VIBRATION_SHAKE",
                shakeIntensity = 1.00,
                sound = "heartbeat.ogg",
                decreaseHealth = 20 -- in %
            }
        },
    },
    ['Heroine'] = {
        decreaseAddictionOverTime = 1, -- decrease addiction every x minute if you don't use the drug
        increaseAddictionPerUse = 1, -- increase addiction everytime you use a drug
        decreaseToxicityOverTime = 1, -- decrease toxicity every x minute if you don't use the drug
        effects = { -- this effects will be applied if the player is using the drug
            {
                level = 0,
                timecycle = "spectator5",
                timecycleStrength = 0.25,
                camShake = "ROAD_VIBRATION_SHAKE",
                shakeIntensity = 0.25,
                clipset = "move_f@scared",
                animPostFx = {
                    "DMT_flight",
                },
                spawnPed = {
                    enabled = true,
                    quantity = 20,
                    agressive = false,
                    canDamagePlayer = false,
                    model = {
                        `a_m_m_tranvest_01`,
                    },
                    anim = { -- this is a loop anim who trigger if the ped are not aggressive
                        { dict = "reaction@points@", name = "loop_0" },
                        { dict = "anim@amb@nightclub@lazlow@hi_podium@", name = "danceidle_hi_15_crazyrobot_laz" },
                        { dict = "mini@strip_club@private_dance@part1",  name = "priv_dance_p1" },
                    }
                },
                sound = 'grain.ogg', -- .ogg only
                video = { id = 'J0YZQNgkf9Y', muteSound = false }
            },
        },
        withdrawalEffects = {
            {
                level = 20,
                camShake = "ROAD_VIBRATION_SHAKE",
                shakeIntensity = 0.25,
                sound = "heartbeat.ogg",
                decreaseHealth = 5 -- in %
            },
            {
                level = 50,
                timecycle = "Drunk",
                camShake = "ROAD_VIBRATION_SHAKE",
                shakeIntensity = 0.50,
                sound = "heartbeat.ogg",
                decreaseHealth = 10 -- in %
            },
            {
                level = 80,
                timecycle = "Drunk",
                camShake = "ROAD_VIBRATION_SHAKE",
                shakeIntensity = 1.00,
                sound = "heartbeat.ogg",
                decreaseHealth = 20 -- in %
            }
        },
    },
    -- /!\ ATTENTION : Don't delete this type, it's used for the medication /!\
    ['Medicine'] = { -- Whe don't want to add addiction for this type so we set increase and decrease to 0
        decreaseAddictionOverTime = 0, -- decrease addiction every x minute if you don't use the drug
        increaseAddictionPerUse = 0, -- increase addiction everytime you use a drug
        decreaseToxicityOverTime = 0, -- decrease toxicity every x minute if you don't use the drug
        effects = {},
        withdrawalEffects = {},
    },
}

Config.usingItem = {
    ['beer'] = {
        addictionType = 'Alcohol',
        numberOfUse = 3,
        toxicityPerUse = 2, -- Addiction level added per use
        animType = 'drinking',
        props = {
            model = 'prop_amb_beer_bottle',
            bone = 36029,
            offset = vec3(0.05, -0.05, 0.05),
            rotation = vec3(-105.0, 0.0, -20.0),
        }
    },
    ['vodka'] = {
        addictionType = 'Alcohol',
        numberOfUse = 7,
        toxicityPerUse = 10, -- Addiction level added per use
        animType = 'drinking',
        props = {
            model = 'prop_vodka_bottle',
            bone = 36029,
            offset = vec3(0.05, -0.28, 0.10),
            rotation = vec3(-105.0, 5.0, -0.0),
        }
    },
    ['vodka_shot'] = {
        addictionType = 'Alcohol',
        numberOfUse = 1,
        toxicityPerUse = 10, -- Addiction level added per use
        animType = 'drinking',
        props = {
            model = 'prop_cs_shot_glass',
            bone = 36029,
            offset = vec3(0.05, -0.0, 0.015),
            rotation = vec3(-105.0, 0.0, -20.0),
            -- rotation = vec3(-110.0, -20, 0),
        }
    },
    ['cigarette'] = {
        addictionType = 'Smoking',
        numberOfUse = 5,
        toxicityPerUse = 0, -- Alcohol level added per consumption
        animType = 'smoking',
        props = { -- props = false, if you don't want any props
            model = 'prop_cs_ciggy_01b',
            bone = 28422,
            offset = vec3(0.01, 0.0, 0.0),
            rotation = vec3(0.0, 0.0, 0.0),
        },
        needItem = {
            {name = 'lighter', amount = 1, removeItem = false},
        }
    },
    ['cigar'] = {
        addictionType = 'Smoking',
        numberOfUse = 5,
        toxicityPerUse = 0, -- Alcohol level added per consumption
        animType = 'smoking',
        props = { -- props = false, if you don't want any props
            model = 'prop_cigar_01',
            bone = 28422,
            offset = vec3(0.025, 0.0, 0.0),
            rotation = vec3(0.0, 180.0, 0.0),
        },
    },
    ['vape'] = {
        addictionType = 'Smoking',
        numberOfUse = 5,
        toxicityPerUse = 0, -- Alcohol level added per consumption
        animType = 'vape',
        props = { -- props = false, if you don't want any props
            model = 'xm3_prop_xm3_vape_01a',
            bone = 28422,
            offset = vec3(-0.02, -0.02, 0.02),
            rotation = vec3(0.0, 236.0, 312.0),
        },
        removeItem = false,
        -- needItem = {
        --     {name = 'vape_juice', amount = 1, removeItem = true},
        -- }
    },
    ['joint'] = {
        addictionType = 'Weed',
        numberOfUse = 5,
        toxicityPerUse = 5, -- Alcohol level added per consumption
        animType = 'smoking',
        props = { -- props = false, if you don't want any props
            model = 'prop_sh_joint_01',
            bone = 28422,
            offset = vec3(0.04, 0.0, 0.0),
            rotation = vec3(0.0, 0.0, 0.0),
        },
        bonus = {
            health = 10, -- in %
            armor = 10, -- in %
            increaseSpeed = 1.49 -- number from 1 to 1.49 max (under or above this number will have no effects)
        }
    },
    ['cocaine_pooch'] = {
        addictionType = 'Cocaine',
        toxicityPerUse = 5, -- Alcohol level added per consumption
        animType = 'sniffing', -- Cannot be more than 1 use if animType = 'sniffing' or 'syringue'
        bonus = {
            health = 10, -- in %
            armor = 10, -- in %
        }
    },
    ['hero_syringue'] = {
        addictionType = 'Heroine',
        toxicityPerUse = 10, -- Alcohol level added per consumption
        animType = 'syringue', -- Cannot be more than 1 use if animType = 'sniffing' or 'syringue'
        bonus = {
            health = 10, -- in %
            armor = 10, -- in %
            increaseSpeed = 1.49 -- number from 1 to 1.49 max (under or above this number will have no effects)
        }
    },
    -- Medications
    ['naltrexone'] = {
        addictionType = 'Medicine',
        numberOfUse = 1,
        toxicityPerUse = 2,
        animType = 'eating',
        props = {
            model = 'prop_cs_pills',
            bone = 36029,
            offset = vec3(0.075, 0.02, 0.04),
            rotation = vec3(-110.0, -20, 0),
        }
    },
    ['disulfiram'] = {
        addictionType = 'Medicine',
        numberOfUse = 1,
        toxicityPerUse = 2,
        animType = 'eating',
        props = {
            model = 'prop_cs_pills',
            bone = 36029,
            offset = vec3(0.075, 0.02, 0.04),
            rotation = vec3(-110.0, -20, 0),
        }
    },
    ['methadone'] = {
        addictionType = 'Medicine',
        numberOfUse = 1,
        toxicityPerUse = 2,
        animType = 'eating',
        props = {
            model = 'prop_cs_pills',
            bone = 36029,
            offset = vec3(0.075, 0.02, 0.04),
            rotation = vec3(-110.0, -20, 0),
        }
    },
    ['bupropion'] = {
        addictionType = 'Medicine',
        numberOfUse = 1,
        toxicityPerUse = 2,
        animType = 'eating',
        props = {
            model = 'prop_cs_pills',
            bone = 36029,
            offset = vec3(0.075, 0.02, 0.04),
            rotation = vec3(-110.0, -20, 0),
        }
    },
    ['cannabidiol'] = {
        addictionType = 'Medicine',
        numberOfUse = 1,
        toxicityPerUse = 2,
        animType = 'eating',
        props = {
            model = 'prop_cs_pills',
            bone = 36029,
            offset = vec3(0.075, 0.02, 0.04),
            rotation = vec3(-110.0, -20, 0),
        }
    },
}

Config.treatments = {
    ['naltrexone'] = {
        name = "Naltrexone",
        addictionType = "Alcohol",
        decreaseAddiction = 10,
        dosage = {
            enabled = true, -- if true, if you take more than the max dosage, the player will do overdose and have a coma
            max = 2,
        },
        healthDecrease = 10, -- loose % of life in case you take the medicine at the wrong moment (take only when player feel withdrawl effects)
        badEffects = {
            vomitingChance = 20,
            comaChance = 0,
        }
    },
    ['disulfiram'] = {
        name = "Disulfiram",
        addictionType = "Cocaine",
        decreaseAddiction = 10,
        dosage = {
            enabled = true,
            max = 2,
        },
        healthDecrease = 10, -- loose % of life in case you take the medicine at the wrong moment (take only when player feel withdrawl effects)
        badEffects = {
            vomitingChance = 100,
            comaChance = 0,
        }
    },
    ['methadone'] = {
        name = "Méthadone",
        addictionType = "Heroine",
        decreaseAddiction = 10,
        dosage = {
            enabled = true,
            max = 3,
        },
        healthDecrease = 10, -- loose % of life in case you take the medicine at the wrong moment (take only when player feel withdrawl effects)
        badEffects = {
            vomitingChance = 20,
            comaChance = 0,
        }
    },
    ['bupropion'] = {
        name = "Bupropion",
        addictionType = "Smoking",
        decreaseAddiction = 10,
        dosage = {
            enabled = true,
            max = 2,
        },
        healthDecrease = 10, -- loose % of life in case you take the medicine at the wrong moment (take only when player feel withdrawl effects)
        badEffects = {
            vomitingChance = 20,
            comaChance = 0,
        }
    },
    ['cannabidiol'] = {
        name = "Cannabidiol",
        addictionType = "Weed",
        decreaseAddiction = 10,
        dosage = {
            enabled = true,
            max = 2,
        },
        healthDecrease = 10, -- loose % of life in case you take the medicine at the wrong moment (take only when player feel withdrawl effects)
        badEffects = {
            vomitingChance = 20,
            comaChance = 0,
        }
    }
}

Other Script :
Advanced Drug Dealer Script
Advanced Hooker Script
Advanced Gym Script with real mini games
Street Race Script
Hunting Script

Code is accessible Partially
Subscription-based No
Lines (approximately) +2000
Requirements ox_lib, ox_target
Support Yes
1 Like