# Jota Dev GYM System

<figure><img src="/files/vTudQOUDSooYpKZqfFX2" alt=""><figcaption></figcaption></figure>

How to start the script for its correct operation:

**Put in your server.cfg**

```markdown
# JotaDev GYM System
ensure lb-phone
ensure qs-smartphone-pro
ensure 17mov_Phone
ensure codem-phone
....
ensure jc_gym
ensure jc_gym_app_x
ensure jc_gym_mlo
```

***

**Gym Script Settings:**

{% tabs %}
{% tab title="Setting" %}
{% code expandable="true" %}

```lua
Config = {}

Config.Framework = 'auto'  -- 'esx', 'qb', 'auto' or 'standalone'

Config.Notify = {
    Notification = 'ox_lib' -- 'ox_lib'  // 'esx_framework' // 'qb-core'
}

--[[  
Configure your language using the following:
    'es' -> Spanish
    'en' -> English
    'fr' -> French
    'de' -> German
    'it' -> Italian
    'pt' -> Portuguese
]]
Config.Locale = 'en'

Config.System = 'press' -- 'press' or 'target' | (ox_target or qb-target)

Config.Gyms = { -- Complete gym setup
    {
        enabled     = true, -- Activate or deactivate the gym location
        id          = "downtown",
        name        = "Downtown Gym", -- GYm name
        coords      = vec3(-285.48, -429.90, 49.77), -- Gym coords
        rating      = 4, -- Gym rating
        accessRadius = 60.0,
        blip = {
            enabled    = true,
            coords     = vec3(-285.48, -429.90, 49.77),
            sprite     = 311,
            display    = 4,
            scale      = 0.85,
            colour     = 1,
            shortRange = true,
        },
        shop = {
            coords   = vec4(-305.33, -428.79, 29.46, 357.39), -- Supplement store coordinates
            pedModel = `a_m_y_stbla_01`, -- Supplement store ped model
        },
        business = { -- Gym business system
            enabled           = true,
            job               = "gym_downtown", -- Gym job
            allowedRoles      = { "boss", "employee" }, -- Grades of gym work that will be available for work
            adminRoles        = { "boss" }, -- Boss Grade of the gym
            payrollIntervalMs = 2 * 60 * 60 * 1000,
            owner             = nil,
            panelLabel        = "Downtown gym business",
            panelCoords       = vec4(-308.47, -437.37, 30.46, 2.97), -- Gym business panel coordinates
            membershipPrice   = { weekly = 500, monthly = 1500 }, -- Gym membership prices
            membershipDays    = { weekly = 7, monthly = 30 },
        },
    },
    {
        enabled     = true,
        id          = "shores",
        name        = "Shores Gym",
        coords      = vec3(1177.36, 3590.14, 34.91),
        rating      = 3,
        accessRadius = 60.0,
        blip = {
            enabled    = true,
            coords     = vec3(1177.36, 3590.14, 34.91),
            sprite     = 311,
            display    = 4,
            scale      = 0.85,
            colour     = 1,
            shortRange = true,
        },
        shop = {
            coords   = vec4(1204.85, 3580.78, 36.25, 90.09),
            pedModel = `a_m_y_stbla_01`,
        },
        business = {
            enabled           = true,
            job               = "gym_shores",
            allowedRoles      = { "boss", "employee" },
            adminRoles        = { "boss" },
            payrollIntervalMs = 2 * 60 * 60 * 1000,
            owner             = nil,
            panelLabel        = "Shores gym business",
            panelCoords       = vec4(1213.53, 3578.38, 37.25, 88.64),
            membershipPrice   = { weekly = 500, monthly = 1500 },
            membershipDays    = { weekly = 7, monthly = 30 },
        },
    },
    {
        enabled     = true,
        id          = "paleto",
        name        = "Paleto Gym",
        coords      = vec3(-95.96, 6598.42, 30.31),
        rating      = 5,
        accessRadius = 60.0,
        blip = {
            enabled    = true,
            coords     = vec3(-95.96, 6598.42, 30.31),
            sprite     = 311,
            display    = 4,
            scale      = 0.85,
            colour     = 1,
            shortRange = true,
        },
        shop = {
            coords   = vec4(-89.51, 6605.11, 29.30, 132.18),
            pedModel = `a_m_y_stbla_01`,
        },
        business = {
            enabled           = true,
            job               = "gym_paleto",
            allowedRoles      = { "boss", "employee" },
            adminRoles        = { "boss" },
            payrollIntervalMs = 2 * 60 * 60 * 1000,
            owner             = nil,
            panelLabel        = "Paleto gym business",
            panelCoords       = vec4(-81.52, 6609.46, 30.30, 138.61),
            membershipPrice   = { weekly = 500, monthly = 1500 },
            membershipDays    = { weekly = 7, monthly = 30 },
        },
    },
}

Config.Supplements = { -- Supplement store setup
    {
        key            = "protein",
        itemName       = "gym_protein",
        label          = "Protein",
        price          = 150,
        durationMin    = 60,
        gainMultiplier = 1.5,
    },
    {
        key              = "preworkout",
        itemName         = "gym_preworkout",
        label            = "Pre-workout",
        price            = 180,
        durationMin      = 45,
        stressReduction  = 0.25,
        fatigueReduction = 0.30,
        gainMultiplier   = 1.0,
    },
    {
        key            = "creatine",
        itemName       = "gym_creatine",
        label          = "Creatine",
        price          = 200,
        durationMin    = 90,
        staminaSave    = 0.4,
        recoveryBoost  = 1.4,
        gainMultiplier = 1.0,
    },
}

Config.Rebound = {
    ThresholdDays   = 7,
    DecayPerDay     = 1.0,
    MaxDecay        = 30.0,
    StatsDecay      = { "power", "durability", "energy" },
    UseOverlay      = true,
    OverlayStrength = 0.9,
}

--[[ 
   Fatness settings, you can activate or deactivate it; what this does is change the variations of your face if the player stops taking care of themselves physically by not exercising
]]
Config.PedFat = { 
    Enabled             = false, -- Activate or deactivate the fatness system
    AdvanceMs           = 60 * 60 * 1000,
    FaceFeatureIndices  = { 9, 10, 12, 13, 14, 15, 17, 19 },
    Variations = {
        [1] = {
            faceFeatures = {
                [9]  = 0.0,
                [10] = 0.0,
                [12] = 0.0,
                [13] = 0.0,
                [14] = 0.0,
                [15] = 0.0,
                [17] = 0.0,
                [19] = 0.0,
            },
        },
        [2] = {
            faceFeatures = {
                [9]  = 0.15,
                [10] = 0.25,
                [12] = 0.15,
                [13] = 0.20,
                [14] = 0.20,
                [15] = 0.15,
                [17] = 0.30,
                [19] = 0.35,
            },
        },
        [3] = {
            faceFeatures = {
                [9]  = 0.40,
                [10] = 0.55,
                [12] = 0.35,
                [13] = 0.45,
                [14] = 0.45,
                [15] = 0.40,
                [17] = 0.60,
                [19] = 0.65,
            },
        },
        [4] = {
            faceFeatures = {
                [9]  = 0.70,
                [10] = 0.85,
                [12] = 0.60,
                [13] = 0.75,
                [14] = 0.75,
                [15] = 0.70,
                [17] = 0.90,
                [19] = 0.90,
            },
        },
        [5] = {
            faceFeatures = {
                [9]  = 1.0,
                [10] = 1.0,
                [12] = 1.0,
                [13] = 1.0,
                [14] = 1.0,
                [15] = 1.0,
                [17] = 1.0,
                [19] = 1.0,
            },
        },
    },
}

Config.EventCategories = { "ALL", "GFX", "MUSCLE", "BICYCLE", "RUNNING", "WEIGHTS" }

Config.SeedEvents = {
    { title = "Dumbbell Lifts", category = "WEIGHTS", hoursFromNow = 24 },
    { title = "Weight Lifting", category = "MUSCLE",  hoursFromNow = 48 },
    { title = "Muscle Up",      category = "MUSCLE",  hoursFromNow = 72 },
}

Config.Achievements = {
    { key = "first_core_workout", title = "FIRST CORE WORKOUT", description = "Complete your first core workout.",   target = 2,  icon = "bicep" },
    { key = "week_streak_4",      title = "DAY STREAK",          description = "Train 7 days in a row.",              target = 7,  icon = "flame" },
    { key = "top_100_climber",    title = "TOP 100 CLIMBER",     description = "Break into the top 100 leaderboard.", target = 1,  icon = "trophy" },
    { key = "pull_up_pro",        title = "PULL-UP PRO",         description = "Complete 50 pull-ups.",               target = 50, icon = "arm" },
    { key = "heavy_lifter",       title = "HEAVY LIFTER",        description = "Lift 3 heavy sessions.",              target = 3,  icon = "dumbbell" },
}

Config.DailyTasks = {
    { key = "session_count",  title = "Train once today",      target = 1 },
    { key = "rep_count",      title = "Do 50 reps today",      target = 50 },
}

Config.Phone = {
    LeaderboardSize = 10,
    NotificationsLimit = 20,
    EventsLimit = 20,
    SeedOnStart = true,
}

Config.Account = {
    Salt            = "jc_gym_default_salt_change_me",
    UsernameMinLen  = 3,
    UsernameMaxLen  = 20,
    PasswordMinLen  = 6,
    PasswordMaxLen  = 72,
    Plans           = { "weekly", "monthly" },
    DefaultPlan     = "monthly",
}

Config.Commands = {
    resetaccount = "resetaccount",
    resetstats   = "resetstatistics",
    permissions = {
        checkFrameworkGroups = true,
        groups = {
            ace = { "admin", "superadmin" },
            esx = { "superadmin", "admin", "owner" },
            qb  = { "god", "admin" },
        },
    },
}

Config.Debug = false -- Activate or deactivate the debug mode, dont touch this if you dont know what you are doing

```

{% endcode %}
{% endtab %}

{% tab title="Exercises" %}
{% code expandable="true" %}

```lua
Config.MachineSpots = {
    { gymId = "downtown", model = `jc_gym_bench`,    coords = vec3(-287.08, -434.43, 30.42), heading = 264.9, radius = 2.0 },
    { gymId = "downtown", model = `jc_gym_bench`,    coords = vec3(-286.89, -432.25, 30.42), heading = 264.9, radius = 2.0 },
    { gymId = "downtown", model = `jc_gym_bench`,    coords = vec3(-286.71, -430.14, 30.42), heading = 264.9, radius = 2.0 },
    { gymId = "downtown", model = `jc_gym_machine2`, coords = vec3(-289.76, -444.38, 30.73), heading = 175.0, radius = 2.0 },
    { gymId = "downtown", model = `jc_gym_machine2`, coords = vec3(-284.87, -433.94, 30.73), heading = 174.9, radius = 2.0 },
    { gymId = "downtown", model = `jc_gym_machine2`, coords = vec3(-284.60, -430.94, 30.73), heading = 174.9, radius = 2.0 },
    { gymId = "downtown", model = `jc_gym_machine6`, coords = vec3(-287.09, -438.63, 30.45), heading = 265.0, radius = 2.0 },
    { gymId = "downtown", model = `jc_gym_machine6`, coords = vec3(-287.36, -441.61, 30.45), heading = 265.0, radius = 2.0 },
    { gymId = "downtown", model = `jc_gym_pole1`,    coords = vec3(-311.96, -429.32, 31.74), heading = 355.0, radius = 2.0 },
    { gymId = "downtown", model = `jc_gym_pole1`,    coords = vec3(-311.83, -427.81, 31.74), heading = 355.0, radius = 2.0 },
    { gymId = "downtown", model = `jc_gym_pole1`,    coords = vec3(-311.70, -426.31, 31.74), heading = 355.0, radius = 2.0 },

    { gymId = "paleto", model = `jc_gym_bench`,    coords = vec3(-102.84, 6617.95, 30.20), heading = 45.0,  radius = 2.0 },
    { gymId = "paleto", model = `jc_gym_bench`,    coords = vec3(-101.34, 6619.45, 30.20), heading = 45.0,  radius = 2.0 },
    { gymId = "paleto", model = `jc_gym_bench`,    coords = vec3(-99.80,  6621.00, 30.20), heading = 45.0,  radius = 2.0 },
    { gymId = "paleto", model = `jc_gym_machine6`, coords = vec3(-97.09,  6624.21, 30.29), heading = 45.0,  radius = 2.0 },
    { gymId = "paleto", model = `jc_gym_machine6`, coords = vec3(-94.97,  6626.33, 30.29), heading = 45.0,  radius = 2.0 },
    { gymId = "paleto", model = `jc_gym_machine2`, coords = vec3(-91.35,  6626.91, 30.57), heading = 315.0, radius = 2.0 },
    { gymId = "paleto", model = `jc_gym_machine2`, coords = vec3(-101.81, 6622.04, 30.57), heading = 315.0, radius = 2.0 },
    { gymId = "paleto", model = `jc_gym_machine2`, coords = vec3(-103.94, 6619.92, 30.57), heading = 315.0, radius = 2.0 },
    { gymId = "paleto", model = `jc_gym_pole1`,    coords = vec3(-84.47,  6600.36, 31.59), heading = 315.0, radius = 2.0 },
    { gymId = "paleto", model = `jc_gym_pole1`,    coords = vec3(-85.54,  6599.29, 31.59), heading = 315.0, radius = 2.0 },
    { gymId = "paleto", model = `jc_gym_pole1`,    coords = vec3(-83.40,  6601.43, 31.59), heading = 315.0, radius = 2.0 },

    { gymId = "shores", model = `jc_gym_bench`,    coords = vec3(1204.46, 3599.50, 37.21), heading = 0.0,   radius = 2.0 },
    { gymId = "shores", model = `jc_gym_bench`,    coords = vec3(1206.58, 3599.50, 37.21), heading = 0.0,   radius = 2.0 },
    { gymId = "shores", model = `jc_gym_bench`,    coords = vec3(1208.77, 3599.51, 37.21), heading = 0.0,   radius = 2.0 },
    { gymId = "shores", model = `jc_gym_machine6`, coords = vec3(1212.96, 3599.86, 37.20), heading = 0.0,   radius = 2.0 },
    { gymId = "shores", model = `jc_gym_machine6`, coords = vec3(1215.95, 3599.86, 37.20), heading = 0.0,   radius = 2.0 },
    { gymId = "shores", model = `jc_gym_machine2`, coords = vec3(1218.92, 3597.71, 37.52), heading = 270.0, radius = 2.0 },
    { gymId = "shores", model = `jc_gym_machine2`, coords = vec3(1208.08, 3601.67, 37.52), heading = 270.0, radius = 2.0 },
    { gymId = "shores", model = `jc_gym_machine2`, coords = vec3(1205.08, 3601.67, 37.52), heading = 270.0, radius = 2.0 },
    { gymId = "shores", model = `jc_gym_pole1`,    coords = vec3(1194.83, 3602.34, 38.52), heading = 180.0, radius = 2.0 },
    { gymId = "shores", model = `jc_gym_pole1`,    coords = vec3(1194.83, 3603.83, 38.52), heading = 180.0, radius = 2.0 },
    { gymId = "shores", model = `jc_gym_pole1`,    coords = vec3(1194.83, 3605.33, 38.52), heading = 180.0, radius = 2.0 },
    { gymId = "shores", model = `jc_gym_pole1`,    coords = vec3(1197.22, 3602.33, 38.52), heading = 360.0, radius = 2.0 },
    { gymId = "shores", model = `jc_gym_pole1`,    coords = vec3(1197.22, 3603.83, 38.52), heading = 360.0, radius = 2.0 },
    { gymId = "shores", model = `jc_gym_pole1`,    coords = vec3(1197.22, 3605.33, 38.52), heading = 360.0, radius = 2.0 },
}

Config.MachinesWithoutMembership = { -- This is the machines that are not available for members
--    { model = `jc_gym_bench`, propModel = `jc_gym_machine2`, propCoords = vec4(1640.40, 2529.03, 44.56, 292.82), pedCoords = vec4(1640.40, 2529.03, 45.56, 292.82), radius = 2.0 },
--    { model = `jc_gym_machine2`, propModel = `jc_gym_machine2`, propCoords = vec4(1634.50, 2520.50, 45.56, 270.0), pedCoords = vec4(1634.50, 2520.50, 45.56, 270.0), radius = 2.0 },
--    { model = `jc_gym_machine6`, propModel = `jc_gym_machine6`, coords = vec4(1632.93, 2518.28, 45.56, 87.63), radius = 2.0 },
--    { model = `jc_prop_bigarm`, coords = vec4(1624.67, 2526.54, 43.85, 306.35), radius = 2.0 },
--    { model = `jc_prop_legs`, coords = vec4(1628.50, 2520.00, 45.56, 180.0), radius = 2.0 },
--    { model = `jc_prop_bike`, coords = vec4(1631.00, 2523.50, 45.56, 270.0), radius = 2.0 },
--    { model = `jc_prop_frontarm`, coords = vec4(1626.50, 2522.00, 45.56, 90.0), radius = 2.0 },
--    { model = `jc_prop_armstand`, coords = vec4(1629.00, 2525.50, 45.56, 0.0), radius = 2.0 },
--    { model = `jc_prop_press`, coords = vec4(1627.00, 2524.50, 45.56, 270.0), radius = 2.0 },
--    { model = `jc_prop_pressleg`, coords = vec4(1630.50, 2521.50, 45.56, 180.0), radius = 2.0 },
--    { model = `jc_prop_speedbag`, coords = vec4(1625.00, 2519.00, 45.56, 45.0), radius = 2.0 },
--    { model = `jc_prop_treadmill`, coords = vec4(1633.50, 2524.00, 45.56, 90.0), radius = 2.0 },
}

Config.Exercises = {
    {
        name            = "Big Arm Machine",
        staticModel     = `jc_prop_bigarm`,
        animModel       = `jc_prop_bigarm`,
        pedDict         = "jc@bigarm",
        pedClip         = "clip",
        propDict        = "jc@propbigarm",
        propClip        = "propbigarm_anim",
        propOffset      = { x = 0.0, y = 0.0, z = -0.8, rx = 0.0, ry = 0.0, rz = 0.0 },
        attachOffset    = { x = 0.0, y = -0.18, z = 0.95, rx = 0.0, ry = 0.0, rz = 0.0 },
        finishOffset    = { x = 0.0, y = 1.5, z = 0.0 },
        cycleDurationMs = 3319.66675,
        pauseMs         = 0,
    },

    {
        name            = "Leg Curl Machine",
        staticModel     = `jc_prop_legs`,
        animModel       = `jc_prop_legs`,
        pedDict         = "jc@legs",
        pedClip         = "clip",
        propDict        = "jc@proplegs",
        propClip        = "proplegs_anim",
        propOffset      = { x = 0.0, y = 0.0, z = -0.52, rx = 0.0, ry = 0.0, rz = 0.0 },
        attachOffset    = { x = 0.0, y = -0.1, z = 0.55, rx = 0.0, ry = 0.0, rz = 0.0 },
        finishOffset    = { x = 0.0, y = -1.0, z = 0.0 },
        cycleDurationMs = 1933.3,
        pauseMs         = 0,
    },

    {
        name            = "Exercise Bike",
        staticModel     = `jc_prop_bike`,
        animModel       = `jc_prop_bike`,

        pedDict         = "jc@bike",
        pedClip         = "clip",

        propDict        = "jc@propbike",
        propClip        = "propbike_anim",

        propOffset      = { x = 0.0, y = 0.0, z = -0.13, rx = 0.0, ry = 0.0, rz = 0.0 },

        attachOffset    = { x = 0.0, y = -0.20, z = 1.28, rx = 0.0, ry = 0.0, rz = 0.0 },
        finishOffset    = { x = 0.0, y = -1.2, z = 0.0 },

        continuousUntilStop = true,
        sessionDurationMs   = 30000,

        cycleDurationMs = 1275,
        pauseMs         = 0,
    },

    {
        name            = "Front Pull Machine",
        staticModel     = `jc_prop_frontarm`,
        animModel       = `jc_prop_frontarm`,

        pedDict         = "jc@frontarm",
        pedClip         = "clip",

        propDict        = "jc@propfrontarm",
        propClip        = "propfrontarm_anim",

        propOffset      = { x = 0.0, y = 0.0, z = -0.95, rx = 0.0, ry = 0.0, rz = 0.0 },

        attachOffset    = { x = 0.0, y = -1.15, z = 0.78, rx = 0.0, ry = 0.0, rz = 0.0 },
        finishOffset    = { x = 0.0, y = -1.5, z = 0.0 },

        cycleDurationMs = 3400,
        pauseMs         = 0,
    },

    {
        name            = "Arm Stand Machine",
        staticModel     = `jc_prop_armstand`,
        animModel       = `jc_prop_armstand`,

        pedDict         = "jc@armstand",
        pedClip         = "clip",

        propDict        = "jc@proparmstand",
        propClip        = "proparmstand_anim",

        propOffset      = { x = 0.0, y = 0.0, z = -0.7, rx = 0.0, ry = 0.0, rz = 0.0 },

        attachOffset    = { x = 0.0, y = -1.08, z = 1.0, rx = 0.0, ry = 0.0, rz = 0.0 },
        finishOffset    = { x = 0.0, y = -1.5, z = 0.0 },

        cycleDurationMs = 2900,
        pauseMs         = 0,
    },

    {
        name            = "Chest Press",
        staticModel     = `jc_prop_press`,
        animModel       = `jc_prop_press`,

        pedDict         = "jc@press",
        pedClip         = "clip",

        propDict        = "jc@proppress",
        propClip        = "proppress_anim",

        propOffset      = { x = 0.0, y = 0.0, z = -0.4, rx = 0.0, ry = 0.0, rz = 0.0 },

        attachOffset    = { x = 0.0, y = -0.65, z = 1.02, rx = 0.0, ry = 0.0, rz = 180.0 },
        finishOffset    = { x = 0.0, y = -1.5, z = 0.0 },

        cycleDurationMs = 3566.66675,
        pauseMs         = 0,
    },

    {
        name            = "Leg Press",
        staticModel     = `jc_prop_pressleg`,
        animModel       = `jc_prop_pressleg`,

        pedDict         = "jc@pressleg",
        pedClip         = "clip",

        propDict        = "jc@proppressleg",
        propClip        = "proppressleg_anim",

        propOffset      = { x = 0.0, y = 0.0, z = 0.0, rx = 0.0, ry = 0.0, rz = 0.0 },

        attachOffset    = { x = 0.0, y = -0.45, z = 0.4, rx = 0.0, ry = 0.0, rz = 0.0 },
        finishOffset    = { x = 0.0, y = -1.5, z = 0.0 },

        cycleDurationMs = 2900,
        pauseMs         = 0,
    },

    {
        name            = "Speedbag",
        staticModel     = `jc_prop_speedbag`,
        animModel       = `jc_prop_speedbag`,

        pedDict         = "jc@speedbag",
        pedClip         = "speedbag_anim",

        propDict        = "jc@propspeedbag",
        propClip        = "propspeedbag_anim",

        propOffset      = { x = 0.0, y = 0.0, z = -1.13, rx = 0.0, ry = 0.0, rz = 0.0 },

        attachOffset    = { x = 1.5, y = 0.0, z = 0.0, rx = 0.0, ry = 0.0, rz = -90.0 },
        finishOffset    = { x = 1.5, y = 0.0, z = -1.3 },

        continuousUntilStop = true,
        sessionDurationMs   = 25000,

        cycleDurationMs = 6566.66651,
        pauseMs         = 0,
    },

    {
        name            = "Treadmill",
        staticModel     = `jc_prop_treadmill`,
        animModel       = `jc_prop_treadmill`,

        pedDict         = "amb@world_human_jog@male@base",
        pedClip         = "base",

        propDict        = "jc@proptreadmill",
        propClip        = "proptreadmill_anim",

        propOffset      = { x = 0.0, y = 0.0, z = 0.0, rx = 0.0, ry = 0.0, rz = 0.0 },

        attachOffset    = { x = 0.0, y = 0.10, z = 1.15, rx = 0.0, ry = 0.0, rz = 180.0 },
        finishOffset    = { x = 0.0, y = 1.0, z = 0.0 },

        continuousUntilStop = true,
        sessionDurationMs   = 30000,

        cycleDurationMs = 633.333266,
        pauseMs         = 0,
    },

    {
        name                       = "Bench press",
        staticModel                = `jc_gym_bench`,
        useWorldProp               = true,
        benchPressVanilla          = true,
        attachOffset               = { x = 0.0, y = -0.2, z = -1.2, rx = 0.0, ry = 0.0, rz = 180.0 },
        propOffset                 = { x = 0.0, y = -0.2, z = -1.2, rx = 0.0, ry = 0.0, rz = 180.0 },
        pedDict                    = "amb@prop_human_seat_muscle_bench_press@base",
        pedClip                    = "base",
        pedRepDict                 = "amb@prop_human_seat_muscle_bench_press@idle_a",
        pedRepClip                 = "idle_a",
        cycleDurationMs            = 2358.333,
        finishOffset               = { x = 0.0, y = -1.5, z = 0.0 },
        pedAttachedProp            = {
            model            = `prop_barbell_100kg`,
            bone             = 57005,
            attachRotOrder   = 1,
            attachEmoteStyle = true,
            pos              = { 0.17, 0.33, 0.0 },
            rot              = { -43.0, -43.0, -103.0 },
        },
    },

    {
        name            = "Seated dumbbell bench",
        staticModel     = `jc_gym_machine2`,
        useWorldProp    = true,
        pedDict               = "sport@chairdumbell@clip",
        pedClip               = "chairdumbell_clip",
        propOffset            = { x = -0.6, y = 0.0, z = -0.5, rx = 0.0, ry = 0.0, rz = 90.0 },
        attachOffset          = { x = -0.6, y = 0.0, z = -0.5, rx = 0.0, ry = 0.0, rz = 90.0 },
        finishOffset          = { x = 0.0, y = 1.2, z = 0.0 },
        cycleDurationMs = 2666.66665,
        pauseMs         = 0,
        pedAttachedProp = {
            model = `prop_barbell_01`,
            bone  = 36029,
            pos   = { 0.021450157002846, -0.0032699671836822, 0.034374998675588 },
            rot   = { 4.1912984833903, 26.62854280899, -104.34350633988 },
        },
    },

    {
        name                       = "Squat dumbbell station",
        staticModel                = `jc_gym_machine6`,
        useWorldProp               = true,
        pedDict                    = "sport@squatdumbell@clip",
        pedClip                    = "squatdumbell_clip",
        propOffset                 = { x = 0.0, y = -0.2, z = 0.0, rx = 0.0, ry = 0.0, rz = 180.0 },
        attachOffset               = { x = 0.0, y = -0.2, z = 0.0, rx = 0.0, ry = 0.0, rz = 180.0 },
        finishStayInPlace          = true,
        cycleDurationMs            = 2566.66675,
        pauseMs                    = 0,
        pedAttachedProp            = {
            model            = `prop_barbell_60kg`,
            bone             = 36029,
            attachRotOrder   = 1,
            placement        = {
                0.051818715229842, 0.45560659566368, 0.070334339731222,
                -40.2573161652, -38.781532238504, 83.635803718805,
            },
        },
    },

    {
        name                       = "Abdominal",
        staticModel                = `jc_gym_pole1`,
        useWorldProp               = true,
        pedDict                    = "jc@abdo",
        pedClip                    = "clip",
        propOffset                 = { x = -0.07, y = 0.0, z = -2.5, rx = 0.0, ry = 0.0, rz = -90.0 },
        attachOffset               = { x = -0.07, y = 0.0, z = -3.05, rx = 0.0, ry = 0.0, rz = -90.0 },
        finishStayInPlace          = true,
        cycleDurationMs            = 2400,
        pauseMs                    = 0,
    },

    {
        name                  = "Boxing",
        staticModel           = `jc_prop_pbag`,
        boxing                = true,
        boxingOffset          = { x = 0.2, y = 0.8, z = 0.0, heading = 0.0 },
        boxingAnims           = {
            { ped = "pbaganims_lefth", prop = "proppbag_leftbounce" },
            { ped = "pbaganims_righth", prop = "proppbag_rightbounce" },
            { ped = "pbaganims_combop", prop = "proppban_combobounce" },
        },
        finishOffset     = { x = 0.0, y = 1.0, z = 0.0 },
    },

    {
        kind            = "free_zone",
        name            = "Free zone",
        interactRadius  = 2.0,
        zones           = {
            { gymId = "downtown", coords = vector3(-285.48, -429.90, 34.20), radius = 2.5 },
            { gymId = "paleto", coords = vector3(-104.4943, 6619.4277, 34.0395), heading = 221.0976, radius = 2.5 },
            { gymId = "shores", coords = vector3(1204.5992, 3601.6353, 40.9898), heading = 355.1926, radius = 2.5 },
        },
        activities      = {
            {
                id          = "jumping_jack",
                pedDict     = "sport@jumpingjack@clip",
                pedClip     = "jumpingjack_clip",
            },
            {
                id                 = "yoga",
                scenario           = "world_human_yoga",
                scenarioDurationMs = 12000,
            },
            {
                id                 = "squat",
                pedDict            = "sport@squat@clip",
                pedClip            = "squat_clip",
                cycleDurationMs    = 4000,
                idleLoopPhaseMax   = 0.06,
                idleLoopPeriodMs   = 2200,
                idleHoldPhase      = 0.0,
            },
        },
    },

    {
        name = "Boxing Area",
        kind = "free_zone",
        interactRadius = 2.5,
        zones = {
            { gymId = "downtown", coords = vec3(-285.0331, -448.3156, 34.1841), radius = 5.0 },
            { gymId = "paleto", coords = vec3(-93.4763, 6632.1953, 34.0245), heading = 139.2361, radius = 5.0 },
            { gymId = "shores", coords = vec3(1221.3088, 3603.2642, 40.9743), heading = 319.8873, radius = 5.0 },
        },
        activities = {
            { id = "shadow_boxing" }
        }
    },
}

```

{% endcode %}
{% endtab %}

{% tab title="Minigames" %}
{% code expandable="true" %}

```lua
Config.Minigames = {
    Enabled         = true,
    FailMultiplier  = 0.3,
    SuccessBonusMax = 1.5,
    RhythmRounds    = 5,
    RhythmWindowMs  = 250,
    ForceBarSeconds = 8,
    ForceBarZoneMin = 0.35,
    ForceBarZoneMax = 0.65,
    KeyseqLength    = 5,
    KeyseqTimeoutMs = 4000,

    NuiTypes        = {
        squat     = true,
        bench     = true,
        curl      = true,
        biceps    = true,
        back      = true,
        shoulders = true,
        triceps   = true,
        abs       = true,
        cardio    = true,
        endurance = true,
    },
    Variant         = "A",
    Reps            = 5,
    Tempo           = 2200,
    MissFatigue     = 2.0,
    MissStress      = 1.0,
}
```

{% endcode %}
{% endtab %}

{% tab title="Stats" %}
{% code expandable="true" %}

```lua
Config.Stats = {
    Max = 100,
    Min = 0,
}

Config.Fatigue = {
    Max             = 100.0,
    PerRep          = 3.0,
    RecoverPerTick  = 0.12,
    RecoverTickMs   = 1000,
    SoftCap         = 70.0,
    HardCap         = 95.0,
    SoftCapPenalty  = 0.5,
    HardCapPenalty  = 0.2,
}

Config.Stress = {
    Max                = 100.0,
    PerRep             = 1.0,
    IdleGrowPerTick    = 0.0,
    IdleDecayPerTick   = 0.10,
    IdleTickMs         = 1000,
    SoftCap            = 75.0,
    HardCap            = 100.0,
    SoftCapPenalty     = 0.7,
    HardCapPenalty     = 0.2,
    ResetOnEndSession  = false,
}

Config.ExerciseStats = {
    default         = { targetStat = "power",      repGain = 1.0, repFatigue = 4.0, repStress = -0.3, minigame = "bench" },
    [`jc_prop_bigarm`]    = { targetStat = "power",      repGain = 1.5, repFatigue = 5.0, repStress = -0.3, minigame = "biceps" },
    [`jc_prop_legs`]      = { targetStat = "durability", repGain = 1.2, repFatigue = 4.0, repStress = -0.3, minigame = "squat" },
    [`jc_prop_bike`]      = { targetStat = "energy",     repGain = 0.6, repFatigue = 2.0, repStress = -0.5, minigame = "endurance" },
    [`jc_prop_frontarm`]  = { targetStat = "durability", repGain = 1.3, repFatigue = 5.0, repStress = -0.3, minigame = "back"  },
    [`jc_prop_armstand`]  = { targetStat = "power",      repGain = 1.1, repFatigue = 4.0, repStress = -0.3, minigame = "shoulders" },
    [`jc_prop_press`]     = { targetStat = "power",      repGain = 1.4, repFatigue = 5.0, repStress = -0.3, minigame = "bench" },
    [`jc_prop_pressleg`]  = { targetStat = "durability", repGain = 1.3, repFatigue = 5.0, repStress = -0.3, minigame = "squat" },
    [`jc_prop_speedbag`]  = { targetStat = "boxer",      repGain = 0.5, repFatigue = 2.0, repStress = -0.6, minigame = "cardio" },
    [`jc_prop_treadmill`] = { targetStat = "energy",     repGain = 0.4, repFatigue = 1.0, repStress = -0.5, minigame = "endurance" },
    [`jc_gym_bench`]      = { targetStat = "power",      repGain = 1.8, repFatigue = 6.0, repStress = -0.4, minigame = "bench" },
    [`jc_gym_machine2`]   = { targetStat = "power",      repGain = 1.4, repFatigue = 5.0, repStress = -0.3, minigame = "bench" },
    [`jc_gym_machine6`]   = { targetStat = "durability", repGain = 1.5, repFatigue = 5.0, repStress = -0.3, minigame = "squat" },
    [`jc_gym_pole1`]      = { targetStat = "healthy",    repGain = 1.0, repFatigue = 4.0, repStress = -0.4, minigame = "abs"   },
    [`jc_prop_pbag`]      = { targetStat = "boxer",      repGain = 1.3, repFatigue = 3.0, repStress = -0.6, minigame = "curl"  },
}

Config.FreeZoneStats = {
    jumping_jack  = { targetStat = "energy",  gain = 1.0, fatigue = 3.0, stress = -0.4, minigame = "endurance" },
    yoga          = { targetStat = "healthy", gain = 1.5, fatigue = -0.5, stress = -2.0, minigame = "curl"   },
    squat         = { targetStat = "power",   gain = 1.3, fatigue = 4.0, stress = -0.3, minigame = "squat"  },
    shadow_boxing = { targetStat = "boxer",   gain = 1.2, fatigue = 3.0, stress = -0.6, minigame = "curl"   },
}

Config.StatEffects = {
    Apply               = true,
    ApplyIntervalMs     = 5000,
    MeleeDamageBase     = 1.0,
    MeleeDamagePerPower = 0.008,
    MeleeDamagePerBoxer = 0.012,
    UnarmedDamagePerBoxer = 0.015,
    IncomingDamageBase  = 1.0,
    IncomingReducPerDur = 0.005,
    HealthyIntervalMs   = 8000,
    HealthyRegenPer25   = 1,
    StaminaPerEnergy    = 1.0,
    StaminaMaxPerEnergy = 1.0,
    StaminaRefillThreshold = 30.0,
    StaminaRefillCap    = 0.05,
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

<details>

<summary>If you have any questions or problems, do not hesitate to contact us:</summary>

Discord: [`https://discord.gg/EDuZKM7Zuv`](https://discord.gg/EDuZKM7Zuv)

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://jota-dev-documentation.gitbook.io/jota-dev/scripts/jota-dev-gym-system.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
