# Prison Break & Visit

####

#### ⚡ 1. Cutting Power Panels

* **Requirement:** `prison_cutter` (wire cutter)
* **Mechanic:**
  * Players must locate and interact with **designated electric panels** around the prison.
  * A **mini-game** is triggered, requiring skill to complete successfully.
  * If the player **fails the mini-game**, the escape attempt is aborted and the panel becomes unusable for a while.
* **Condition:**

  * The action can **only be performed during a specific in-game time window**, defined in the config:

    ```lua

    FRKN.General.escapeControl.electricCut
    ```
  * This usually corresponds to **nighttime hours**.
  *

  ```
  <figure><img src="https://3505378470-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmOhVROw9E3kpmAG3JYVe%2Fuploads%2FWbBpyJj1bN89BxEFtzLV%2Fimage.png?alt=media&#x26;token=4eedd253-0431-4d0f-a521-3d53fe4157ff" alt=""><figcaption></figcaption></figure>
  ```

***

#### 🪓 2. Digging the Tunnel

* **Requirement:** `prison_shovel` (shovel)
* **Mechanic:**
  * Once the power is cut, players can go to the **tunnel dig location**.
  * A **digging mini-game** begins, simulating physical effort and time progression.
  * While digging, a **dirt pile prop** is spawned, which disappears once the tunnel is completed.
* **Condition:**
  * Tunnel digging is only allowed when **electricity is disabled** and the **in-game time** is within the allowed window:

    ```lua
    electricControl() && FRKN.General.escapeControl.digTunnel
    ```
* **Escape:**

  * After successful digging, players reach the **escape point** and are **removed from prison**, completing their breakout.
  *

  ```
  <figure><img src="https://3505378470-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmOhVROw9E3kpmAG3JYVe%2Fuploads%2FNhpI5AWp99cHrT8XQJXc%2Fimage.png?alt=media&#x26;token=8e6c9f1e-92bb-46a7-a510-3ddb85c1599c" alt=""><figcaption></figcaption></figure>
  ```

### 📞 Visitation System

The script includes a **visitation feature**, allowing players to schedule and attend visits with inmates using in-game prison phones.

***

#### 🧩 Interaction

* Players interact with **phone props** placed inside the prison.
* The system is integrated with **`qb-target`** or **`ox-target`**.
* Each phone includes a target option labeled *"Visit a Prisoner"* (or customized).

***

#### 📬 Visit Request

* After interacting with a phone, players are shown a **list of current inmates**.
* The visiting player selects an inmate to **send a visit request**.

***

#### ✅ Visit Approval

* The selected inmate receives a **request prompt** and can **accept or reject** the visit.

***

#### ✨ Teleportation

* If the request is accepted:

  * Both the inmate and the visitor are **teleported to a designated visitation room**.
  * This room is configured in the script and includes controlled camera angles and a waiting area.
  *

  ```
  <figure><img src="https://3505378470-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmOhVROw9E3kpmAG3JYVe%2Fuploads%2Fj20NQgpSGk7rGIwgX82I%2Fimage.png?alt=media&#x26;token=2e439fff-24ad-4d4d-8714-8f80ce55030c" alt=""><figcaption></figcaption></figure>
  ```
