Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on skript load:
- delete {class::*}
- delete {classtool::*}
- delete {antitool::*}
- add "wizard" to {class::*}
- add "stick" to {classtool.wizard::*}
- add "sword" to {antitool.wizard::*}
- add "hoe" to {antitool.wizard::*}
- add "shovel" to {antitool.wizard::*}
- add "bow" to {antitool.wizard::*}
- add "axe" to {antitool.wizard::*}
- add "pickaxe" to {antitool.wizard::*}
- function chand(p: text, class: text) :: text:
- loop {class::*}:
- if "%loop-value%" is "%{_class}%":
- set {_p} to {_p} parsed as player
- set {_a} to {_p}'s tool
- loop {classtool.%{_class}%::*}:
- if "%type of {_a}%" contains "%loop-value%":
- return "true"
- stop
- loop {antitool.%{_class}%::*}:
- if "%type of {_a}%" contains "%loop-value%":
- return "false"
- stop
- return "true"
- on rightclick:
- set {_f} to chand("%player%", "%{class.%player%}%")
- if "%{_f}%" is "false":
- cancel event
- send "&8[&bClass&8]&b You Can't Use This Tool"
- send "&8[&bClass&8]&b Because Your Class Is A &6%{class.%player%}%"
- PLAY "ENTITY_VILLAGER_NO" to player with volume 1
- stop
- on leftclick:
- set {_f} to chand("%player%", "%{class.%player%}%")
- if "%{_f}%" is "false":
- cancel event
- send "&8[&bClass&8]&b You Can't Use This Tool"
- send "&8[&bClass&8]&b Because Your Class Is A &6%{class.%player%}%"
- PLAY "ENTITY_VILLAGER_NO" to player with volume 1
- stop
- command /class [<text>]:
- trigger:
- loop {class::*}:
- if arg 1 is "%loop-value%":
- send "&8[&bClass&8]&e Your Class set to %loop-value%"
- set {class.%player%} to loop-value
- stop
- add loop-value to {_list::*}
- send "&8&m-----&6 Class List &8&m-----"
- loop {_list::*}:
- send "&3&l> &6%loop-value%"
- send "&8[&bClass&8]&c No Class Named %arg 1%"
Advertisement
Add Comment
Please, Sign In to add comment