• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • Minecraft 1.16.220 Update + Bug/Crash Fixes
    Added MCPE 1.16.220 version and fixed crashes for multiple plugins. You can view the full changelist here.
  • Forum Updates - 4/11/2021
    Various changes have been made to the forums and a few categories. You can view the full changelist here.

Crate key system

Warning!
Hello , there have been no replies in this thread for more than 30 days.
Please make sure you have a valid reason before you reply to this thread or you may face moderation action.
#1
this is crate key system triggered with touch .
take the item in youre hand that you wana set as crate key then make a cmd :

/cmd create test
/cmd add test let %hand% = playerhand(%p%)
/cmd add test message %p% %hand%["tags"]
then run test and you will see a long code put that code at line 4 where PUT YOURE CODE IN HERE stays.
its gona choose random 1 of the 10 rewards you have set.







1 #Crate key
2 let %id% = %args%[7]
3 %item% = playerhand(%p%)
4 let %code% = "PUT YOURE CODE IN HERE"
5 if (%item%["id"] = ID OF YOURE ITEM) and (%item%["tags"] = %code%) then goto 12
8 exit
12 %inv% = playerinventory(%p%)
13 %index% = size(%inv%)
14 %index% = %index% - 1
15 if %index% = -1 then exit
16 %get-slot% = %inv%[%index%]
17 if %get-slot%["id"] != ID OF ITEM then goto 14
18 %count% = %get-slot%["count"]
19 if %count% > 1 then goto 22
20 %inv%[%index%] =
21 goto 25
22 %count% = %count% - 1
23 %get-slot%["count"] = %count%
24 %inv%[%index%] = %get-slot%
25 carry %p% %inv%
26 exit
50 %random% = (1, 10)
51 if %random% = 1 then goto 70
52 if %random% = 2 then goto 80
53 if %random% = 3 then goto 90
54 if %random% = 4 then goto 90
55 if %random% = 5 then goto 100
56 if %random% = 6 then goto 110
57 if %random% = 7 then goto 120
58 if %random% = 8 then goto 130
59 if %random% = 9 then goto 140
60 if %random% = 10 then goto 150
61 exit
70 - 78 # put what reward you wana give
79 exit
80 - 88 # put what reward you wana give
89 exit
90-98 # put what reward you wana give
99 exit
100-108 # put what reward you wana give
109 exit
110-118 # put what reward you wana give
119 exit
120 - 128 # put what reward you wana give
129 exit
130 - 138 # put what reward you wana give
139 exit
140 - 148 # put what reward you wana give
149 exit
150 - 158 # put what reward you wana give
159 exit

dont forget to trigger it on touch!