> For the complete documentation index, see [llms.txt](https://fantasy-scripts.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fantasy-scripts.gitbook.io/docs/coin-shop-system/tebex-implementation.md).

# Tebex Implementation

This guide walks you through connecting Coin Shop with Tebex, allowing players to purchase coins directly through your Tebex store.

**Add Your Tebex Secret Key to `server.cfg`**

1. Sign in to your **Tebex Control Panel**.
2. From the left-hand menu, navigate to **Integrations → Game Servers**.
3. Find the Game Server you want to configure and click **Instructions** next to it.

<figure><img src="https://1800654818-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnNsKrICP2L1WBpAiuMGb%2Fuploads%2FjS8o20XUaMr9703hjtJh%2Fgame%20server.png?alt=media&amp;token=79e6851a-3be1-437a-bde8-bec1919efa8b" alt=""><figcaption></figcaption></figure>

* Copy the provided command and add it to your `server.cfg` file. It should look similar to the example below:

```
sv_tebexSecret <YourTebexSecretKey>
```

Make sure to replace `<YourTebexSecretKey>` with the actual secret key provided by Tebex.

**Create a Tebex Package**

1. Open your **Tebex Control Panel** and go to **Packages**.
2. Create a new package and give it a name, such as **"100 Coins"**.
3. Scroll to the bottom of the package setup page and choose **Game Server Commands** as the deliverable type.

![](https://www.sky-systems.net/_ipx/_/docs/coinsystem/deliverable.webp)

4. Select your game server and click **Add Command**.
5. Enter the following command to deliver the coins:<br>

   ```
   buyredeemcode {transaction} 100
   ```

   \
   Replace **100** with the number of coins included in the package.
6. Click the **settings icon** on the right side of the command.
7. Select your game server again.
8. Make sure the command is configured to **execute even when the player is offline**.

   We recommend enabling this option, as requiring the player to be online may prevent the command from executing correctly.<br>

   <figure><img src="https://1800654818-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnNsKrICP2L1WBpAiuMGb%2Fuploads%2FUWaqmzHozEsXraRNCTVN%2Fgameserver%20command.png?alt=media&amp;token=5acd439d-ac29-4451-9a19-e7d84942166d" alt=""><figcaption></figcaption></figure>
9. Save your Package.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://fantasy-scripts.gitbook.io/docs/coin-shop-system/tebex-implementation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
