NEXO DOCSv1 · ENES
docs / scripts / toy-factory

Toy Factory

Christmas team job: build 12 toys on a 5-station assembly line with 3D assembly and painting.

v1.0.0ESXQBCoreQBoxStandalone

What's included

A team seasonal job. Players clock in at Santa's Workshop, pick orders and build toys on a 5-station assembly line with minigames, with assembly and painting in 3D on the table. The better and faster they work, the more they earn, and the whole server pushes the North Pole Goal together.

  • 12 toys with 370+ custom models: unpainted, painted and silhouette parts, plus screws, nails, glue and stitches. Nothing else to download.
  • 3D assembly and painting on the table: drag each part to its silhouette, screw, nail, glue or stitch it, and paint each part. Teammates see it live.
  • Quality control in the world (find the hidden flaw) and wrapping with an arrow minigame.
  • Teams of up to 4, each in its own copy of the workshop, orders (some urgent), a bonus chain and 7 ranks.
  • Server-wide North Pole Goal with milestones and a weekly ranking with prizes.
  • Toys as items: hold them, place them (also in your house), play with them, give them away or wrap them and leave them under the tree.
  • Home delivery by van, North Pole Party, elf uniform, first-shift tutorial, production shelf and sounds your teammates hear.
  • No database (saves with KVP), 7 languages, E key or ox_target / qb-target, and a staff panel.

Requirements

RequirementWhat for
OneSyncRequired: each team works in its own copy of the workshop
FrameworkQBox, QBCore, ESX or standalone, auto-detected (Config.Framework)
Target (optional)ox_target or qb-target. Without one, the E key
Keys (optional)qb-vehiclekeys, qbx_vehiclekeys or wasabi_carlock for the delivery van

Installation

  1. Copy the resource Download it from keymaster.fivem.net → Granted Assets and put toy_factory in resources.
  2. Add it to your server.cfg After your framework.
    ensure toy_factory
    add_ace group.admin toy_factory.admin allow
  3. Create the toy items Add the 12 items to your inventory (see “Toy items”) and copy the icons from items/ to your inventory's image folder.
  4. Restart the server There's no database to import: everything is saved with KVP.
Check on your serverThe delivery houses and van spot in the config are approximate (Paleto Bay). Set your own from the staff panel → “Home delivery” with “🏠 House here” and “🚐 Van here”. Stations come placed around the bunker entrance: if one lands on a machine, move it with “Workshop stations → Mark here”.

How to play

  1. Clock in With the head elf at the door (map icon, Paleto Bay). Open the menu with E.
  2. Form a team (optional) Menu → «My team» → «Invite someone nearby». The invited player presses Y.
  3. Enter the workshop Menu button. Each team gets its own copy of the bunker.
  4. Pick an order The team leader picks it in the menu (F6 inside the workshop).
  5. Build Warehouse → 3D assembly → 3D painting → Quality → Wrapping → Sleigh dock (paid instantly). Common toys skip Quality. G drops what you carry on the next station's table so a teammate can continue.
  6. End the shift From the menu: summary of toys, quality, chain and money.

Chain: start the next station within 20 s and the chain goes up (+10 % pay per step, up to x10). Toy pay = price × (stars ÷ 5) × chain × urgent × rank × double pay/North Pole, split between whoever worked on it by their stations.

At the 3D tableWhat it does
DragMove each part to its blue silhouette
Click the gold pointsScrew, nail, glue or stitch
Click each partPaint it with the chosen colour (the model is top left)
Right click · wheel · ESCRotate the camera · zoom · leave the table

Toys, gifts, delivery and party

  • Toy as an item (Config.ToyItem): on delivery, each worker can keep the toy (30 % by default). Using it lets you hold it, place it anywhere (E place, ← → rotate, X cancel, up to 15 per player, saved across restarts, H to pick it up) or give it to someone nearby.
  • Playable toys (Config.ToyPlay): in front of a placed toy, E to play. The train does a lap whistling, the car drives, the robot walks, the ball bounces, the rocket takes off, the castle lowers its bridge… and everyone nearby sees it.
  • Gifts under the tree (Config.Gifts): “Wrap as a gift”, pick the paper and recipient and place it anywhere. When opened the box shakes, confetti pops and the toy appears.
  • Home delivery (Config.Delivery, rank 2): a van with keys and 4 to 6 houses. Leave the gift at the door and a kid comes out to celebrate. Pay per gift, tips and a bonus at the end.
  • North Pole Party (Config.Party): when the goal hits 100 % or from the panel. Fireworks, confetti, lights, its own music and gifts on the floor that give money and sometimes a toy.
  • Elf uniform (Config.Uniform): put on automatically when you clock in, and you're back in your clothes when you finish. Dress as an elf in a clothing store and press “Use my outfit as the uniform” in the staff panel (one for men and one for women).

Ranks, North Pole and ranking

RankXP
🧦 Apprentice0
🔧 Helper300
🪚 Skilled elf900
🧝 Craftsman elf2000
🎩 Master toymaker4000
⭐ Head elf7500
🎅 Santa's right hand12000

Each rank gives +5 % pay and 2 s extra at stations. North Pole Goal: every toy on the server counts (10,000 by default). Milestones: 25 % carols in the workshop · 50 % x1.5 pay for 1 hour · 75 % Santa's tip for everyone on shift · 100 % grand finale with a prize for every elf on shift and the toy_factory:northPoleComplete event.

Weekly ranking (Config.Ranking): prizes for the elves with the most toys, the most productive team and the best average stars.

Toy items

The icons are in items/: copy them to your inventory's image folder. In QBCore and ESX the script registers the items as usable automatically.

['toy_yoyo'] = { label = 'Colorful Yo-yo', weight = 300, stack = true, close = true, client = { export = 'toy_factory.useToy' } },
['toy_ball'] = { label = 'Soccer Ball', weight = 300, stack = true, close = true, client = { export = 'toy_factory.useToy' } },
['toy_teddy'] = { label = 'Teddy Bear', weight = 300, stack = true, close = true, client = { export = 'toy_factory.useToy' } },
['toy_car'] = { label = 'Race Car', weight = 300, stack = true, close = true, client = { export = 'toy_factory.useToy' } },
['toy_train'] = { label = 'Wooden Train', weight = 300, stack = true, close = true, client = { export = 'toy_factory.useToy' } },
['toy_matryoshka'] = { label = 'Matryoshka Doll', weight = 300, stack = true, close = true, client = { export = 'toy_factory.useToy' } },
['toy_kite'] = { label = 'Kite', weight = 300, stack = true, close = true, client = { export = 'toy_factory.useToy' } },
['toy_guitar'] = { label = 'Guitar', weight = 300, stack = true, close = true, client = { export = 'toy_factory.useToy' } },
['toy_robot'] = { label = 'Wind-up Robot', weight = 300, stack = true, close = true, client = { export = 'toy_factory.useToy' } },
['toy_castle'] = { label = 'Castle', weight = 300, stack = true, close = true, client = { export = 'toy_factory.useToy' } },
['toy_sleigh'] = { label = 'Toy Sleigh', weight = 300, stack = true, close = true, client = { export = 'toy_factory.useToy' } },
['toy_rocket'] = { label = 'Space Rocket', weight = 300, stack = true, close = true, client = { export = 'toy_factory.useToy' } },

Commands and staff panel

Command / keyWhat it does
/toyfactory · F6Workshop menu
/toyfactoryadminOpens the menu straight on the staff panel
EUse a station / talk to the head elf
GDrop what you're carrying
YAccept a team invite

Players can rebind keys in «Settings → Key Bindings → FiveM». Staff panel: move the entrance, open or close, schedule, 1-hour double pay, edit the North Pole, each toy's price, mark each station where you stand, watch teams working, uniform, delivery, shelf, party, log and +500 XP to test ranks. Permission: toy_factory.admin or the groups in Config.AdminGroups.

Interior and custom toys

  • Config.Workshop.interior.type = 'bunker' (default): uses the GTA Online bunker with its manufacturing area and enables its parts with entitySets.
  • type = 'mlo': if you have a factory MLO. No teleport or copies: mark the stations inside your MLO from the staff panel. If it already has tables, set props = {} on that station.
  • Custom toys: each toy in Config.Toys has its 3D parts, its route through the line, its fastenings and its material (changes the sounds). Copy a similar one, change the id and adjust. A toy without models uses the menu assembly.
  • Config.WorldMode: turn the in-world workshop off or keep only one station in 3D.

Christmas Magic, exports and security

With Christmas Magic running, each toy gives snowflakes and counts for toys_made missions, and delivery gives snowflakes too. For a “Make 10 toys” mission, add this line to Config.Missions.weekly (or daily) in Christmas Magic's config:

{ id = 'w_toys', type = 'toys_made', goal = 10, icon = '🧸', cat = 'Toy Factory', label = 'Make 10 toys in the Toy Factory',
  rewards = { { type = 'copos', amount = 500 }, { type = 'xp', amount = 120 } } },
exports.toy_factory:StartParty(seconds)      -- server: start the North Pole Party
AddEventHandler('toy_factory:northPoleComplete', function() end)  -- server: goal reached

Anti-cheat: the server checks each station's minimum time, that the player is at the table, the station order, the toys-per-hour cap and the hourly pay cap (Config.Pay).

Editable files

FileWhat for
config.luaWorkshop, stations, orders, pay, teams, ranks, North Pole, ranking, delivery, party, uniform and toys.
locales/Texts in 7 languages.
bridge/Framework, inventory, target, clothing and vehicle keys.

FAQ

Does it need a database?

No. Progress, ranks, the North Pole and placed toys are saved with KVP. It only needs OneSync.

Can I use my own factory MLO?

Yes. It uses the GTA Online bunker by default, but with type = 'mlo' you mark the stations inside your MLO from the staff panel.

Is the code encrypted?

The core is protected with Cfx.re escrow. Config, translations and integration points stay open.

Do I get updates?

Yes, for free. New versions appear in your Keymaster and we announce them on Discord.

What if something doesn't work?

Open a ticket on our Discord with the console error and we'll help you.