akon1248

Untitled

Jan 31st, 2019
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. command /getflyarmor:
  2. permission: flyarmor.admin
  3. permission message: &cYou do not have permission to use this command.
  4. trigger:
  5. give player diamond chestplate with nbt "{display:{Name:""&b&lFly Armor""},Unbreakable:1b,ench:[{id:0s,lvl:10s}],AttributeModifiers:[{Name:""generic.armor"",UUIDLeast:985566364l,UUIDMost:985566364l,Operation:0,AttributeName:""generic.armor"",Amount:20d,Slot:""chest""},{Name:""generic.armorToughness"",UUIDLeast:985566364l,UUIDMost:985566364l,Operation:0,AttributeName:""generic.armorToughness"",Amount:2d,Slot:""chest""}]}"
  6. on inventory click:
  7. clicked inventory is inventory of player
  8. if clicked item is diamond chestplate:
  9. name of clicked item is "&b&lFly Armor"
  10. if "%click type%" contain "drop key":
  11. clicked slot is 38
  12. set player's flight mode to false
  13. else if "%click type%" is "right mouse button" or "left mouse button":
  14. if clicked cursor is air:
  15. set player's flight mode to false
  16. if clicked cursor is any chestplate:
  17. set player's flight mode to false
  18. else if "%click type%" contain "mouse button with shift":
  19. if clicked slot is not 38:
  20. set {_chestitem} to slot 38 of player's inventory
  21. {_chestitem} is not set
  22. set player's flight mode to true
  23. else if clicked slot is 38:
  24. loop 36 times:
  25. set {_loopslot} to loop-number - 1
  26. if slot {_loopslot} of player's inventory is air:
  27. set player's flight mode to false
  28. stop loop
  29. if clicked cursor is diamond chestplate:
  30. name of clicked cursor is "&b&lFly Armor"
  31. clicked slot is 38
  32. "%click type%" is "right mouse button" or "left mouse button"
  33. set player's flight mode to true
  34. on respawn:
  35. player's chestplate is diamond chestplate
  36. name of player's chestplate is "&b&lFly Armor"
  37. set player's flight mode to true
  38. on join:
  39. player's chestplate is diamond chestplate
  40. name of player's chestplate is "&b&lFly Armor"
  41. set player's flight mode to true
Advertisement
Add Comment
Please, Sign In to add comment