Advertisement
OMan100

Untitled

Jun 22nd, 2019
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. command /reaction:
  2. trigger:
  3. open chest inventory with 6 rows named "&b&lReaction Tester&7(&c%{reaction::top::%uuid of player%}%&7)" to player
  4. set {_win} to random integer between 0 and 53
  5. loop integers from 0 to 53:
  6. set slot loop-value of current inventory to red concrete with no nbt named "&c&lNOPE!" lored "&c&lDONT CLICK ME!"
  7. set slot {_win} of current inventory to green concrete with no nbt named "&a&lAIM TRAINER" with lore "&a&lCLICK ME!"
  8. set {reaction::start::%uuid of player%} to now
  9. set {inventory::%uuid of player%} to "reaction"
  10.  
  11. on inventory click:
  12. if {inventory::%uuid of player%} is "reaction":
  13. cancel event
  14. if name of event-slot is "&c&lNOPE!":
  15. close player's inventory
  16. else if name of event-slot is "&a&lAIM TRAINER":
  17. set {_reaction} to difference between {reaction::start::%uuid of player%} and now
  18. if {reaction::top::%uuid of player%} is set:
  19. if {_reaction} < {reaction::top::%uuid of player%}:
  20. set {reaction::top::%uuid of player%} to {_reaction}
  21. else:
  22. set {reaction::top::%uuid of player%} to {_reaction}
  23. make player execute command "/reaction"
  24.  
  25. on inventory close:
  26. delete {inventory::%uuid of player%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement