X3D Lockpick

Description

A lockpick minigame — feel for the pin with WASD, close or far, ESC to give up.

One export call. Use it for anything: house doors, cars, lockers, crates, drawers.


Features

  • [+] Lockpick minigame: turn with WASD to find the pin
  • [+] Feel how close or far you are from the pin, ESC to give up
  • [+] One export call that blocks and hands back the result
  • [+] Works with any script: house doors, cars, lockers, crates, drawers
  • [+] Set difficulty with the pin count, 3 to 6 by lock type
  • [+] Blocks other keys while it runs, through a state bag or an event
  • [+] Dying mid-attempt or the resource stopping closes it, nobody gets stuck

Using it

-- true when they get in, false on a miss or a cancel
local ok = exports['x3d_lockpick']:miniGameLockPick(4)   -- 4 = how many pins

if ok then
    -- open the door, start the car, whatever
end

That is it. No callbacks, no events to chase; the call blocks and hands you the answer.


Difficulty is the pin count

More pins means longer and more chances to slip. 3 to 6 is the useful range.

An ordinary house door 3, a safe 5, a storeroom 6.


Blocking other keys while it runs

A state bag is set for you, readable from anywhere:

if LocalPlayer.state.minigame then return end   -- e.g. block the inventory key

Or hook the event if you would rather drive a HUD yourself:

AddEventHandler('x3d_lockpick:active', function(active) ... end)

It will not strand anyone

Dying mid-attempt, or the resource stopping, closes the minigame and returns false. An attempt longer than 45 seconds counts as a miss.

Version history

  • 1.1.1 — Released 13/10/2026 00:18
  • 1.0.0 — Released 24/09/2026 10:53
Reviews

Reviews from customers

No reviews yet. Customers who bought, rented or claimed this script can review it.

Same category

Related scripts

View all products
Read more

Posts that cover this script