Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /reaction:
- trigger:
- open chest inventory with 6 rows named "&b&lReaction Tester&7(&c%{reaction::top::%uuid of player%}%&7)" to player
- set {_win} to random integer between 0 and 53
- loop integers from 0 to 53:
- set slot loop-value of current inventory to red concrete with no nbt named "&c&lNOPE!" lored "&c&lDONT CLICK ME!"
- set slot {_win} of current inventory to green concrete with no nbt named "&a&lAIM TRAINER" with lore "&a&lCLICK ME!"
- set {reaction::start::%uuid of player%} to now
- set {inventory::%uuid of player%} to "reaction"
- on inventory click:
- if {inventory::%uuid of player%} is "reaction":
- cancel event
- if name of event-slot is "&c&lNOPE!":
- close player's inventory
- else if name of event-slot is "&a&lAIM TRAINER":
- set {_reaction} to difference between {reaction::start::%uuid of player%} and now
- if {reaction::top::%uuid of player%} is set:
- if {_reaction} < {reaction::top::%uuid of player%}:
- set {reaction::top::%uuid of player%} to {_reaction}
- else:
- set {reaction::top::%uuid of player%} to {_reaction}
- make player execute command "/reaction"
- on inventory close:
- delete {inventory::%uuid of player%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement