Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- debug: false
- codes: 0|1|2|3|4|5|6|7|8|9|a|b|c|d|e|f|k|l|m|n|o|r
- function removeColor(msg: text) :: text:
- set {_m::*} to {_msg} split at ""
- set {_color-codes} to "{@codes}"
- set {_colors::*} to {_color-codes} split at "|"
- set {_new} to ""
- loop {_m::*}:
- set {_char} to loop-value
- set {_prev} to the last character of {_new}
- if {_prev} is "&":
- loop {_colors::*}:
- if loop-value-2 is {_char}:
- set {_skip} to true
- if {_skip} is set:
- delete {_skip}
- else:
- set {_new} to "%{_new}%%{_char}%"
- return {_new}
- function jsonColorize(msg: text, default-color: text = "&r") :: text:
- set {_m::*} to {_msg} split at ""
- set {_color-codes} to "{@codes}"
- set {_colors::*} to {_color-codes} split at "|"
- set {_color} to colored {_default-color}
- set {_code} to the first character of {_color}
- set {_new} to ""
- set {_skip} to 0
- loop amount of {_m::*} times:
- if {_skip} is more than or equal to 1:
- subtract 1 from {_skip}
- else:
- set {_char} to {_m::%loop-number%}
- set {_next} to {_m::%loop-number + 1%}
- if {@debug} is true:
- broadcast "&a[Character Check] &r%loop-number%: &7%{_char}% &r&onext: &8%{_next}% &r[%{_color}%color&r]"
- if {_char} is "&" or {_code}:
- if {@debug} is true:
- broadcast "&a[Color Check] &rFOUND: &o%{_char}%%{_next}% &7&m<--&7&o is it valid?"
- loop {_colors::*}:
- if loop-value-2 is {_next}:
- set {_color} to "%{_color}%%{_code}%%{_next}%"
- if {_next} is "r":
- set {_color} to {_default-color}
- set {_new} to "%{_new}%%{_color}%"
- set {_skip} to 1
- if {_skip} is less than or equal to 0:
- set {_new} to "%{_new}%%{_char}%"
- else if {_char} is " ":
- set {_new} to "%{_new}% %{_color}%"
- else:
- set {_new} to "%{_new}%%{_char}%"
- return {_new}
- function jsonSanitize(msg: text) :: text:
- if {@debug} is true:
- broadcast "&a[Sanitize] &7&oSanitizing input..."
- set {_m::*} to {_msg} split at ""
- loop {_m::*}:
- if loop-value is """":
- set {_m::%loop-index%} to "\""" # """
- else if loop-value is "\":
- set {_m::%loop-index%} to "\\"
- set {_new} to join {_m::*} with ""
- return {_new}
- function jsonFormat(msg: text, color: boolean = true) :: text:
- set {_m::*} to {_msg} split at "||"
- set {_current} to 1
- loop {_m::*}:
- if {_clusters::%{_current}%} is not set:
- set {_clusters::%{_current}%} to ""
- if {_clusters::%{_current}%::text} is not set:
- set {_clusters::%{_current}%::text} to jsonSanitize(loop-value)
- else:
- set {_tag} to the first 4 characters of loop-value
- set {_value} to subtext of loop-value from characters 5 to the length of loop-value
- if {_tag} is "ttp:":
- set {_clusters::%{_current}%::tooltip} to jsonSanitize({_value})
- else if {_tag} is "cmd:":
- set {_clusters::%{_current}%::command} to jsonSanitize({_value})
- else if {_tag} is "sgt:":
- set {_clusters::%{_current}%::suggest} to jsonSanitize({_value})
- else if {_tag} is "url:":
- if {_value} doesn't contain "http://" or "https://":
- set {_value} to "http://%{_value}%"
- set {_clusters::%{_current}%::url} to jsonSanitize({_value})
- else if {_tag} is "ins:":
- set {_clusters::%{_current}%::insertion} to jsonSanitize({_value})
- else:
- add 1 to {_current}
- set {_clusters::%{_current}%::text} to jsonSanitize(loop-value)
- set {_clusters::%{_current}%} to ""
- if {@debug} is true:
- broadcast "&a[Tag Check] &3cluster:&b%{_current}% &8(&f&o%{_tag}%&8)"
- loop {_clusters::*}:
- if {@debug} is true:
- broadcast "&a[Cluster Check] &7&oCluster ##%loop-index% exists."
- set {_i} to loop-index
- set {_text} to {_clusters::%{_i}%::text}
- if {_color} is true:
- set {_text} to jsonColorize({_text})
- if {_json} is not set:
- set {_json} to "{""text"":""%{_text}%"""
- else:
- set {_json} to "%{_json}%,{""text"":""%{_text}%"""
- if {_clusters::%{_i}%::tooltip} is set:
- if {_color} is true:
- set {_tooltip} to jsonColorize({_clusters::%{_i}%::tooltip})
- else:
- set {_tooltip} to {_clusters::%{_i}%::tooltip}
- set {_json} to "%{_json}%,""hoverEvent"":{""action"": ""show_text"",""value"": ""%{_tooltip}%""}"
- if {_clusters::%{_i}%::insertion} is set:
- set {_json} to "%{_json}%,""insertion"":""%{_clusters::%{_i}%::insertion}%"",""obfuscated"":false"
- if {_clusters::%{_i}%::command} is set:
- set {_clickable} to "%{_json}%,""clickEvent"":{""action"":""run_command"",""value"":""%{_clusters::%{_i}%::command}%""}"
- if {_clusters::%{_i}%::suggest} is set:
- set {_clickable} to "%{_json}%,""clickEvent"":{""action"": ""suggest_command"",""value"": ""%{_clusters::%{_i}%::suggest}%""}"
- if {_clusters::%{_i}%::url} is set:
- set {_clickable} to "%{_json}%,""clickEvent"":{""action"": ""open_url"",""value"": ""%{_clusters::%{_i}%::url}%""}"
- if {_clickable} is set:
- set {_json} to "%{_clickable}%}"
- delete {_clickable}
- else:
- set {_json} to "%{_json}%}"
- return "{""text"":"""", ""extra"":[%{_json}%]}"
- function json(to: text, msg: text, color: boolean = true):
- set {_msg} to jsonFormat({_msg}, {_color})
- execute console command "/tellraw %{_to}% %{_msg}%"
- if {@debug} is true:
- set {_player} to {_to} parsed as offline player
- if {_player} is online:
- send uncolored {_msg} to {_player}
- function jsonBroadcast(msg: text, color: boolean = true):
- json("@a", {_msg}, {_color})
- on connect:
- set {waitpin.%player%} to 0
- on join:
- if {nick.%player%} is true:
- set {nick.%player%} to false
- delete {nickname.%player%}
- set action bar of player to coloured ""
- set player tab name to "%player%"
- set player's nametag to "%player%"
- function caseSensitive(source: String, compareTo: String) :: boolean:
- if size of split {_source} at {_compareTo} is 2:
- return true
- else:
- return false
- command /rank [<offline player>] [<text>]:
- permission: op
- permission message: &cYou do not have permission to use this command.
- trigger:
- if argument 1 is "help":
- if argument 2 is "ranks":
- message "&6List of ranks:"
- message ""
- json("%player%", "&cOWNER||ttp:&fClick here to view more info on &c[OWNER]&f.||cmd:/rank help about_owner", false)
- json("%player%", "&cADMIN||ttp:&fClick here to view more info on &c[ADMIN]&f.||cmd:/rank help about_admin", false)
- json("%player%", "&2MOD||ttp:&fClick here to view more info on &2[MOD]&f.||cmd:/rank help about_mod", false)
- json("%player%", "&9HELPER||ttp:&fClick here to view more info on &9[HELPER]&f.||cmd:/rank help about_helper", false)
- json("%player%", "&fYOUTUBE||ttp:&fClick here to view more info on &c[&fYOUTUBE&c]&f.||cmd:/rank help about_yt", false)
- json("%player%", "&dTRYHARD||ttp:&fClick here to view more info on &d[TRYHARD]&f.||cmd:/rank help about_tryhard", false)
- json("%player%", "&cD.ADMIN||ttp:&fClick here to view more info on &c[D.ADMIN]&f.||cmd:/rank help about_dadmin", false)
- json("%player%", "&2D.MOD||ttp:&fClick here to view more info on &2[D.MOD]&f.||cmd:/rank help about_dmod", false)
- json("%player%", "&9D.HELPER||ttp:&fClick here to view more info on &9[D.HELPER]&f.||cmd:/rank help about_dhelper", false)
- json("%player%", "&6MVP&c++||ttp:&fClick here to view more info on &6[MVP&c++&6]&f.||cmd:/rank help about_mvp++", false)
- json("%player%", "&bMVP&c+||ttp:&fClick here to view more info on &b[MVP&c+&b]&f.||cmd:/rank help about_mvp+", false)
- json("%player%", "&bMVP||ttp:&fClick here to view more info on &b[MVP]&f.||cmd:/rank help about_mvp", false)
- json("%player%", "&aVIP&6+||ttp:&fClick here to view more info on &a[VIP&6+&a]&f.||cmd:/rank help about_vip+", false)
- json("%player%", "&aVIP||ttp:&fClick here to view more info on &a[VIP]&f.||cmd:/rank help about_vip", false)
- json("%player%", "&7Default||ttp:&fClick here to view more info on &7Default&f.||cmd:/rank help about_default", false)
- if argument 2 is "about_owner":
- message "&aOWNER is the best rank a player can have. Owners manage the server, develop plugins, and more!"
- if argument 2 is "about_admin":
- message "&aADMINs usually develop plugins; manage the server, and manage the website and staff team."
- if argument 2 is "about_mod":
- message "&aMODs moderate the server to look out for pesky swearers and hackers!"
- if argument 2 is "about_helper":
- message "&aHELPER is a mod in training."
- if argument 2 is "about_dadmin":
- message "&aD.ADMIN is donator Admin."
- if argument 2 is "about_dmod":
- message "&aD.MOD is donator Moderator."
- if argument 2 is "about_dhelper":
- message "&aD.HELPER is donator HELPER."
- if argument 2 is "about_yt":
- message "&aYOUTUBERs are people who record for HauvongMC and help it get players."
- if argument 2 is "about_tryhard":
- message "&aTRYHARDs are 100+ stars on Hypixel."
- if argument 2 is "about_mvp++":
- message "&aMVP++'s are donators to the server."
- if argument 2 is "about_mvp+":
- message "&aMVP+'s are donators to the server."
- if argument 2 is "about_mvp":
- message "&aMVP's are donators to the server."
- if argument 2 is "about_vip+":
- message "&aVIP+'s are donators to the server."
- if argument 2 is "about_vip":
- message "&aVIP's are donators to the server."
- if argument 2 is "about_default":
- message "&aDefaults or Nons or Nulls are people who are normal! How us Owners pity them!"
- if argument 2 is "about_cookie":
- message "&cPfft, this is a developer note! You hacker!"
- stop
- else:
- if argument 1 is set:
- if argument 2 is set:
- if arg-2 is "OWNER":
- message "&aPlayer &c[OWNER] %arg-1% &ais now rank OWNER"
- send "&aYou are now OWNER" to arg-1
- set {chucvu.%player%} to "owner"
- set {rankdisplay.%uuid of arg-1%} to "&c[OWNER]"
- set {rankboard.%uuid of arg-1%} to "&cOWNER"
- execute console command "/ne player %arg-1% prefix &c[OWNER] &c"
- execute console command "/lp user %arg-1% group set owner"
- if arg-2 is "ADMIN":
- message "&aPlayer &c[ADMIN] %arg-1% &ais now rank ADMIN"
- send "&aYou are now ADMIN" to arg-1
- set {chucvu.%player%} to "admin"
- set {rankdisplay.%uuid of arg-1%} to "&c[ADMIN]"
- set {rankboard.%uuid of arg-1%} to "&cADMIN"
- execute console command "/ne player %arg-1% prefix &c[ADMIN] &c"
- execute console command "/lp user %arg-1% group set admin"
- if arg-2 is "MOD":
- message "&aPlayer &2[MOD] %arg-1% &ais now rank MOD"
- send "&aYou are now MOD" to arg-1
- set {chucvu.%player%} to "mod"
- set {rankdisplay.%uuid of arg-1%} to "&2[MOD]"
- set {rankboard.%uuid of arg-1%} to "&2MOD"
- execute console command "/ne player %arg-1% prefix &2[MOD] &2"
- execute console command "/lp user %arg-1% group set mod"
- if arg-2 is "HELPER":
- message "&aPlayer &9[HELPER] %arg-1% &ais now rank HELPER"
- send "&aYou are now HELPER" to arg-1
- set {chucvu.%player%} to "helper"
- set {rankdisplay.%uuid of arg-1%} to "&9[HELPER]"
- set {rankboard.%uuid of arg-1%} to "&9HELPER"
- execute console command "/ne player %arg-1% prefix &9[HELPER] &9"
- execute console command "/lp user %arg-1% group set helper"
- if arg-2 is "YOUTUBE":
- message "&aPlayer &c[&fYOUTUBE&c] %arg-1% &ais now rank YOUTUBER"
- send "&aYou are now YOUTUBER" to arg-1
- set {chucvu.%player%} to "yt"
- set {rankdisplay.%uuid of arg-1%} to "&c[&fYOUTUBE&c]"
- set {rankboard.%uuid of arg-1%} to "&fYOUTUBE"
- execute console command "/ne player %arg-1% prefix &c[&fYOUTUBE&c] &c"
- execute console command "/lp user %arg-1% group set yt"
- if arg-1 is not online:
- stop
- loop 7 times:
- send all players title "&6<o/" with subtitle "&c[&fYOUTUBER&c] %arg-1%" for 2 seconds with 0 tick fade in and 0 tick fade out
- wait 10 ticks
- set {firework} to a random integer from 1 to 5
- if {firework} is 1:
- launch creeper firework colored red at all players timed 1
- if {firework} is 2:
- launch burst firework colored green at all players timed 1
- if {firework} is 3:
- launch ball firework colored yellow at all players timed 1
- if {firework} is 4:
- launch ball firework colored blue at all players timed 1
- if {firework} is 5:
- launch burst firework colored red at all players timed 1
- send all players title "&c\\o>" with subtitle "&c[&fYOUTUBER&c] %arg-1%" for 2 seconds with 0 tick fade in and 0 tick fade out
- wait 10 ticks
- set {firework} to a random integer from 1 to 5
- if {firework} is 1:
- launch creeper firework colored red at all players timed 1
- if {firework} is 2:
- launch burst firework colored green at all players timed 1
- if {firework} is 3:
- launch ball firework colored yellow at all players timed 1
- if {firework} is 4:
- launch ball firework colored blue at all players timed 1
- if {firework} is 5:
- launch burst firework colored red at all players timed 1
- send all players title "&6<o/" with subtitle "&c[&fYOUTUBER&c] %arg-1%" for 7 seconds with 0 tick fade in and 10 tick fade out
- if arg-2 is "D.HELPER":
- message "&aPlayer &9[D.HELPER] %arg-1% &ais now rank D.HELPER"
- send "&aYou are now D.HELPER" to arg-1
- set {chucvu.%player%} to "dhelper"
- set {rankdisplay.%uuid of arg-1%} to "&9[D.HELPER]"
- set {rankboard.%uuid of arg-1%} to "&9D.HELPER"
- execute console command "/ne player %arg-1% prefix &9[D.HELPER] &9"
- execute console command "/lp user %arg-1% group set d.helper"
- if arg-2 is "D.MOD":
- message "&aPlayer &2[D.MOD] %arg-1% &ais now rank D.MOD"
- send "&aYou are now D.MOD" to arg-1
- set {chucvu.%player%} to "dmod"
- set {rankdisplay.%uuid of arg-1%} to "&2[D.MOD]"
- set {rankboard.%uuid of arg-1%} to "&2D.MOD"
- execute console command "/ne player %arg-1% prefix &2[D.MOD] &2"
- execute console command "/lp user %arg-1% group set d.mod"
- if arg-2 is "D.ADMIN":
- message "&aPlayer &c[D.ADMIN] %arg-1% &ais now rank D.ADMIN"
- send "&aYou are now D.ADMIN" to arg-1
- set {chucvu.%player%} to "dadmin"
- set {rankdisplay.%uuid of arg-1%} to "&c[D.ADMIN]"
- set {rankboard.%uuid of arg-1%} to "&cD.ADMIN"
- execute console command "/ne player %arg-1% prefix &c[D.ADMIN] &c"
- execute console command "/lp user %arg-1% group set d.admin"
- if arg-2 is "MVP++":
- message "&aPlayer &6[MVP&c++&6] %arg-1% &ais now rank MVP++"
- send "&aYou are now MVP++" to arg-1
- set {chucvu.%player%} to "mvp++"
- set {rankdisplay.%uuid of arg-1%} to "&6[MVP&c++&6]"
- set {rankboard.%uuid of arg-1%} to "&6MVP&c++"
- execute console command "/ne player %arg-1% prefix &6[MVP&c++&6] &6"
- execute console command "/lp user %arg-1% group set mvp++"
- if arg-2 is "MVP+":
- message "&aPlayer &b[MVP&c+&b] %arg-1% &ais now rank MVP+"
- send "&aYou are now MVP+" to arg-1
- set {chucvu.%player%} to "mvp+"
- set {rankdisplay.%uuid of arg-1%} to "&b[MVP&c+&b]"
- set {rankboard.%uuid of arg-1%} to "&bMVP&c+"
- execute console command "/ne player %arg-1% prefix &b[MVP&c+&b] &b"
- execute console command "/lp user %arg-1% group set mvp+"
- if arg-2 is "MVP":
- message "&aPlayer &b[MVP] %arg-1% &ais now rank MVP"
- send "&aYou are now MVP" to arg-1
- set {chucvu.%player%} to "mvp"
- set {rankdisplay.%uuid of arg-1%} to "&b[MVP]"
- set {rankboard.%uuid of arg-1%} to "&bMVP"
- execute console command "/ne player %arg-1% prefix &b[MVP] &b"
- execute console command "/lp user %arg-1% group set mvp"
- if arg-2 is "VIP+":
- message "&aPlayer &a[VIP&6+&a] %arg-1% &ais now rank VIP+"
- send "&aYou are now VIP+" to arg-1
- set {chucvu.%player%} to "vip+"
- set {rankdisplay.%uuid of arg-1%} to "&a[VIP&6+&a]"
- set {rankboard.%uuid of arg-1%} to "&aVIP&6+"
- execute console command "/ne player %arg-1% prefix &a[VIP&6+&a] &a"
- execute console command "/lp user %arg-1% group set vip+"
- if arg-2 is "VIP":
- message "&aPlayer &a[VIP] %arg-1% &ais now rank VIP"
- send "&aYou are now VIP" to arg-1
- set {chucvu.%player%} to "vip"
- set {rankdisplay.%uuid of arg-1%} to "&a[VIP]"
- set {rankboard.%uuid of arg-1%} to "&aVIP"
- execute console command "/ne player %arg-1% prefix &a[VIP] &a"
- execute console command "/lp user %arg-1% group set vip"
- if arg-2 is "DEFAULT":
- message "&aPlayer &7%arg-1% &ais now rank DEFAULT"
- send "&aYou are now DEFAULT" to arg-1
- set {chucvu.%player%} to "default"
- set {rankdisplay.%uuid of arg-1%} to "&7"
- set {rankboard.%uuid of arg-1%} to "&7Default"
- execute console command "/ne player %arg-1% prefix &7"
- execute console command "/lp user %arg-1% group set default"
- if arg-2 is not "OWNER", "ADMIN", "MOD", "HELPER", "YOUTUBE", "D.ADMIN", "D.MOD", "D.HELPER", "TRYHARD", "MVP++", "MVP+", "MVP", "VIP+", "VIP" or "DEFAULT":
- #message "&cInvalid Rank!"
- json("%player%", "&cInvalid Rank! Click|| &c&ohere||ttp:&cClick to view a list of ranks!||cmd:/rank help ranks || &cto view a list of ranks.", false)
- stop
- else:
- json("%player%", "&cUse: /rank (username)|| &c(rank)||ttp:&cClick to view a list of ranks.||cmd:/rank help ranks", false)
- else:
- json("%player%", "&cUse: /rank (username)|| &c(rank)||ttp:&cClick to view a list of ranks.||cmd:/rank help ranks", false)
- on connect:
- if {chucvu.%player%} is not set:
- set {chucvu.%player%} to "default"
- set {rankdisplay.%uuid of player%} to "&7"
- set {rankboard.%uuid of player%} to "&7Default"
- add 1 to {achievements.%uuid of player%}
- add 1 to {level.%uuid of player%}
- if {level.%uuid of player%} is not set:
- add 1 to {level.%uuid of player%}
- if {achievements.%uuid of player%} is not set:
- add 1 to {achievements.%uuid of player%}
- else:
- if {level.%uuid of player%} is not set:
- add 1 to {level.%uuid of player%}
- if {achievements.%uuid of player%} is not set:
- add 1 to {achievements.%uuid of player%}
- on join:
- if {chucvu.%player%} is not set:
- execute console command "ne player %player% prefix &7"
- on tab completer for "/help":
- cancel event
- on join:
- if {vanish.%player%} is not set:
- set {vanish.%player%} to false
- on join:
- if {chucvu.%player%} is "default":
- set join message to ""
- execute console command "/ne player %player% prefix &7"
- stop
- if {vanish.%player%} is not true:
- if {chucvu.%player%} is "vip":
- set join message to "&a[VIP] %player% &6joined the lobby!"
- execute console command "ne player %player% prefix &a[VIP] &a"
- if {chucvu.%player%} is "vip+":
- set join message to "&a[VIP&6+&a] &a%player% &6joined the lobby!"
- execute console command "ne player %player% prefix &a[VIP&6+&a] &a"
- if {chucvu.%player%} is "mvp":
- set join message to "&b[MVP] %player% &6joined the lobby!"
- execute console command "ne player %player% prefix &b[MVP] &b"
- if {chucvu.%player%} is "mvp+":
- set join message to "&b[MVP&c+&b] &b%player% &6joined the lobby!"
- execute console command "ne player %player% prefix &b[MVP&c+&b] &b"
- if {chucvu.%player%} is "mvp++":
- set join message to " &3>&c>&a> &6[MVP&c++&6] &6%player% &6joined the lobby! &a<&c<&3<"
- execute console command "ne player %player% prefix &6[MVP&c++&6] &6"
- stop
- if {rankdisplay.%uuid of player%} is "&d[TRYHARD]":
- set join message to "&d[TRYHARD] %player% &6joined the lobby!"
- execute console command "ne player %player% prefix &d[TRYHARD] &d"
- stop
- if {chucvu.%player%} is "yt":
- set join message to "&c[&fYOUTUBE&c] %player% &6joined the lobby!"
- execute console command "ne player %player% prefix &c[&fYOUTUBE&c] &c"
- if {chucvu.%player%} is "dhelper":
- set join message to "&9[D.HELPER] %player% &6joined the lobby!"
- execute console command "ne player %player% prefix &9[D.HELPER] &9"
- if {chucvu.%player%} is "helper":
- set join message to "&9[HELPER] %player% &6joined the lobby!"
- execute console command "ne player %player% prefix &9[HELPER] &9"
- if {chucvu.%player%} is "dmod":
- set join message to "&2[D.MOD] %player% &6joined the lobby!"
- execute console command "ne player %player% prefix &2[D.MOD] &2"
- if {chucvu.%player%} is "mod":
- set join message to "&2[MOD] %player% &6joined the lobby!"
- execute console command "ne player %player% prefix &2[MOD] &2"
- if {chucvu.%player%} is "dadmin":
- set join message to "&c[D.ADMIN] %player% &6joined the lobby!"
- execute console command "ne player %player% prefix &c[D.ADMIN] &c"
- if {chucvu.%player%} is "admin":
- set join message to "&c[ADMIN] %player% &6joined the lobby!"
- execute console command "ne player %player% prefix &c[ADMIN] &c"
- if {chucvu.%player%} is "owner":
- set join message to "&c[OWNER] %player% &6joined the lobby!"
- execute console command "ne player %player% prefix &c[OWNER] &c"
- else:
- set join message to ""
- loop all players:
- if {rank.%uuid of loop-player%} is not "yt", "mod", "admin", "owner" or "dev":
- add loop-player to {_vanishto::*}
- hide player from {_vanishto::*}
- set {vanish.%player%} to true
- send "&aYou vanished!"
- set action bar of player to "You are currently &cVANISHED"
- stop
- on quit:
- set leave message to ""
- command /msg [<offline player>] [<text>]:
- aliases: /tell, /message, /whisper, /w
- trigger:
- if argument 1 is set:
- if arg-1 is online:
- if argument 2 is set:
- if {chucvu.%player%} is not set:
- message "&cnull"
- stop
- if {chucvu.%player%} is not set:
- message "&cnull"
- stop
- if {chucvu.%player%} is "default":
- if {chucvu.%player%} is "default":
- message "&dTo &7%arg-1%: %arg 2%"
- loop all players:
- if loop-player is arg-1:
- send "&dFrom &7%executor%: &7%arg 2%" to loop-player
- else:
- message "&dTo &7%{rankdisplay.%uuid of arg-1%}% %arg-1%: &7%arg 2%"
- loop all players:
- if loop-player is arg-1:
- send "&dFrom &7%executor%: &7%arg 2%" to loop-player
- else:
- if {chucvu.%player%} is "default":
- message "&dTo &7%arg-1%: %arg 2%"
- loop all players:
- if loop-player is arg-1:
- send "&dFrom %{rankdisplay.%uuid of executor%}% %executor%: &7%arg 2%" to loop-player
- else:
- message "&dTo &7%{rankdisplay.%uuid of arg-1%}% %arg-1%: &7%arg 2%"
- loop all players:
- if loop-player is arg-1:
- send "&dFrom %{rankdisplay.%uuid of executor%}% %executor%: &7%arg 2%" to loop-player
- else:
- message "&cInvalid usage! Use: /msg (player) (message)"
- stop
- else:
- message "&cThat player is not online!"
- stop
- else:
- message "&cInvalid usage! Use: /msg (player) (message)"
- stop
- on portal enter:
- stop
- on tab completer for "/tp":
- if argument at 1 is not "here":
- add "here" to completions
- add "all" to completions
- stop
- else:
- if argument at 1 is "here":
- loop all players:
- add "%loop-player%" to completions
- stop
- command /gm [<text>]:
- trigger:
- if {chucvu.%player%} is "admin", "dadmin", "owner" or "dev":
- if argument 1 is set:
- if argument 1 is "1", "c" or "creative":
- message "&aYour gamemode has been updated to CREATIVE mode"
- set gamemode of player to creative
- else:
- if argument 1 is "0", "s" or "survival":
- message "&aYour gamemode has been updated to SURVIVAL mode"
- set gamemode of player to survival
- else:
- if argument 1 is "2", "a" or "adventure":
- message "&aYour gamemode has been updated to ADVENTURE mode"
- set gamemode of player to adventure
- else:
- message "&aYour gamemode has been updated to SURVIVAL mode"
- set gamemode of player to survival
- else:
- message "&cInvalid Usage! /gamemode (mode)"
- else:
- message "&cI'm sorry, but you do not have permission to perform this"
- message "&ccommand. Please contact the server administrators if you"
- message "&cbelieve that this is an error."
- command /vanish [<text>]:
- aliases: /v
- trigger:
- if {chucvu.%player%} is "yt", "mod", "dhelper", "dmod", "dadmin", "admin", "owner" or "dev":
- if {vanish.%player%} is true:
- loop all players:
- if {rank.%uuid of loop-player%} is not "yt", "mod", "dhelper", "dmod", "dadmin", "admin", "owner" or "dev":
- add loop-player to {_vanishto::*}
- reveal player from all players
- set {vanish.%player%} to false
- send "&aYou reappeared!"
- if {nick.%player%} is true:
- set action bar of player to "You are currently &cNICKED"
- stop
- set action bar of player to coloured ""
- set player tab name to "%player%"
- set player's nametag to "%player%"
- if {chucvu.%player%} is "default":
- execute console command "ne player %player% prefix &7"
- stop
- if {chucvu.%player%} is "vip":
- execute console command "ne player %player% prefix &a[VIP] &a"
- stop
- if {chucvu.%player%} is "vip+":
- execute console command "ne player %player% prefix &a[VIP&6+&a] &a"
- stop
- if {chucvu.%player%} is "mvp":
- execute console command "ne player %player% prefix &b[MVP] &b"
- stop
- if {chucvu.%player%} is "mvp+":
- execute console command "ne player %player% prefix &b[MVP&c+&b] &b"
- stop
- if {chucvu.%player%} is "mvp++":
- execute console command "ne player %player% prefix &6[MVP&c++&6] &6"
- stop
- if {chucvu.%player%} is "yt":
- execute console command "ne player %player% prefix &c[&fYOUTUBE&c] &c"
- stop
- if {chucvu.%player%} is "dhelper":
- execute console command "ne player %player% prefix &9[D.HELPER] &9"
- stop
- if {chucvu.%player%} is "helper":
- execute console command "ne player %player% prefix &9[HELPER] &9"
- stop
- if {chucvu.%player%} is "dmod":
- execute console command "ne player %player% prefix &2[D.MOD] &2"
- stop
- if {chucvu.%player%} is "mod":
- execute console command "ne player %player% prefix &2[MOD] &2"
- stop
- if {chucvu.%player%} is "dadmin":
- execute console command "ne player %player% prefix &c[D.ADMIN] &c"
- stop
- if {chucvu.%player%} is "admin":
- execute console command "ne player %player% prefix &c[ADMIN] &c"
- stop
- if {chucvu.%player%} is "owner":
- execute console command "ne player %player% prefix &c[OWNER] &c"
- stop
- else:
- loop all players:
- if {rank.%uuid of loop-player%} is not "yt", "mod", "dhelper", "dmod", "dadmin", "admin", "owner" or "dev":
- add loop-player to {_vanishto::*}
- hide player from {_vanishto::*}
- set {vanish.%player%} to true
- send "&aYou vanished!"
- if {nick.%player%} is true:
- set action bar of player to "Bạn đang &cTÀNG HÌNH&f, &cĐỔI TÊN"
- stop
- set action bar of player to "Bạn đang &cTÀNG HÌNH"
- else:
- message "&cYou do not have permission to use this command!"
- every 2 seconds:
- loop all players:
- if {vanish.%loop-player%} is true:
- if {nick.%loop-player%} is not true:
- set action bar of loop-player to "Bạn đang &cTÀNG HÌNH"
- else:
- set action bar of loop-player to "Bạn đang &cTÀNG HÌNH&f, &cĐỔI TÊN"
- if {nick.%loop-player%} is true:
- if {vanish.%loop-player%} is not true:
- set action bar of loop-player to "Bạn đang &cĐỔI TÊN"
- else:
- set action bar of loop-player to "Bạn đang &cTÀNG HÌNH&f, &cĐỔI TÊN"
- on skript load:
- delete {signguis::*}
- on script load:
- import "org.bukkit.Material"
- function clientBlock(location: location, type: object, viewers: players, data: int = 0):
- set {_material} to check [{_type} is a text] ? try {Material}.valueOf({_type}.toUpperCase()) : ({_type}.getRandom() ? {_type}).getType()
- set {_args::*} to {_location}, {_material} and {_data}
- loop {_viewers::*}:
- try loop-value.sendBlockChange({_args::*});
- function clientSign(players: players, location: location, 1: string = "", 2: string = "", 3: string = "", 4: string = ""):
- set {_args::*} to {_location}
- add [({_1}, {_2}, {_3} and {_4}) as string] to {_args::*}
- loop {_players::*}:
- try loop-value.sendSignChange({_args::*});
- function getLines(packet: packet) :: strings:
- loop ...{_packet}.getHandle().b():
- add "%loop-value.getText()%" to {_lines::*}
- return {_lines::*}
- function signGUI(player: player, 1: string = "", 2: string = "", 3: string = "", 4: string = ""):
- set {_x} to x-loc of {_player}
- set {_z} to z-loc of {_player}
- set {_y} to y-loc of {_player}
- set {_world} to world of {_player}
- set {_packet} to new play_server_open_sign_editor packet
- set {_location} to location(round({_x}), 0, round({_z}), {_world})
- set location pinfo 0 of {_packet} to {_location}
- if "%{_1}%%{_2}%%{_3}%%{_4}%" is not "":
- clientBlock({_location}, "sign_post", {_player})
- clientSign({_player}, {_location}, {_1}, {_2}, {_3}, {_4})
- set {_reset} to true
- send {_player} packet {_packet}
- set {_uuid} to uuid of {_player}
- set {signguis::%{_uuid}%} to true
- if {_reset} is set:
- set {_type} to type of block at {_location}
- clientBlock({_location}, {_type}, {_player})
- on packet event play_client_update_sign:
- if {signguis::%player's uuid%} is set:
- delete {signguis::%player's uuid%}
- sync:
- call custom event "sign gui done" to details (event-player, event-packet, world of {_location} and {_location}) args getLines(event-packet)
- evt "sign gui done":
- set {_lines::*} to custom event's args
- replace all " " with "" in {_lines::1}
- set {_n} to the length of {_lines::1}
- if {_n} is greater than 16:
- send "&cThat name is not permitted!"
- stop
- if {_lines::1} contains "~" or "`" or "!" or "@" or "##" or "$" or "%%" or "^" or "&" or "*" or "(" or ")" or "-" or "=" or "+" or "[" or "]" or "{" or "}" or ":" or ";" or "," or "<" or ">" or "." or "?" or "/" or "\":
- send "&cThat name is not permitted!"
- stop
- set {_p1} to "%{_lines::1}%" parsed as offline player
- set {_l1} to "%{_lines::1}%" parsed as text
- if {_p1} is online:
- send "&cThat name is not permitted!"
- stop
- set {_uuidp1} to uuid of {_p1}
- if {rank.%{_uuidp1}%} is not "default", "vip", "vip+", "mvp", "mvp+" or "mvp++":
- send "&cThat name is not permitted!"
- stop
- message "&aYou are now nicked as %{_l1}%"
- set {nickname.%player%} to "%{_l1}%"
- set {nick.%player%} to true
- set {nk1} to "&a[VIP] &a"
- set {nk2} to "&a[VIP&c+&a] &a"
- set {nk3} to "&b[MVP] &b"
- set {nk4} to "&b[MVP&c+&b] &b"
- if {nickrank.%player%} is "DEFAULT":
- execute console command "/ne player %player% prefix &7"
- set player's nametag to colored "&7%{_l1}%"
- set player's tab list name to "&7%{_l1}%"
- wait 2 tick
- set player's tab list name to "&7%{_l1}%"
- execute console command "essentials:nick %player% &7%{_l1}%"
- execute console command "/ne reload"
- execute console command "pex user %player% group set nk"
- if {nickrank.%player%} is "VIP":
- execute console command "/ne player %player% prefix &a[VIP] &a"
- set player's nametag to colored "&a%{_l1}%"
- set player's tab list name to "&a[VIP] &a%{_l1}%"
- wait 2 tick
- set player's tab list name to "&a%{_l1}%"
- execute console command "pex user %player% group set nk1"
- execute console command "essentials:nick %player% &a%{_l1}%"
- execute console command "/ne reload"
- if {nickrank.%player%} is "VIP_PLUS":
- execute console command "/ne player %player% prefix &a[VIP&c+&a] &a"
- set player's nametag to colored "&a%{_l1}%"
- set player's tab list name to "&a[VIP&c+&a] &a%{_l1}%"
- wait 2 tick
- set player's tab list name to "&a%{_l1}%"
- execute console command "pex user %player% group set nk2"
- execute console command "essentials:nick %player% &a%{_l1}%"
- execute console command "/ne reload"
- if {nickrank.%player%} is "MVP":
- execute console command "/ne player %player% prefix &b[MVP] &b"
- set player's nametag to colored "&b%{_l1}%"
- set player's tab list name to "&b[MVP&&B] %{_l1}%"
- wait 2 tick
- set player's tab list name to "&b%{_l1}%"
- execute console command "essentials:nick %player% &b%{_l1}%"
- execute console command "pex user %player% group set nk3"
- execute console command "/ne reload"
- if {nickrank.%player%} is "MVP_PLUS":
- execute console command "/ne player %player% prefix &b[MVP&c+&b] &b"
- set player's nametag to colored "&b%{_l1}%"
- set player's tab list name to "&b[MVP&C+&B] %{_l1}%"
- wait 2 tick
- set player's tab list name to "&b%{_l1}%"
- execute console command "essentials:nick %player% &b%{_l1}%"
- execute console command "pex user %player% group set nk4"
- execute console command "/ne reload"
- if player's displayed skin is not player's skin:
- reset player's displayed skin
- access "getSkin" from {_l1}
- wait 7 ticks
- if {_skin} is set:
- set player's displayed skin to {_skin}
- if {vanish.%player%} is true:
- set action bar of player to "You are currently &cVANISHED&f, &cNICKED"
- else:
- set action bar of player to "You are currently &cNICKED"
- execute console command "/ne reload"
- set {_book} to a new book
- set {_component} to a new text component with "Bạn đã thành công%nl%thiết lâp lại tên của bạn!%nl%%nl%Tên của bạn sẽ được chuyển thành%nl%"
- if {nickrank.%player%} is "DEFAULT":
- set {_component1} to a new text component with "&7%{_l1}%"
- if {nickrank.%player%} is "VIP":
- set {_component1} to a new text component with "&a[VIP] %{_l1}%"
- if {nickrank.%player%} is "VIP_PLUS":
- set {_component1} to a new text component with "&a[VIP&6+&a] %{_l1}%"
- if {nickrank.%player%} is "MVP":
- set {_component1} to a new text component with "&b[MVP] %{_l1}%"
- if {nickrank.%player%} is "MVP_PLUS":
- set {_component1} to a new text component with "&b[MVP&c+&b] %{_l1}%"
- if {nickrank.%player%} is "MVP_PLUS_PLUS":
- set {_component1} to a new text component with "&6[MVP&c++&6] %{_l1}%"
- set {_component2} to a new text component with "%nl%"
- set {_component3} to a new text component with "%nl%&rĐể có thể xóa bỏ%nl%và quay lại bạn của ngày xưa, sử dụng:%nl%&l/nick reset"
- add {_component} to {_nick::*}
- add {_component1} to {_nick::*}
- add {_component2} to {_nick::*}
- add {_component3} to {_nick::*}
- add text components {_nick::*} to book {_book}
- open book {_book} to player
- command /nick [<text>]:
- trigger:
- if argument 1 is set:
- if argument 1 is "reset":
- if {nick.%player%} is true:
- set {nick.%player%} to false
- delete {nickname.%player%}
- execute console command "essentials:nick %player% off"
- send "&aĐã unnick thành công!"
- message "&aTên của bạn đã được đặt lại!"
- set action bar of player to coloured ""
- set player tab name to "%player%"
- set player's nametag to "%player%"
- reset player's displayed skin
- if {chucvu.%player%} is "default":
- execute console command "ne player %player% prefix &7"
- execute console command "pex user %player% group set default"
- stop
- if {chucvu.%player%} is "vip":
- execute console command "ne player %player% prefix &a[VIP] &a"
- execute console command "pex user %player% group set VIP"
- stop
- if {chucvu.%player%} is "vip+":
- execute console command "ne player %player% prefix &a[VIP&6+&a] &a"
- execute console command "pex user %player% group set VIP+"
- stop
- if {chucvu.%player%} is "mvp":
- execute console command "ne player %player% prefix &b[MVP] &b"
- execute console command "pex user %player% group set MVP"
- stop
- if {chucvu.%player%} is "mvp+":
- execute console command "ne player %player% prefix &b[MVP&c+&b] &b"
- execute console command "pex user %player% group set MVP+"
- stop
- if {chucvu.%player%} is "yt":
- execute console command "ne player %player% prefix &c[&fYOUTUBE&c] &c"
- execute console command "pex user %player% group set YOUTUBER"
- stop
- if {chucvu.%player%} is "dhelper":
- execute console command "ne player %player% prefix &9[D.HELPER] &9"
- execute console command "pex user %player% group set D.HELPER"
- stop
- if {chucvu.%player%} is "helper":
- execute console command "ne player %player% prefix &9[HELPER] &9"
- execute console command "pex user %player% group set HELPER"
- stop
- if {chucvu.%player%} is "dmod":
- execute console command "ne player %player% prefix &2[D.MOD] &2"
- execute console command "pex user %player% group set D.MOD"
- stop
- if {chucvu.%player%} is "mod":
- execute console command "ne player %player% prefix &2[MOD] &2"
- execute console command "pex user %player% group set MOD"
- stop
- if {chucvu.%player%} is "dadmin":
- execute console command "ne player %player% prefix &c[D.ADMIN] &c"
- execute console command "pex user %player% group set D.ADMIN"
- stop
- if {chucvu.%player%} is "admin":
- execute console command "ne player %player% prefix &c[ADMIN] &c"
- execute console command "pex user %player% group set ADMIN"
- stop
- if {chucvu.%player%} is "owner":
- execute console command "ne player %player% prefix &c[OWNER] &c"
- execute console command "pex user %player% group set OWNER"
- stop
- if {vanish.%player%} is true:
- set action bar of player to "Hiện tại bạn đang &cTÀNG HÌNH"
- stop
- stop
- else:
- set {_book} to a new book
- set {_component} to a new text component with "Hãy thiết lập biệt danh cho bạn%nl%Đầu tiên, bạn cần phải%nl%chọn &lCHỨC VỤ%nl%mà bạn muốn%nl%hiện khi đã đổi tên.%nl%"
- set {_component1} to a new text component with "%nl%"
- set {_component2} to a new text component with "➤ &7DEFAULT"
- add click event with action RUN_COMMAND with execute "/nickhelp rank DEFAULT" to text component {_component2}
- add hover event with action SHOW_TEXT with text "&7Nhấn vào đây để hiện với &7Default" to text component {_component2}
- set {_component3} to a new text component with "%nl%➤ &aVIP"
- add click event with action RUN_COMMAND with execute "/nickhelp rank VIP" to text component {_component3}
- add hover event with action SHOW_TEXT with text "&7Nhấn vào đây để hiện với &aVIP" to text component {_component3}
- set {_component4} to a new text component with "%nl%➤ &aVIP&6+"
- add click event with action RUN_COMMAND with execute "/nickhelp rank VIP_PLUS" to text component {_component4}
- add hover event with action SHOW_TEXT with text "&7Nhấn vào đây để hiện với &aVIP&6+" to text component {_component4}
- set {_component5} to a new text component with "%nl%➤ &bMVP"
- add click event with action RUN_COMMAND with execute "/nickhelp rank MVP" to text component {_component5}
- add hover event with action SHOW_TEXT with text "&7Nhấn vào đây để hiện với &bMVP" to text component {_component5}
- set {_component6} to a new text component with "%nl%➤ &bMVP&c+"
- add click event with action RUN_COMMAND with execute "/nickhelp rank MVP_PLUS" to text component {_component6}
- add hover event with action SHOW_TEXT with text "&7Nhấn vào đây để hiện với &bMVP&c+" to text component {_component6}
- add {_component} to {_nick::*}
- add {_component1} to {_nick::*}
- add {_component2} to {_nick::*}
- add {_component3} to {_nick::*}
- add {_component4} to {_nick::*}
- add {_component5} to {_nick::*}
- add {_component6} to {_nick::*}
- add text components {_nick::*} to book {_book}
- open book {_book} to player
- command /nickhelp [<text>] [<text>]:
- permission: nick.use
- permission message: &cBạn không có quyền!
- trigger:
- if argument 1 is not set:
- stop
- else if argument 2 is not set:
- stop
- else:
- if argument 1 is "rank":
- if argument 2 is "DEFAULT":
- send "&aĐã chuyển chức vụ thành &7DEFAULT&a!"
- set {nickrank.%player%} to "DEFAULT"
- else:
- if argument 2 is "VIP":
- message "&aĐã chuyển chức vụ thành &aVIP&a!"
- set {nickrank.%player%} to "VIP"
- if argument 2 is "VIP_PLUS":
- message "&aĐã chuyển chức vụ thành &aVIP&6+&a!"
- set {nickrank.%player%} to "VIP_PLUS"
- if argument 2 is "MVP":
- message "&aĐã chuyển chức vụ thành &bMVP&a!"
- set {nickrank.%player%} to "MVP"
- if argument 2 is "MVP_PLUS":
- message "&aĐã chuyển chức vụ thành &bMVP&c+&a!"
- set {nickrank.%player%} to "MVP_PLUS"
- set {_book} to a new book
- set {_component} to a new text component with "Tốt, bây giờ bạn cần%nl%chọn &lTÊN &r%nl%mà bạn muốn sử dụng!"
- set {_component1} to a new text component with "%nl%"
- set {_component2} to a new text component with "%nl%➤ Nhập tên"
- add click event with action RUN_COMMAND with execute "/nickhelp sign start" to text component {_component2}
- add hover event with action SHOW_TEXT with text "&7Nhấn để nhập tên." to text component {_component2}
- set {_component3} to a new text component with "%nl%➤ Sử dụng random tên"
- add click event with action RUN_COMMAND with execute "/nickhelp random name" to text component {_component3}
- add hover event with action SHOW_TEXT with text "&7Nhấn để đặt tên bất kì." to text component {_component3}
- add {_component} to {_nick::*}
- add {_component1} to {_nick::*}
- add {_component2} to {_nick::*}
- add {_component3} to {_nick::*}
- add text components {_nick::*} to book {_book}
- open book {_book} to player
- if argument 1 is "sign":
- signGUI(player, " ", "^^^^^^^^^^^^^^^", "Hãy viết", "tên của bạn vào đây")
- if argument 1 is "random":
- set {_a} to random element out of {nicks::*}
- message "&aBạn đã đổi tên thành %{_a}%"
- set {nickname.%player%} to "%{_a}%"
- set {nick.%player%} to true
- if {nickrank.%player%} is "DEFAULT":
- execute console command "/ne player %player% prefix &c"
- set player's nametag to colored "&7%{_a}%"
- set player's tab list name to "&7%{_a}%"
- execute console command "pex user player prefix &7"
- wait 2 tick
- set player's tab list name to "&7%{_a}%"
- set player's display name to "&7%{_a}%"
- execute console command "/ne reload"
- if {nickrank.%player%} is "VIP":
- execute console command "/ne player %player% prefix &a[VIP] &a"
- set player's nametag to colored "&a%{_a}%"
- set player's tab list name to "&a%{_a}%"
- wait 2 tick
- set player's tab list name to "&a%{_a}%"
- execute console command "/ne reload"
- if {nickrank.%player%} is "VIP_PLUS":
- execute console command "/ne player %player% prefix &a[VIP&c+&a] &a"
- set player's nametag to colored "&a%{_a}%"
- set player's tab list name to "&a%{_a}%"
- wait 2 tick
- set player's tab list name to "&a%{_a}%"
- execute console command "/ne reload"
- if {nickrank.%player%} is "MVP":
- execute console command "/ne player %player% prefix &b[MVP] &b"
- set player's nametag to colored "&b%{_a}%"
- set player's tab list name to "&b%{_a}%"
- wait 2 tick
- set player's tab list name to "&b%{_a}%"
- execute console command "/ne reload"
- if {nickrank.%player%} is "MVP_PLUS":
- execute console command "/ne player %player% prefix &b[MVP&c+&b] &b"
- set player's nametag to colored "&b%{_a}%"
- set player's tab list name to "&b%{_a}%"
- wait 2 tick
- set player's tab list name to "&b%{_a}%"
- execute console command "/ne reload"
- if player's displayed skin is not player's skin:
- reset player's displayed skin
- access "getSkin" from {_a}
- wait 7 ticks
- if {_skin} is set:
- set player's displayed skin to {_skin}
- if {vanish.%player%} is true:
- set action bar of player to "Hiện tại bạn đang &cTÀNG HÌNH&f, &cĐỔI TÊN"
- else:
- set action bar of player to "Hiện tại ban đang &cĐỔI TÊN"
- execute console command "/ne reload"
- set {_book} to a new book
- set {_component} to a new text component with "You have finished%nl%setting up your nickname!%nl%%nl%You will be nicked as%nl%"
- if {nickrank.%player%} is "DEFAULT":
- set {_component1} to a new text component with "&7%{_a}%"
- if {nickrank.%player%} is "VIP":
- set {_component1} to a new text component with "&a[VIP] %{_a}%"
- if {nickrank.%player%} is "VIP_PLUS":
- set {_component1} to a new text component with "&a[VIP&6+&a] %{_a}%"
- if {nickrank.%player%} is "MVP":
- set {_component1} to a new text component with "&b[MVP] %{_a}%"
- if {nickrank.%player%} is "MVP_PLUS":
- set {_component1} to a new text component with "&b[MVP&c+&b] %{_a}%"
- if {nickrank.%player%} is "MVP_PLUS_PLUS":
- set {_component1} to a new text component with "&6[MVP&c++&6] %{_a}%"
- set {_component2} to a new text component with "%nl%"
- set {_component3} to a new text component with "%nl%&rTo go back to being%nl%your usual self, type:%nl%&l/nick reset"
- add {_component} to {_nick::*}
- add {_component1} to {_nick::*}
- add {_component2} to {_nick::*}
- add {_component3} to {_nick::*}
- add text components {_nick::*} to book {_book}
- open book {_book} to player
- command /oldnick [<text>]:
- permission: op
- permission message: &cThis command is disabled.
- trigger:
- if {chucvu.%player%} is "yt", "mod", "admin", "owner" or "dev":
- if {nick.%player%} is not true:
- if argument 1 is set:
- set {_n} to the length of arg 1
- if arg-1 contains " ":
- send "&cThat name is not permitted!"
- stop
- if {_n} is greater than 16:
- send "&cThat name is not permitted!"
- stop
- if arg-1 contains "~" or "`" or "!" or "@" or "##" or "$" or "%%" or "^" or "&" or "*" or "(" or ")" or "-" or "=" or "+" or "[" or "]" or "{" or "}" or ":" or ";" or "," or "<" or ">" or "." or "?" or "/" or "\":
- send "&cThat name is not permitted!"
- stop
- set {_p1} to "%arg-1%" parsed as offline player
- if {_p1} is online:
- send "&cThat name is not permitted!"
- stop
- set {_uuidp1} to uuid of {_p1}
- if {rank.%{_uuidp1}%} is not "default", "vip", "vip+", "mvp", "mvp+" or "mvp++":
- send "&cThat name is not permitted!"
- stop
- message "&aYou are now nicked as %arg-1%"
- set {nickname.%player%} to "%arg-1%"
- set {nick.%player%} to true
- execute console command "/ne player %executor% prefix &7"
- set player's nametag to colored "&7%arg-1%"
- set player tab name to "&7%arg-1%"
- if player's displayed skin is not player's skin:
- reset player's displayed skin
- access "getSkin" from arg-1
- wait 2 ticks
- if {_skin} is set:
- set player's displayed skin to {_skin}
- if {vanish.%player%} is true:
- set action bar of player to "Bạn đang &cTÀNG HÌNH&f, &cĐỔI TÊN"
- else:
- set action bar of player to "Bạn đang &cĐỔI TÊN"
- else:
- message "&cInvalid Usage! Use /nick (tên)"
- else:
- if argument 1 is "reset":
- execute player command "/unnick"
- stop
- message "&cBạn hiện đang dùng đổi tên! Sử dụng /unnick để bỏ đổi tên!"
- else:
- message "&cYou do not have permission to use this command!"
- command /chucvu:
- trigger:
- if {chucvu.%player%} is "default":
- send "default"
- stop
- if {chucvu.%player%} is "vip":
- send "vip"
- stop
- if {chucvu.%player%} is "vip+":
- send "vip+"
- stop
- if {chucvu.%player%} is "mvp":
- send "mvp"
- stop
- if {chucvu.%player%} is "mvp+":
- send "mvp+"
- stop
- if {chucvu.%player%} is "mvp++":
- send "mvp++"
- stop
- if {chucvu.%player%} is "yt":
- send "yt"
- stop
- if {chucvu.%player%} is "dhelper":
- send "dhelper"
- stop
- if {chucvu.%player%} is "helper":
- send "helper"
- stop
- if {chucvu.%player%} is "dmod":
- send "dmod"
- stop
- if {chucvu.%player%} is "mod":
- send "mod"
- stop
- if {chucvu.%player%} is "dadmin":
- send "dadmin"
- stop
- if {chucvu.%player%} is "admin":
- send "admin"
- stop
- if {chucvu.%player%} is "owner":
- send "owner"
- stop
- command /unnick [<text>]:
- trigger:
- if {chucvu.%player%} is "yt", "mod", "admin", "owner" or "dev":
- if {nick.%player%} is true:
- set {nick.%player%} to false
- delete {nickname.%player%}
- set player's prefix to ""
- if {chucvu.%player%} is "default":
- execute console command "ne player %player% prefix &7"
- execute console command "pex user %player% group set default"
- set player's tab list name to "&7%player%"
- set player's nametag to colored "&7%player%"
- execute console command "essentials:nick %player% off"
- send "&aĐã unnick thành công!"
- stop
- if {chucvu.%player%} is "vip":
- execute console command "ne player %player% prefix &a[VIP] &a"
- execute console command "pex user %player% group set vip"
- set player's tab list name to "&a%player%"
- set player's nametag to colored "&a[VIP] %player%"
- execute console command "essentials:nick %player% off"
- send "&aĐã unnick thành công!"
- stop
- if {chucvu.%player%} is "vip+":
- execute console command "ne player %player% prefix &a[VIP&6+&a] &a"
- execute console command "pex user %player% group set vip+"
- set player's tab list name to "&a%player%"
- set player's nametag to colored "&a[VIP&c+&a] %player%"
- execute console command "essentials:nick %player% off"
- send "&aĐã unnick thành công!"
- stop
- if {chucvu.%player%} is "mvp":
- execute console command "ne player %player% prefix &b[MVP] &b"
- execute console command "pex user %player% group set mvp"
- set player's tab list name to "&b%player%"
- set player's nametag to colored "&b[MVP] %player%"
- execute console command "essentials:nick %player% off"
- send "&aĐã unnick thành công!"
- stop
- if {chucvu.%player%} is "mvp+":
- execute console command "ne player %player% prefix &b[MVP&c+&b] &b"
- execute console command "pex user %player% group set mvp+"
- set player's tab list name to "&b%player%"
- set player's nametag to colored "&b[MVP&c+&b] %player%"
- execute console command "essentials:nick %player% off"
- send "&aĐã unnick thành công!"
- stop
- if {chucvu.%player%} is "mvp++":
- execute console command "ne player %player% prefix &6[MVP&c++&6] &6"
- execute console command "pex user %player% group set mvp++"
- set player's tab list name to "&6%player%"
- set player's nametag to colored "&a6[MVP&C++&6] %player%"
- execute console command "essentials:nick %player% off"
- send "&aĐã unnick thành công!"
- stop
- if {chucvu.%player%} is "yt":
- execute console command "ne player %player% prefix &c[&fYOUTUBE&c] &c"
- execute console command "pex user %player% group set YOUTUBER"
- set player's tab list name to "&c%player%"
- set player's nametag to colored "&c[&FYOUTUBE&C] %player%"
- execute console command "essentials:nick %player% off"
- send "&aĐã unnick thành công!"
- stop
- if {chucvu.%player%} is "dhelper":
- execute console command "ne player %player% prefix &9[D.HELPER] &9"
- execute console command "pex user %player% group set DHelper"
- set player's tab list name to "&9%player%"
- set player's nametag to colored "&9[D.HELPER] %player%"
- execute console command "essentials:nick %player% off"
- send "&aĐã unnick thành công!"
- stop
- if {chucvu.%player%} is "helper":
- execute console command "ne player %player% prefix &9[HELPER] &9"
- execute console command "pex user %player% group set Helper"
- set player's tab list name to "&9%player%"
- set player's nametag to colored "&9[HELPER] %player%"
- execute console command "essentials:nick %player% off"
- send "&aĐã unnick thành công!"
- stop
- if {chucvu.%player%} is "dmod":
- execute console command "ne player %player% prefix &2[D.MOD] &2"
- execute console command "pex user %player% group set dmod"
- set player's tab list name to "&2%player%"
- set player's nametag to colored "&2[D.MOD] %player%"
- execute console command "essentials:nick %player% off"
- send "&aĐã unnick thành công!"
- stop
- if {chucvu.%player%} is "mod":
- execute console command "ne player %player% prefix &2[MOD] &2"
- execute console command "pex user %player% group set mod"
- set player's tab list name to "&2%player%"
- set player's nametag to colored "&2[MOD] %player%"
- execute console command "essentials:nick %player% off"
- send "&aĐã unnick thành công!"
- stop
- if {chucvu.%player%} is "dadmin":
- execute console command "ne player %player% prefix &c[D.ADMIN] &c"
- execute console command "pex user %player% group set dadmin"
- set player's tab list name to "&c%player%"
- set player's nametag to colored "&C[D.ADMIN] %player%"
- execute console command "essentials:nick %player% off"
- send "&aĐã unnick thành công!"
- stop
- if {chucvu.%player%} is "admin":
- execute console command "ne player %player% prefix &c[ADMIN] &c"
- execute console command "pex user %player% group set Admin"
- set player's tab list name to "&c%player%"
- set player's nametag to colored "&C[ADMIN] %player%"
- execute console command "essentials:nick %player% off"
- send "&aĐã unnick thành công!"
- stop
- if {chucvu.%player%} is "owner":
- execute console command "/ne player %player% prefix &c[OWNER] &c"
- execute console command "pex user %player% group set OWNER"
- set player's tab list name to "&c[OWNER] %player%"
- set player's nametag to colored "&C[OWNER] %player%"
- execute console command "essentials:nick %player% off"
- send "&aĐã unnick thành công!"
- stop
- wait 1 tick
- execute console command "/ne reload"
- else:
- message "&cBạn chưa đổi nick!"
- else:
- message "&cBẠn không có quyền sử dụng lệnh này!"
- func "getSkin":
- set {_player} to parameter 1
- set {_uuid} to {_player} parsed as offline player's uuid
- set {_trimmed-uuid-parts::*} to {_uuid} split by "-"
- set {_trimmed-uuid} to join {_trimmed-uuid-parts::*} by ""
- send request to "https://api.mineskin.org/generate/user/%{_trimmed-uuid}%"
- map json last response's body to {_skin-api::*}
- set transient "skinOutput" to skin with value {_skin-api::data::texture::value} signature {_skin-api::data::texture::signature}
- $ access
- set {_skin} to transient "skinOutput"
- return
- command /test:
- trigger:
- execute player command "nick" as op
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement