Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /staff:
- permission: staffmode.use
- trigger:
- if {staffmode::%player%} is not set:
- set {staffmode::%player%} to true
- send "&bYou have turned staff mode &aON" to player
- saveinv(player)
- clear player's inventory
- set slot 1 of player's inventory to stick named "&e&lCheck CPS"
- loop all players:
- if loop-player does not have permission "staffmode.use":
- hide player from loop-player
- else if {staffmode::%player%} is true:
- delete {staffmode::%player%}
- send "&bYou have turned staff mode &cOFF" to player
- reveal player to all players
- giveinv(player)
- on join:
- if {staffmode::%player%} is true:
- giveinv(player)
- delete {staffmode::%player%}
- function saveinv(p: player):
- set {_count} to 0
- loop 36 times:
- set {inv.%{_p}%.%{_count}%.main} to slot {_count} of {_p}'s inventory
- add 1 to {_count}
- set {inv.%{_p}%.helmet.main} to {_p}'s helmet
- set {inv.%{_p}%.chest.main} to {_p}'s chestplate
- set {inv.%{_p}%.legs.main} to {_p}'s leggings
- set {inv.%{_p}%.feet.main} to {_p}'s boots
- function giveinv(p: player):
- clear {_p}'s inventory
- wait 1 tick
- set {_count} to 0
- loop 36 times:
- set slot {_count} of {_p}'s inventory to {inv.%{_p}%.%{_count}%.main}
- add 1 to {_count}
- set the helmet of {_p} to {inv.%{_p}%.helmet.main}
- set the chestplate of {_p} to {inv.%{_p}%.chest.main}
- set the leggings of {_p} to {inv.%{_p}%.legs.main}
- set the boots of {_p} to {inv.%{_p}%.feet.main}
- on rightclick:
- if target player is set:
- if player is holding a stick named "&e&lCheck CPS":
- send "&bClicks: &2%{clicks::%target player%}%" to player
- every second:
- loop all players:
- set {clicks::%loop-player%} to 0
- on click:
- add 1 to {clicks::%player%}
- on damage:
- add 1 to {clicks::%attacker%}
Add Comment
Please, Sign In to add comment