Advertisement
Zeldaboy111

Ban Integratie (1) ]|[ Skript #303

Apr 17th, 2020
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. options:
  2. logo: &c&lPunishment &8►&7
  3.  
  4.  
  5. command /punish [<text>]:
  6. aliases: /pu
  7. trigger:
  8. if player has permission "rank.helper":
  9. if arg-1 is set:
  10. if arg-1 parsed as a player is set:
  11. set {_t} to arg-1 parsed as a player
  12. open chest with 6 rows named "Punish %{_t}%" to player
  13.  
  14. set slot 19 of player's current inventory to paper named "&aWarn" with lore "", "&7Click to Warn %{_t}%", "" and "&8(&2Helper&8)"
  15. set slot 20 of player's current inventory to stone sword named "&cClient Modifications" with lore "", "&7Click to Ban %{_t}%", "&7for &oClient Modifications", "" and "&8(&2Helper&8)" without any NBT
  16.  
  17.  
  18. else:
  19. send "{@logo} The player &c%arg-1% &7is not found."
  20. else:
  21. send "{@logo} You have to give up a &cplayer &7to punish."
  22.  
  23. on connect:
  24. if {ban.%player%} is set:
  25. set {_difference} to difference between now and {ban.%player%}
  26. if {_difference} > {ban.%player%.time}:
  27. delete {ban.%player%.time}
  28. delete {ban.%player%}
  29.  
  30. else:
  31. kick player due to "BANNED"
  32.  
  33. on quit:
  34. if {ban.%player%} is set:
  35. set quit message to ""
  36.  
  37. on inventory click:
  38. if type of clicked inventory is chest inventory:
  39. if inventory name of player's current inventory starts with "Punish ":
  40. cancel event
  41. set {_name::*} to inventory name of player's current inventory split at " "
  42. set {_target} to {_name::2}
  43. set {_target} to {_target} parsed as an offline player
  44.  
  45. if clicked slot is 19:
  46.  
  47. else if clicked slot is 20:
  48. set {ban.%{_target}%} to now
  49. set {ban.%{_target}%.time} to 7 seconds
  50. set {ban.%{_target}%.unban} to now
  51. kick {_target} due to "&9&lBANNED%nl%%nl%&7Banned at&8: &7%{ban.%{_target}%}%%nl%&7Unban at&8: &7%add {ban.%{_target}%.time} to {ban.%{_target}%}%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement