Coinshop Skript Help

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

chief pickle

Member
Sep 3, 2025
18
0
1
I'm using a plugin called Coinsengine for a coins currency system. it does not come with it's own coinshop gui so i'm skripting one myself. I am very much not experienced and i need help making it so that the 'cow spawner' can only be bought if the player has at least 20 coins because just making it take the coins using console lets the player continuously buy more spawners even if they have no coins left. Here is the skript in just the area i need help with:

on inventory click:
if name of event-inventory is "&eCoin Shop":
cancel event
if event-item is not set:
stop

make console execute command "coins take %player% 20"
make console execute command "give %player% cow_spawner 1"
play sound "entity.experience_orb.pickup" with volume 1 and pitch 1 to player
send "&aYou bought a &5Cow Spawner &afor &e20 coins&a!" to player
 
For you to make it, there should be a placeholder to get the player's balance and check it, or a custom addon could fix it. If you don't have either of those, you probably should remake the whole coin plugin on Skript. I have done this before, and it's very possible to do so with YAML files.

Remember that for you to sell/buy items outside of a plugin, especially economy plugins, you need something that is connected to that very plugin, whether it be a placeholder or it should be supported by Skript itself. Because you need to get the balance of the player and then sell/buy the item.

I recommend completely redesigning the plugin for better usability.