# Advanced Metal Detector Script

## <mark style="color:yellow;">**Overview**</mark>

Introduce a **robust metal detecting system** to your FiveM server, letting players **rent or buy** a metal detector, **upgrade** it with various levels, track **digging tasks**, and **earn rewards** for successful hunts. The script **auto-detects** ESX or QBCore, integrates with a **task/achievement** system, uses **Discord** to announce updates, and provides advanced configurations for surfaces, upgrades, or item rewards.

## <mark style="color:yellow;">**Key Highlights**</mark>

* **ESX / QBCore Compatibility:** Auto-detect or force a specific framework.
* **Buying / Renting Detectors:** Players can own or temporarily rent the metal detector.
* **Upgrades:** Increase battery time, radius, or radar to refine detection.
* **Digging & Surfaces:** Players must have a shovel, and the script checks terrain surfaces for potential finds.
* **Tasks & Scoreboard:** Track progress (time used, number of digs) and reward players accordingly.

## <mark style="color:yellow;">**Preview Video**</mark>

{% embed url="<https://www.youtube.com/watch?v=Tcx8c78uL1Y>" %}


---

# 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://risk-scripts.gitbook.io/risk-scripts/scripts/advanced-metal-detector-script.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.
