Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script("Open Custom Inventory"){
- trigger("interactBlock")
- @inventory("display", "Free Stuff", 1, "minecraft:diamond", 1, "woah a Diamond", "Click for a free diamond", 2, "minecraft:GoldIngot", 1, "Yay gold!", "Click for a free gold ingot")
- }
- Script("Custom Inventory"){
- trigger("interactInventory")
- if (@inventory("name") ~ "Free Stuff"){
- @cancel()
- if (@inventory("ClickSlot") == 1){
- @player("give", {"type": "minecraft:diamond", 1})
- @inventory("close")
- }
- if (@inventory("ClickSlot") == 2{
- @player("give", {"type": "minecraft:GoldIngot", 1})
- @inventory("close")
- } else {
- @inventory("close")
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment