Jump to content

Is this a good way to make a shop skript?


Recommended Posts

Hello, I recently started making a shop skript, and I wanted to ask if this is a good way creating the shop skript? Can I make it more compact or something? (Its fully working, but its kinda long.."

	wait 1 tick
	open virtual chest inventory with size 6 named "&3Slabs &7& &3Stairs" to player
	wait 1 tick
	format gui slot 0 of player with 16 oak slabs named "&c16 Oak slabs" with lore " " and "&a25$" and " " to run:
		if {bal::%player's uuid%} < 25:
			send "{@prefix} &cNot enough &a$$$&c!"
		else if {bal::%player's uuid%} >= 25:
			remove 25 from {bal::%player's uuid%}
			give player 16 oak slabs
			send "{@prefix} &bBought &c16 oak slabs&b. Current balance: &c%{bal::%player's uuid%}%&b$"


Link to comment
Share on other sites

You can use functions to make it more compact. Here is a tutorial that you can look at to see how functions work.


Discord - Tarna256#8675

In-game name - _Tarna_

Follow @Tarna_256 on Twitter


[VIP] - 7/27/2020

Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...