Jump to content

I need help Skript


_DemonDevil

Recommended Posts

Hi! Here, this might work. Please note that I haven't tested it though.

function openCrate(p: player):
	set metadata tag "crateGUI" of {_p} to chest inventory with 3 rows named "NAME OF CHEST"
	set slot 14 of metadata tag "crateGUI" of {_p} to tripwire hook named "&aClick to claim"
	open (metadata tag "crateGUI" of {_p}) to {_p}

on inventory click:
    if event-inventory = (metadata tag "crateGUI" of player):
        cancel event

	if index of event-slot is 14:
		if {claimed::%player's uuid%} is set:
			send "&cYou have already claimed this!" to player
			exit
		send "&aYou claimed it!" to player
		give 1 stone to player

There might be a better way to do this, but still, this probably works. No addons required either.

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...