
Tebex & VIP Shop
Here you can find the installation for cas-vip script.
About Script
Introducing the VIP Script for RedM, a feature-rich system where players can purchase in-game coins using real money. After receiving a transaction code, they can redeem it in-game to unlock a variety of rewards, such as exclusive items, in-game currency, and other exciting perks.
The script boasts an elegant and intuitive user interface, ensuring a seamless experience for players. Setting it up is incredibly simple, making it accessible for server owners without complex configurations. This VIP system is perfect for enhancing player engagement while providing a smooth monetization solution.
Installation
You need to install cas_fwlibs script. https://github.com/codeaftersex/cas_fwlibs
Drag and drop cas_fwlibs script and ensure it before our scripts.
API Reference
Below is a detailed reference for each available function.
GetCoins
Retrieves the current VIP coin balance for a specific player. This is a read-only operation.
local balance = VIP:GetCoins(source)
Parameters
Parameter
Type
Description
source
number
The server ID of the player whose balance you want to check.
Returns
number: The player's current coin balance. Returns0if the player is not found or has no coin record.
Example
HasCoins
Checks if a player has a sufficient amount of VIP coins. Useful for verifying a purchase before proceeding.
Parameters
Parameter
Type
Description
source
number
The server ID of the player.
amount
number
The amount of coins to check for. Must be a positive number.
Returns
boolean: Returnstrueif the player's balance is greater than or equal to the specifiedamount, otherwisefalse.
Example
RemoveCoins
Removes a specified amount of coins from a player's balance. This function should be used for all purchases or coin deductions.
Parameters
Parameter
Type
Description
source
number
The server ID of the player.
amount
number
The amount of coins to remove. Must be a positive number.
reason
string
(Optional) A brief description of the transaction for logging purposes (e.g., "Purchased a Golden Pet").
Returns
boolean: Returnstrueon successful removal, orfalseif the player did not have enough coins or theamountwas invalid.
Note: This function is fully integrated with the system's logging. Every successful transaction is automatically logged to the configured Discord webhook and synchronized with the database.
Example
AddCoins
Adds a specified amount of coins to a player's balance. This function should be used for all rewards or coin additions.
Parameters
Parameter
Type
Description
source
number
The server ID of the player.
amount
number
The amount of coins to add. Must be a positive number.
reason
string
(Optional) A brief description of the transaction for logging purposes (e.g., "Reward for completing a quest").
Returns
numberorfalse: Returns the player's new balance on success, orfalseif theamountwas invalid.
Note: Similar to
RemoveCoins, this function automatically handles Discord logging and database synchronization.
Example
Tebex Installation Step - 1
First click on Integrations/Game servers nav button.

Step - 2
Click Connect Game Server button.

Step - 3
Select "Plugin" and click Continue button.

Step - 4
Select your package and click "Continue" button.

Step - 5
Copy your tebex key and click continue.

Step - 6
Click packages nav button.

Step - 7
Click Add New and select package nav.

Step - 8
Fill the all blanks.

Step - 9
Click "Game Server Commands" and set the settings package and fill the command blank
command: tbxcoin {transaction} coinAmount


Configuration

Last updated