Ghaz-ranka

Untitled

Jun 8th, 2016
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. script("Open Custom Inventory"){
  2. trigger("interactBlock")
  3. @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")
  4. }
  5.  
  6. Script("Custom Inventory"){
  7. trigger("interactInventory")
  8. if (@inventory("name") ~ "Free Stuff"){
  9. @cancel()
  10. if (@inventory("ClickSlot") == 1){
  11. @player("give", {"type": "minecraft:diamond", 1})
  12. @inventory("close")
  13. }
  14. if (@inventory("ClickSlot") == 2{
  15. @player("give", {"type": "minecraft:GoldIngot", 1})
  16. @inventory("close")
  17. } else {
  18. @inventory("close")
  19. }
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment