Incase y'all wanna make players buy their own keys or they can't get keys from mining then here's this command to get it started! Created with the help of GreenBoy657
Code:
cmd create keyshop §b|§e Buy keys!
cmd add keyshop §b|§e Buy keys!
cmd add keyshop %player% = %p%
cmd add keyshop if varset(%args%[1]) then %player% = %args%[1]
cmd add keyshop %gui%[\"type\"] = \"form\"
cmd add keyshop %gui%[\"title\"] = \"§aKeys\"
cmd add keyshop %gui%[\"content\"] = \"§bSelect amount\"
cmd add keyshop %button0%[\"text\"] = \"§e1 Key\"
cmd add keyshop %button1%[\"text\"] = \"§e5 Keys\"
cmd add keyshop %button2%[\"text\"] = \"§e10 Keys\"
cmd add keyshop %buttons%[] = %button0%
cmd add keyshop %buttons%[] = %button1%
cmd add keyshop %buttons%[] = %button2%
cmd add keyshop %gui%[\"buttons\"] = %buttons%
cmd add keyshop %response% = dialog(%p%, %gui%) keyshop %player% = %p%
cmd add keyshop if varset(%args%[1]) then %player% = %args%[1]
cmd add keyshop %gui%[\"type\"] = \"form\"
cmd add keyshop %gui%[\"title\"] = \"§aKeys\"
cmd add keyshop %gui%[\"content\"] = \"§bSelect amount\"
cmd add keyshop %button0%[\"text\"] = \"§e1 Key\"
cmd add keyshop %button1%[\"text\"] = \"§e5 Keys\"
cmd add keyshop %button2%[\"text\"] = \"§e10 Keys\"
cmd add keyshop %buttons%[] = %button0%
cmd add keyshop %buttons%[] = %button1%
cmd add keyshop %buttons%[] = %button2%
cmd add keyshop %gui%[\"buttons\"] = %buttons%
cmd add keyshop %response% = dialog(%p%, %gui%)
cmd add keyshop if %response% = 0 then goto 18
cmd add keyshop if %response% = 1 then goto 25
cmd add keyshop if %response% = 2 then goto 36
cmd add keyshop exit
cmd add keyshop let %bal% = playerbalance(%p%)
cmd add keyshop if %bal% < 10000 then message %p% §f[§4§f]§c You do not have enough money! ($10,000)
cmd add keyshop if %bal% < 10000 then exit
cmd add keyshop ascon /takemoney %p% 10000
cmd add keyshop ascon /givecratekey %p%
cmd add keyshop message %p% §f[§e•§f]§b You have successfully bought §e1 CrateKey§b!
cmd add keyshop exit
cmd add keyshop let %bal% = playerbalance(%p%)
cmd add keyshop if %bal% < 50000 then message %p% §f[§4§f]§c You do not have enough money! ($50,000)
cmd add keyshop if %bal% < 50000 then exit
cmd add keyshop ascon /takemoney %p% 50000
cmd add keyshop ascon /givecratekey %p%
cmd add keyshop ascon /givecratekey %p%
cmd add keyshop ascon /givecratekey %p%
cmd add keyshop ascon /givecratekey %p%
cmd add keyshop ascon /givecratekey %p%
cmd add keyshop message %p% §f[§e•§f]§b You have successfully bought §e5 CrateKeys§b!
cmd add keyshop exit
cmd add keyshop let %bal% = playerbalance(%p%)
cmd add keyshop if %bal% < 100000 then message %p% §f[§4§f]§c You do not have enough money! ($100,000)
cmd add keyshop if %bal% < 100000 then exit
cmd add keyshop ascon /takemoney %p% 100000
cmd add keyshop ascon /givecratekey %p%
cmd add keyshop ascon /givecratekey %p%
cmd add keyshop ascon /givecratekey %p%
cmd add keyshop ascon /givecratekey %p%
cmd add keyshop ascon /givecratekey %p%
cmd add keyshop ascon /givecratekey %p%
cmd add keyshop ascon /givecratekey %p%
cmd add keyshop ascon /givecratekey %p%
cmd add keyshop ascon /givecratekey %p%
cmd add keyshop ascon /givecratekey %p%
cmd add keyshop message %p% §f[§e•§f]§b You have successfully bought §e10 CrateKeys§b!