🧱 All-in-One Prison System | Cutscenes, Jobs, Escape, Visitation, UI [QB/QBOX/ESX]

:camera_flash: Preview / Showcase:

https://www.youtube.com/watch?v=KirTU0z9NLg

:credit_card: (QBCORE/QBOX/ESX) Buy - $45.99

:credit_card: (QBCORE/QBOX/ESX) Buy Unlocked - $149.99


Welcome to the most advanced and immersive prison experience built for FiveM. Whether you’re looking to overhaul your jail roleplay or add depth to your criminal justice system, this script delivers everything you need and more.

:gear: Core Features

  • Dynamic Sentencing
    Handle everything from short jail time to full life sentences, with automatic time reduction while players are online.

  • Immersive Cutscenes & Cells
    Players don’t just appear in jail β€” they go through a cinematic cutscene and are placed into random prison cells.

  • Prisoner Management Panel
    Easily view and manage all current inmates. Adjust their time, release them, or even block visitation access.

  • Uniform System
    Players are automatically given prison outfits when jailed and restored to their original clothes on release.


:briefcase: Jobs & Activities

  • Interactive Prison Jobs
    Inmates can clean cells, repair facilities, move boxes, or deliver food trays β€” all with custom progress and animations.

  • Minigame-Based Tasks
    Every job has its own minigame for players to complete β€” no more boring progress bars.

  • Earnable Prison Money
    Doing jobs earns you prison currency, which can be spent at the commissary or traded at the black market.


:fire: Escape & Risk

  • Toilet Stashes
    Players can hide contraband in their cell’s toilet β€” fully synced and player-specific.

  • Commissary Shop
    Buy snacks and essentials with prison-earned currency.

  • Black Market & Trade System
    Trade in items or earn illegal tools like explosives or bribes to plan your escape.

  • Two Ways to Escape

    • Explosive Tunnel: Get the materials from jobs, craft a makeshift explosive, and blast through the wall.
    • Bribe & Keycard: Offer a shady guard a bribe. If he accepts, use the keycard to sneak out the back tunnel.
  • Escaped Prisoner System
    If you get caught after escaping, your sentence can be re-applied. Actions have consequences.


:person_standing: Visitation & Community Service

  • Visitation System
    Friends can visit you in jail β€” complete with cutscenes and a countdown timer.

  • Community Service Alternative
    Not all crimes deserve jail. Assign community service tasks instead, with animations and tracking.


:white_check_mark: Compatibility

  • :brain: Works with QBCore, QBOX, and ESX
  • :hammer_and_wrench: Supports ox_inventory, qb-inventory, ps-inventory, and qs-inventory
  • :dart: Compatible with ox_target and qb-target
  • :classical_building: Optimized for GabZ Prison MLO (custom support available)
  • :loudspeaker: Includes Discord Webhook Logging
  • :gear: Fully Configurable β€” change timings, props, locations, minigames, and more
Config
Config = {}

-------------------------------
-- πŸ”§ General Configuration
-------------------------------
Config.Lan = 'en' -- Sets the language for the script. Options: 'en' (English), 'es' (Spanish), 'de' (German), 'fr' (French)

Config.Notifications = "ox_lib"     -- Notification system to use ("ox_lib", "qb-core")
Config.Inventory = "ox_inventory"   -- Inventory system to use ("ox_inventory", "qb-inventory", "qs-inventory", "ps-inventory")
Config.Target = "ox_target"         -- Target system to use ("ox_target", "qb-target")
Config.ProgressBar = "ox_lib" -- ("ox_lib", "qb-core")
Config.Dispatch = "none" -- ("ps-dispatch" / "cd_dispatch" / "qs-dispatch" / "tk_dispatch" / "rcore_dispatch" / "none")

-- Inventory image directory path
Config.InventoryImagePath = "ox_inventory/web/images" -- ("ox_inventory/web/images" / "qb-inventory/html/images" / "ps-inventory/html/images" / "qs-inventory/html/images")

-- Webhook settings for logging
Config.WebHooks = false -- Enable or disable webhook logging. 'false' means logging is disabled.
Config.WebHookURL = "PLACE_YOUR_WEBHOOK_HERE" -- Webhook URL for logging prison-related activities (only used if WebHooks = true)

Config.FineSystem = true            -- Enable or disable fines for prisoners
Config.RequireOfficerNearbyToJail = true         -- Officer must be near player to jail them
Config.RequireOfficerNearbyToRelease = true      -- Officer must be near player to release them
Config.RequireOfficerNearbyToEditSentence = true -- Officer must be near player to modify their sentence
Config.RequiredJobs = { "police" } -- Jobs allowed to handle jail-related tasks
Config.PrisonTickInterval = 60 -- How often (in seconds) a prison sentence is reduced
Config.SentenceReduction = 1   -- Amount of time (in minutes) to reduce sentence every tick

-- Visitation system settings
Config.VisitationRequestDuration = 30 -- Duration (in seconds) the inmate sees the visit request on their screen
Config.VisitationRequestCooldown = 60 -- Cooldown (in seconds) before another visit can be requested
Config.VisitationTime = 60            -- Duration (in seconds) of each visitation period
Config.VisitationCoords = vector4(1828.5759, 2591.8042, 46.0143, 183.6022) -- Coordinates for the visitation room (where the prisoner is teleported during a visit)

-- Blip for the prison location
Config.Blip = {
    Enable = true,
    Coords = vector3(1829.6232, 2605.9277, 45.5662), 
    Sprite = 189,                    
    Display = 4,                            
    Scale = 0.9,                   
    Color = 1,                                  
    Label = "Bolingbroke Penitentiary"       
}

-------------------------------
-- 🍽️ Food System
-------------------------------

Config.PrisonTrayFoods = { -- Items served on the food tray and possible random rewards
    trayItem = "prison_tray", -- Name of the tray item itself
    progressbarDuration = 5000, -- Duration (in milliseconds) of the progress bar for grabbing food
    rewardItems = {
        { name = "sandwich", amount = 1 }, -- Guaranteed item: sandwich
        { name = "water_bottle", amount = 1 }, -- Guaranteed item: water bottle
        { name = "prison_note", amount = 1, chance = 30 }, -- 30% chance to also get prison note
    },
    AvailableHours = { -- Meal serving hours
        morning = {
            startHour = 7,  -- Start of morning meal period
            endHour = 9,    -- End of morning meal period
        },
        evening = {
            startHour = 18, -- Start of evening meal period
            endHour = 20    -- End of evening meal period
        }
    }
}

-------------------------------
-- πŸ‘• Prison Uniform
-------------------------------

Config.PrisonUniform = {
    male = {
        ["t-shirt"] = { item = 15, texture = 0 },
        ["torso"] = { item = 535, texture = 0 },
        ["decals"] = { item = 0, texture = 0 },
        ["arms"] = { item = 11, texture = 0 },
        ["pants"] = { item = 197, texture = 0 },
        ["shoes"] = { item = 12, texture = 0 },
    },
    female = {
        ["t-shirt"] = { item = 14, texture = 0 },
        ["torso"] = { item = 73, texture = 0 },
        ["decals"] = { item = 0, texture = 0 },
        ["arms"] = { item = 4, texture = 0 },
        ["pants"] = { item = 54, texture = 2 },
        ["shoes"] = { item = 5, texture = 0 },
    }
}

-------------------------------
-- πŸšͺ Jail Break Configuration
-------------------------------
Config.ReloadskinOnJailBreak = true -- Reload player skin on successful jailbreak

Config.PrisonZone = { -- This is a poly zone defining the entire prison area. If players leave this zone while jailed, they will be teleported back to their cell.
    vec3(1742.0, 2825.0, 43.0),
    vec3(1862.0, 2717.0, 43.0),
-- REST OF THE CODE HERE
}

Config.tunnelpropDespawn = 1 -- How long (in minutes) the tunnel debris prop stays before despawning
Config.JailBreakCooldown = 30 -- Cooldown (in minutes) before another prison break attempt can be made
Config.ExplosiveItem = 'makeshift_explosive' -- Item required to plant explosives for the jailbreak

Config.BribeGuard = {
    BribeItem = "bribe_package",          -- The item the player must offer to bribe a guard
    BribeReward = "prison_keycard",       -- Item the player receives if the bribe is successful
    BribeChance = 65,                     -- Percentage chance that the bribe will succeed (0-100)
    SentenceAddedOnFail = 10,             -- Number of minutes added to the sentence if the bribe fails
}

Config.PrisonBreakSystem = {
    JailBreakWall = {
        WallCoords = vector4(1624.9685, 2572.9958, 45.5648, 271.7144), -- Location and heading of the wall to blow up
        tunnelDebrisProp = 'prop_pile_dirt_06',                         -- Prop model to use for the blown-up wall effect
        tunnelDebrisCoords = vector3(1625.27, 2572.87, 44.00),         -- Location to spawn the debris prop after explosion
        camOffset = vec(2.0, -2.0, 1.0)                                -- Camera offset for cutscene when planting the explosive
    },
    insideTunnel = {
        TunnelEntrance = vector4(-425.1760, 2064.5227, 120.2182, 97.4857), -- Entry point of the underground tunnel (where the player is teleported to)
        ExitZone = { -- Polygon zone defining the exit area of the tunnel
            vec3(-597.0, 2084.0, 131.0),
            -- REST OF THE CODE HERE
        }
    },
    TunnelExit = {
        coords = vector4(1728.0026, 2829.4392, 42.5128, 308.4384) -- Where the player appears after successfully escaping the tunnel
    }
}

Config.Escapedoordespawn = 1 -- How long (in minutes) the "Enter Escape Door" target is active before despawning
Config.KeycardSwipeCooldown = 45 -- How long (in minutes) before the player can swipe the keycard again

Config.KeycardEscape = {
    Keycard = {
        Coords = vector3(1637.21, 2565.95, 45.85), -- Where the keycard swiper is located
        prop = 'h4_prop_h4_ld_keypad_01', -- Model name for the keycard swiper prop
        ItemRequired = "prison_keycard" -- The required item in inventory to swipe the keycard
    },
    Door = {
        Coords = vector3(1636.35, 2565.87, 45.97) -- The prison door that gets unlocked after swiping the keycard
    },
    insideTunnel = {
        TunnelEntrance = vector4(-483.7166, 1894.8309, 119.8146, 95.0017), -- Entry point of the underground tunnel (where the player is teleported to)
        ExitZone = { -- Polygon zone defining the exit area of the tunnel
            vec3(-597.0, 2084.0, 131.0),
            vec3(-584.0, 2088.0, 131.0),
            vec3(-598.0, 2088.0, 131.0),
        }
    },
    TunnelExit = {
        coords = vector4(1728.0026, 2829.4392, 42.5128, 308.4384) -- Where the player appears after successfully escaping the tunnel
    }
}

-------------------------------
-- πŸ’Ό Prison Jobs & Peds
-------------------------------

Config.PrisonJob = {
    Ped = {
        coords = vector4(1740.5616, 2520.0981, 45.5650, 227.2604),
        model = 's_m_m_prisguard_01', -- Prisoner Worker ped model
        scenario = 'WORLD_HUMAN_CLIPBOARD' -- Ped idle animation
    },
    FoodPickupPed = {
        coords = vector4(1782.3442, 2560.7769, 45.6731, 179.3114),
        model = 's_m_m_strvend_01', -- Prion Employee Worker ped model
        scenario = 'WORLD_HUMAN_STAND_IMPATIENT' -- Ped idle animation

    },
    FrontDeskPed = {
        coords = vector4(1840.3311, 2577.7727, 46.0144, 0.0489),
        model = 's_m_m_prisguard_01', -- Prion Employee Worker ped model
        scenario = 'WORLD_HUMAN_STAND_IMPATIENT' -- Ped idle animation

    },
    CommissaryFood = {
        coords = vector4(1779.5094, 2560.6841, 45.6731, 181.7391),
        model = 'mp_m_securoguard_01',
        scenario = 'WORLD_HUMAN_STAND_IMPATIENT'

    },
    IllegalShopPed = {
        coords = { -- it will select a random
            vector4(1721.7913, 2502.8813, 45.5649, 118.6933),
            vector4(1625.5107, 2566.9346, 45.5648, 96.2189),
            vector4(1625.7917, 2474.8333, 55.1931, 225.8146),
            vector4(1777.4590, 2513.5605, 55.1436, 222.1106),
        },
        model = 'u_m_y_prisoner_01',
        scenario = 'WORLD_HUMAN_LEANING'
    },
    BribeGuardPed = {
        coords = { -- it will select a random
            vector4(1773.7635, 2520.7891, 54.1548, 300.8994),
            vector4(1665.4535, 2503.1833, 44.5700, 320.1962),
            vector4(1655.3390, 2487.7661, 54.1614, 319.7329),
            vector4(1693.5720, 2540.9490, 44.5648, 359.8102),
        },
        model = 's_m_m_prisguard_01',
        scenario = 'WORLD_HUMAN_SMOKING', 
    },
    Jobs = {
        {
            id = "electrician",       -- Unique identifier for this job (do not modify)
            title = "Electrician",    -- Display name of the job
            description = "Repair broken lights and electrical panels in the prison.", -- Short job description
            payRateMin = 5,           -- Minimum pay rate (in your server's currency) for completing the job
            payRateMax = 10,          -- Maximum pay rate for the job
            SentenceReduction = 15,   -- How much prison time (in minutes or months) is reduced for completing the job
            icon = "fa-bolt",         -- FontAwesome icon to represent the job in UIs (if used)
            progressbarDuration = 2500, -- Duration of the progress bar in milliseconds (2.5 seconds)

            -- Possible contraband rewards while doing the job
            ContraBandItems = {
                ['1'] = { item = "circuit_board", amount = 1, chance = 30 }, -- 30% chance to get 1 circuit_board
                ['2'] = { item = "scrap_metal", amount = 2, chance = 20 },   -- 20% chance to get 1 scrap_metal
            },
        },
        {
            id = "move_boxes",
            title = "Move Boxes",
            description = "Transport supply boxes across the facility.",
            payRateMin = 4,
            payRateMax = 8,
            SentenceReduction = 10,
            icon = "fa-box",
            progressbarDuration = 2500,
            ContraBandItems = {
                ['1'] = { item = "scrap_metal", amount = 3, chance = 25 },
                ['2'] = { item = "prison_note", amount = 1, chance = 15 },
            },
        },
        {
            id = "clean_cells",
            title = "Clean Cells",
            description = "Sweep and sanitize prisoner cells to maintain hygiene.",
            payRateMin = 6,
            payRateMax = 10,
            SentenceReduction = 25,
            icon = "fa-broom",
            progressbarDuration = 5000,
            ContraBandItems = {
                ['1'] = { item = "shank_piece", amount = 1, chance = 20 },
                ['2'] = { item = "rag", amount = 1, chance = 25 },
                ['3'] = { item = "soap_bar", amount = 1, chance = 15 },
            },
        },
        {
            id = "repair_walls",
            title = "Facility Repairs",
            description = "Fix cracked walls, damaged floors, and broken televisions.",
            payRateMin = 6,
            payRateMax = 12,
            SentenceReduction = 25,
            icon = "fa-tools",
            progressbarDuration = 2500,
            ContraBandItems = {
                ['1'] = { item = "scrap_metal", amount = 1, chance = 30 },
                ['2'] = { item = "cleaning_chemicals", amount = 1, chance = 20 },
            },
        },
    },
}
-------------------------------
-- πŸ›’ Commissary Shop
-------------------------------

Config.PrisonShop = {
    {
        name = "sandwich",         -- The internal item name (must match your inventory system)
        label = "sandwich",        -- Display name for the item in the shop
        price = 15,                -- Price of the item (currency based on your economy system)
        description = "Fresh made sandwich", -- Short description for the shop UI
        category = "Food",         -- Category for organizing shop items
        limit = 5,                 -- Max number of this item you can buy per transaction
    },
}

Config.IllegalShop = {
    {
        name = "weapon_switchblade", -- The internal item name (must match your inventory system)
        label = "Shank",              -- Display name for the item in the shop
        price = 75,                   -- Price of the item (currency based on your economy system)
        description = "A sharp weapon for defense.", -- Short description for the shop UI
        limit = 2,                    -- Max number of this item you can buy per transaction
    },
   -- REST OF THE CODE HERE
}

Config.IllegalTrades = {
    {
        id = 1, -- Unique identifier for this trade

        -- Items required for the trade
        required = {
            { name = "circuit_board", label = "Circuit Board", amount = 3 }, -- 3 Circuit Boards
            { name = "cleaning_chemicals", label = "Cleaning Chemicals", amount = 6 }, -- 6 Cleaning Chemicals
            { name = "scrap_metal", label = "Scrap Metal", amount = 5 }, -- 5 Scrap Metal
        },

        -- Reward item(s) for completing the trade
        reward = {
            { name = "makeshift_explosive", label = "Makeshift Explosive", amount = 1 } -- 1 Makeshift Explosive
        }
    },
    -- REST OF THE CODE HERE

}

-------------------------------
-- πŸ“¦ Prison Job Props
-------------------------------

Config.JobProps = {
    ElectricianJob = {
        -- Electrical panel
        {
            model = 'm23_1_prop_m31_electricbox_03a', -- Prop model for the electrical job
            coords = vector4(1773.68, 2487.05, 55.65, 30.0497), -- Location and rotation of this prop
        },
        -- REST OF THE CODE HERE
    },
    CleanCells = {
        {
            model = 'ng_proc_food_chips01a',
            coords = vector4(1758.6594, 2484.1870, 46.5611, 103.7450),
        },
       -- REST OF THE CODE HERE
    },
    FacilityRepairs = {
        {
            coords = vector4(1772.04, 2497.45, 46.33, 294.2439)
        },
        -- REST OF THE CODE HERE
    },
    MoveBoxes = {
        BoxLocations = {
        vector4(1739.2025, 2503.4131, 45.5651, 170.0822), -- Starting box location #1
         -- REST OF THE CODE HERE
        },

        BoxModel = 'prop_cs_cardbox_01', -- Model for the box the player carries
        DropoffBoxProp = 'prop_boxpile_01a', -- Model for the dropoff location (pile of boxes)
        DropoffPropCoords = vector4(1756.6708, 2499.4097, 45.7407, 298.6996), -- Where the dropoff prop is placed

        CanJump = false, -- Set to true if you want players to be able to jump while holding a box
        CanSprint = true, -- Set to true if you want players to be able to sprint while holding a box
    }
}

-------------------------------
-- 🧻 Toilet Stashes
-------------------------------

Config.ToiletStashInfo = {
    Enabled = true,     -- Enables the toilet stash system (hidden stash spots inside toilets)
    MaxActive = 3,      -- Maximum number of stash zones to activate at once
    Slots = 5,          -- Number of slots in the stash (like an inventory)
    Weight = 5000       -- Maximum weight of items the stash can hold
}

Config.ToiletStashCoords = { -- All possible stash spawn locations in the prison bathrooms (randomly chosen)
    vector3(1767.72, 2502.99, 45.52),
    vector3(1764.58, 2501.18, 45.53),
    -- REST OF THE CODE HERE
}


-------------------------------
-- ⛏️ Community Service
-------------------------------

Config.ComServCoords = vector4(-1201.7500, -1800.2966, 3.9086, 70.0877) -- Location where players do community service tasks
Config.ComServReleaseCoords = vector4(-1183.0693, -1773.5372, 3.9085, 303.1825) -- Location to release players after community service

Config.ComServProps = {
    { model = "prop_rub_binbag_sd_01" },  -- Trash bag prop
    { model = "prop_cardbordbox_05a" },   -- Cardboard box prop
    { model = "ng_proc_tyre_01" },        -- Old tire prop
}

Config.ComServAnimation = {
    duration = 4500,
    dict = "anim@amb@drug_field_workers@rake@male_a@base",
    anim = "base",
    prop = "prop_tool_broom",
    bone = 28422,
    pos = vector3(-0.01, 0.04, -0.03),
    rot = vector3(0, 0, 0)
}

Config.ComServ = {
    RespawnTime = 10, -- How long (in seconds) before a cleaned prop respawns
    Outline = {
        Enabled = true,                  -- Should props have an outline for players to see them easier?
        Blink = true,                    -- Should the outline blink?
        Color = { r = 72, g = 187, b = 120, a = 255 }, -- Outline color (RGBA)
        Speed = 500                      -- Speed of blinking outline in ms
    },
    CleaningScenario = "WORLD_HUMAN_JANITOR", -- Animation scenario while cleaning

    CommunityServicePolyZone = { -- Polygon zone for the entire community service area
        vec3(-1587.0, -1085.0, 6.0),
         -- REST OF THE CODE HERE
    }
}

Config.ComServTrash = {
    vector4(-1209.7437, -1830.4808, 2.5593, 127.4095), -- Location of the trash disposal or drop-off
    -- REST OF THE CODE HERE
}

-------------------------------
-- πŸšͺ Cells, Cutscene, Release
-------------------------------

Config.ReleaseCoords = vector4(1846.4813, 2586.0027, 45.6727, 274.5671) -- Where the player is teleported when released from prison
Config.CutsceneCell = vector4(1747.6288, 2489.1650, 49.5149, 29.4475)  -- Cell used for cutscene teleport (e.g., intro to prison scene)

Config.CellsLoc = { -- All possible cell spawn locations for prisoners
    vector4(1767.9493, 2500.9873, 45.7407, 203.8192), -- 1
    -- REST OF THE CODE HERE
}
Screenshots




Code is accessible Yes
Subscription-based No
Lines (approximately) 4000
Requirements QBCore / QBox / ESX
Support Yes

Other Resources:
Crafting System
Weed Growing
Oxy Run
Most Advance & Unique Drug Selling System
Mining Script
Money Wash Script
Black Market Script

3 Likes

Amazing work! Highly recommend all of their scripts!

1 Like

β€œDYNYX5” for 5% OFF!

25% Sale use code β€œprison”. Only a few uses left on the code.

Get the bundle here: https://www.dynyxscripts.com/package/6757486

Use code CELLBLOCK25 for 25% OFF this script. There are only 2 uses left on this code.

1 use left on the 25% off code CELLBLOCK25

1 Use of on 25% off

Active 15% Off Sale Right now

15% off Sale right now

Supports all dispatch systems

Use Code DYNYX5 for 5% OFF!

Use Code DYNYX5 for 5% OFF!!

Just a reminder, You can still get 25% off the prison system Today! Just use code BREAKOUT25 at checkout! 1 uses left on this coupon!

Escrowed – $29.99 β†’ $22.49
Unlocked – $44.99 β†’ $33.74

:brick: Prison System: Update 1.2

  • :blue_book: New Docs Page: Exports & Usage
  • :jigsaw: Added Export Support – integrate the prison system with your MDTs, admin tools, and more
  • :globe_with_meridians: UI Locale Support – fully customize in-game UI text via config
  • :computer: New Tablet Item: prison_tablet to open the Prison Management UI
  • :clapper: Release Cutscene Now Configurable – Easily change teleport location, camera, and walk route config.lua

Check the docs and config to start customizing!

:brick: Prison System - Update 1.2.5

:wrench: Changelog:

  • :soap: Fixed issue where the community service prop would remain stuck in hand after completing all trash tasks.
  • :plate_with_cutlery: Fixed food tray usability for QB, PS, and QS inventory systems.
  • :school_satchel: Fixed issue preventing players from retrieving confiscated items on QB, PS, and QS inventories.
  • :bug: Major bug fixes and performance improvements across the board.

Thanks for your continued support β€” more updates coming soon!

15% off Sale active right now! @ www.dynyxscripts.com

:brick: Prison System - Update 1.3

  • :sparkles: Improved Item Retrieval: Player items are now added instead of replaced into the SQL.
  • :hammer_and_wrench: Prison Job Fixes: Corrected Z-axis coordinates for all prison job locations.
  • :clapper: Cutscene Control: Disabled player movement during the release cutscene for a smoother experience.
  • :tshirt: Uniform Configuration: Enhanced prison uniform settings for better customization and consistency.

:brick: Prison System - Update 1.3.5

  • :hammer_and_wrench: Fixed an issue where players were not being released after completing a prison job
  • :door: Improved prison release system for more accurate and reliable
  • :satellite: Added support for kartik-dispatch and loverp-emergencydispatch systems

:brick: Prison System - Update 1.3.8

  • Resolved an issue where players were only receiving a portion of their confiscated items when using the Prison Item Retrieval system.
    NOTE: You’ll need to update the SQL file to apply this fix properly.