Advertisement
Guest User

Nick

a guest
Feb 17th, 2020
571
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 54.54 KB | None | 0 0
  1. options:
  2. debug: false
  3. codes: 0|1|2|3|4|5|6|7|8|9|a|b|c|d|e|f|k|l|m|n|o|r
  4.  
  5. function removeColor(msg: text) :: text:
  6. set {_m::*} to {_msg} split at ""
  7.  
  8. set {_color-codes} to "{@codes}"
  9. set {_colors::*} to {_color-codes} split at "|"
  10.  
  11. set {_new} to ""
  12.  
  13. loop {_m::*}:
  14. set {_char} to loop-value
  15. set {_prev} to the last character of {_new}
  16.  
  17. if {_prev} is "&":
  18.  
  19. loop {_colors::*}:
  20.  
  21. if loop-value-2 is {_char}:
  22. set {_skip} to true
  23.  
  24. if {_skip} is set:
  25. delete {_skip}
  26.  
  27. else:
  28. set {_new} to "%{_new}%%{_char}%"
  29.  
  30. return {_new}
  31.  
  32. function jsonColorize(msg: text, default-color: text = "&r") :: text:
  33. set {_m::*} to {_msg} split at ""
  34.  
  35. set {_color-codes} to "{@codes}"
  36. set {_colors::*} to {_color-codes} split at "|"
  37.  
  38. set {_color} to colored {_default-color}
  39. set {_code} to the first character of {_color}
  40.  
  41. set {_new} to ""
  42. set {_skip} to 0
  43.  
  44. loop amount of {_m::*} times:
  45.  
  46. if {_skip} is more than or equal to 1:
  47. subtract 1 from {_skip}
  48.  
  49. else:
  50. set {_char} to {_m::%loop-number%}
  51. set {_next} to {_m::%loop-number + 1%}
  52.  
  53. if {@debug} is true:
  54. broadcast "&a[Character Check] &r%loop-number%: &7%{_char}% &r&onext: &8%{_next}% &r[%{_color}%color&r]"
  55.  
  56. if {_char} is "&" or {_code}:
  57.  
  58. if {@debug} is true:
  59. broadcast "&a[Color Check] &rFOUND: &o%{_char}%%{_next}% &7&m<--&7&o is it valid?"
  60.  
  61. loop {_colors::*}:
  62.  
  63. if loop-value-2 is {_next}:
  64. set {_color} to "%{_color}%%{_code}%%{_next}%"
  65.  
  66. if {_next} is "r":
  67. set {_color} to {_default-color}
  68.  
  69. set {_new} to "%{_new}%%{_color}%"
  70. set {_skip} to 1
  71.  
  72. if {_skip} is less than or equal to 0:
  73. set {_new} to "%{_new}%%{_char}%"
  74.  
  75. else if {_char} is " ":
  76. set {_new} to "%{_new}% %{_color}%"
  77.  
  78. else:
  79. set {_new} to "%{_new}%%{_char}%"
  80.  
  81. return {_new}
  82.  
  83. function jsonSanitize(msg: text) :: text:
  84. if {@debug} is true:
  85. broadcast "&a[Sanitize] &7&oSanitizing input..."
  86.  
  87. set {_m::*} to {_msg} split at ""
  88.  
  89. loop {_m::*}:
  90.  
  91. if loop-value is """":
  92. set {_m::%loop-index%} to "\""" # """
  93.  
  94. else if loop-value is "\":
  95. set {_m::%loop-index%} to "\\"
  96.  
  97. set {_new} to join {_m::*} with ""
  98. return {_new}
  99.  
  100. function jsonFormat(msg: text, color: boolean = true) :: text:
  101. set {_m::*} to {_msg} split at "||"
  102.  
  103. set {_current} to 1
  104.  
  105. loop {_m::*}:
  106. if {_clusters::%{_current}%} is not set:
  107. set {_clusters::%{_current}%} to ""
  108.  
  109. if {_clusters::%{_current}%::text} is not set:
  110. set {_clusters::%{_current}%::text} to jsonSanitize(loop-value)
  111.  
  112. else:
  113. set {_tag} to the first 4 characters of loop-value
  114. set {_value} to subtext of loop-value from characters 5 to the length of loop-value
  115.  
  116. if {_tag} is "ttp:":
  117. set {_clusters::%{_current}%::tooltip} to jsonSanitize({_value})
  118.  
  119. else if {_tag} is "cmd:":
  120. set {_clusters::%{_current}%::command} to jsonSanitize({_value})
  121.  
  122. else if {_tag} is "sgt:":
  123. set {_clusters::%{_current}%::suggest} to jsonSanitize({_value})
  124.  
  125. else if {_tag} is "url:":
  126.  
  127. if {_value} doesn't contain "http://" or "https://":
  128. set {_value} to "http://%{_value}%"
  129.  
  130. set {_clusters::%{_current}%::url} to jsonSanitize({_value})
  131.  
  132. else if {_tag} is "ins:":
  133. set {_clusters::%{_current}%::insertion} to jsonSanitize({_value})
  134.  
  135. else:
  136. add 1 to {_current}
  137. set {_clusters::%{_current}%::text} to jsonSanitize(loop-value)
  138. set {_clusters::%{_current}%} to ""
  139.  
  140. if {@debug} is true:
  141. broadcast "&a[Tag Check] &3cluster:&b%{_current}% &8(&f&o%{_tag}%&8)"
  142.  
  143. loop {_clusters::*}:
  144.  
  145. if {@debug} is true:
  146. broadcast "&a[Cluster Check] &7&oCluster ##%loop-index% exists."
  147.  
  148. set {_i} to loop-index
  149.  
  150. set {_text} to {_clusters::%{_i}%::text}
  151.  
  152. if {_color} is true:
  153. set {_text} to jsonColorize({_text})
  154.  
  155. if {_json} is not set:
  156. set {_json} to "{""text"":""%{_text}%"""
  157. else:
  158. set {_json} to "%{_json}%,{""text"":""%{_text}%"""
  159.  
  160. if {_clusters::%{_i}%::tooltip} is set:
  161.  
  162. if {_color} is true:
  163. set {_tooltip} to jsonColorize({_clusters::%{_i}%::tooltip})
  164.  
  165. else:
  166. set {_tooltip} to {_clusters::%{_i}%::tooltip}
  167.  
  168. set {_json} to "%{_json}%,""hoverEvent"":{""action"": ""show_text"",""value"": ""%{_tooltip}%""}"
  169.  
  170. if {_clusters::%{_i}%::insertion} is set:
  171. set {_json} to "%{_json}%,""insertion"":""%{_clusters::%{_i}%::insertion}%"",""obfuscated"":false"
  172.  
  173. if {_clusters::%{_i}%::command} is set:
  174. set {_clickable} to "%{_json}%,""clickEvent"":{""action"":""run_command"",""value"":""%{_clusters::%{_i}%::command}%""}"
  175.  
  176. if {_clusters::%{_i}%::suggest} is set:
  177. set {_clickable} to "%{_json}%,""clickEvent"":{""action"": ""suggest_command"",""value"": ""%{_clusters::%{_i}%::suggest}%""}"
  178.  
  179. if {_clusters::%{_i}%::url} is set:
  180. set {_clickable} to "%{_json}%,""clickEvent"":{""action"": ""open_url"",""value"": ""%{_clusters::%{_i}%::url}%""}"
  181.  
  182. if {_clickable} is set:
  183. set {_json} to "%{_clickable}%}"
  184. delete {_clickable}
  185.  
  186. else:
  187. set {_json} to "%{_json}%}"
  188.  
  189. return "{""text"":"""", ""extra"":[%{_json}%]}"
  190.  
  191.  
  192. function json(to: text, msg: text, color: boolean = true):
  193. set {_msg} to jsonFormat({_msg}, {_color})
  194. execute console command "/tellraw %{_to}% %{_msg}%"
  195.  
  196. if {@debug} is true:
  197. set {_player} to {_to} parsed as offline player
  198. if {_player} is online:
  199. send uncolored {_msg} to {_player}
  200.  
  201.  
  202. function jsonBroadcast(msg: text, color: boolean = true):
  203. json("@a", {_msg}, {_color})
  204.  
  205. on connect:
  206. set {waitpin.%player%} to 0
  207.  
  208.  
  209. on join:
  210. if {nick.%player%} is true:
  211. set {nick.%player%} to false
  212. delete {nickname.%player%}
  213. set action bar of player to coloured ""
  214. set player tab name to "%player%"
  215. set player's nametag to "%player%"
  216.  
  217.  
  218.  
  219. function caseSensitive(source: String, compareTo: String) :: boolean:
  220. if size of split {_source} at {_compareTo} is 2:
  221. return true
  222. else:
  223. return false
  224.  
  225. command /rank [<offline player>] [<text>]:
  226. permission: op
  227. permission message: &cYou do not have permission to use this command.
  228. trigger:
  229. if argument 1 is "help":
  230. if argument 2 is "ranks":
  231. message "&6List of ranks:"
  232. message ""
  233. json("%player%", "&cOWNER||ttp:&fClick here to view more info on &c[OWNER]&f.||cmd:/rank help about_owner", false)
  234. json("%player%", "&cADMIN||ttp:&fClick here to view more info on &c[ADMIN]&f.||cmd:/rank help about_admin", false)
  235. json("%player%", "&2MOD||ttp:&fClick here to view more info on &2[MOD]&f.||cmd:/rank help about_mod", false)
  236. json("%player%", "&9HELPER||ttp:&fClick here to view more info on &9[HELPER]&f.||cmd:/rank help about_helper", false)
  237. json("%player%", "&fYOUTUBE||ttp:&fClick here to view more info on &c[&fYOUTUBE&c]&f.||cmd:/rank help about_yt", false)
  238. json("%player%", "&dTRYHARD||ttp:&fClick here to view more info on &d[TRYHARD]&f.||cmd:/rank help about_tryhard", false)
  239. json("%player%", "&cD.ADMIN||ttp:&fClick here to view more info on &c[D.ADMIN]&f.||cmd:/rank help about_dadmin", false)
  240. json("%player%", "&2D.MOD||ttp:&fClick here to view more info on &2[D.MOD]&f.||cmd:/rank help about_dmod", false)
  241. json("%player%", "&9D.HELPER||ttp:&fClick here to view more info on &9[D.HELPER]&f.||cmd:/rank help about_dhelper", false)
  242. json("%player%", "&6MVP&c++||ttp:&fClick here to view more info on &6[MVP&c++&6]&f.||cmd:/rank help about_mvp++", false)
  243. json("%player%", "&bMVP&c+||ttp:&fClick here to view more info on &b[MVP&c+&b]&f.||cmd:/rank help about_mvp+", false)
  244. json("%player%", "&bMVP||ttp:&fClick here to view more info on &b[MVP]&f.||cmd:/rank help about_mvp", false)
  245. json("%player%", "&aVIP&6+||ttp:&fClick here to view more info on &a[VIP&6+&a]&f.||cmd:/rank help about_vip+", false)
  246. json("%player%", "&aVIP||ttp:&fClick here to view more info on &a[VIP]&f.||cmd:/rank help about_vip", false)
  247. json("%player%", "&7Default||ttp:&fClick here to view more info on &7Default&f.||cmd:/rank help about_default", false)
  248. if argument 2 is "about_owner":
  249. message "&aOWNER is the best rank a player can have. Owners manage the server, develop plugins, and more!"
  250. if argument 2 is "about_admin":
  251. message "&aADMINs usually develop plugins; manage the server, and manage the website and staff team."
  252. if argument 2 is "about_mod":
  253. message "&aMODs moderate the server to look out for pesky swearers and hackers!"
  254. if argument 2 is "about_helper":
  255. message "&aHELPER is a mod in training."
  256. if argument 2 is "about_dadmin":
  257. message "&aD.ADMIN is donator Admin."
  258. if argument 2 is "about_dmod":
  259. message "&aD.MOD is donator Moderator."
  260. if argument 2 is "about_dhelper":
  261. message "&aD.HELPER is donator HELPER."
  262. if argument 2 is "about_yt":
  263. message "&aYOUTUBERs are people who record for HauvongMC and help it get players."
  264. if argument 2 is "about_tryhard":
  265. message "&aTRYHARDs are 100+ stars on Hypixel."
  266. if argument 2 is "about_mvp++":
  267. message "&aMVP++'s are donators to the server."
  268. if argument 2 is "about_mvp+":
  269. message "&aMVP+'s are donators to the server."
  270. if argument 2 is "about_mvp":
  271. message "&aMVP's are donators to the server."
  272. if argument 2 is "about_vip+":
  273. message "&aVIP+'s are donators to the server."
  274. if argument 2 is "about_vip":
  275. message "&aVIP's are donators to the server."
  276. if argument 2 is "about_default":
  277. message "&aDefaults or Nons or Nulls are people who are normal! How us Owners pity them!"
  278. if argument 2 is "about_cookie":
  279. message "&cPfft, this is a developer note! You hacker!"
  280. stop
  281. else:
  282. if argument 1 is set:
  283. if argument 2 is set:
  284. if arg-2 is "OWNER":
  285. message "&aPlayer &c[OWNER] %arg-1% &ais now rank OWNER"
  286. send "&aYou are now OWNER" to arg-1
  287. set {chucvu.%player%} to "owner"
  288. set {rankdisplay.%uuid of arg-1%} to "&c[OWNER]"
  289. set {rankboard.%uuid of arg-1%} to "&cOWNER"
  290. execute console command "/ne player %arg-1% prefix &c[OWNER] &c"
  291. execute console command "/lp user %arg-1% group set owner"
  292. if arg-2 is "ADMIN":
  293. message "&aPlayer &c[ADMIN] %arg-1% &ais now rank ADMIN"
  294. send "&aYou are now ADMIN" to arg-1
  295. set {chucvu.%player%} to "admin"
  296. set {rankdisplay.%uuid of arg-1%} to "&c[ADMIN]"
  297. set {rankboard.%uuid of arg-1%} to "&cADMIN"
  298. execute console command "/ne player %arg-1% prefix &c[ADMIN] &c"
  299. execute console command "/lp user %arg-1% group set admin"
  300. if arg-2 is "MOD":
  301. message "&aPlayer &2[MOD] %arg-1% &ais now rank MOD"
  302. send "&aYou are now MOD" to arg-1
  303. set {chucvu.%player%} to "mod"
  304. set {rankdisplay.%uuid of arg-1%} to "&2[MOD]"
  305. set {rankboard.%uuid of arg-1%} to "&2MOD"
  306. execute console command "/ne player %arg-1% prefix &2[MOD] &2"
  307. execute console command "/lp user %arg-1% group set mod"
  308. if arg-2 is "HELPER":
  309. message "&aPlayer &9[HELPER] %arg-1% &ais now rank HELPER"
  310. send "&aYou are now HELPER" to arg-1
  311. set {chucvu.%player%} to "helper"
  312. set {rankdisplay.%uuid of arg-1%} to "&9[HELPER]"
  313. set {rankboard.%uuid of arg-1%} to "&9HELPER"
  314. execute console command "/ne player %arg-1% prefix &9[HELPER] &9"
  315. execute console command "/lp user %arg-1% group set helper"
  316. if arg-2 is "YOUTUBE":
  317. message "&aPlayer &c[&fYOUTUBE&c] %arg-1% &ais now rank YOUTUBER"
  318. send "&aYou are now YOUTUBER" to arg-1
  319. set {chucvu.%player%} to "yt"
  320. set {rankdisplay.%uuid of arg-1%} to "&c[&fYOUTUBE&c]"
  321. set {rankboard.%uuid of arg-1%} to "&fYOUTUBE"
  322. execute console command "/ne player %arg-1% prefix &c[&fYOUTUBE&c] &c"
  323. execute console command "/lp user %arg-1% group set yt"
  324. if arg-1 is not online:
  325. stop
  326. loop 7 times:
  327. 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
  328. wait 10 ticks
  329. set {firework} to a random integer from 1 to 5
  330. if {firework} is 1:
  331. launch creeper firework colored red at all players timed 1
  332. if {firework} is 2:
  333. launch burst firework colored green at all players timed 1
  334. if {firework} is 3:
  335. launch ball firework colored yellow at all players timed 1
  336. if {firework} is 4:
  337. launch ball firework colored blue at all players timed 1
  338. if {firework} is 5:
  339. launch burst firework colored red at all players timed 1
  340. 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
  341. wait 10 ticks
  342. set {firework} to a random integer from 1 to 5
  343. if {firework} is 1:
  344. launch creeper firework colored red at all players timed 1
  345. if {firework} is 2:
  346. launch burst firework colored green at all players timed 1
  347. if {firework} is 3:
  348. launch ball firework colored yellow at all players timed 1
  349. if {firework} is 4:
  350. launch ball firework colored blue at all players timed 1
  351. if {firework} is 5:
  352. launch burst firework colored red at all players timed 1
  353. 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
  354. if arg-2 is "D.HELPER":
  355. message "&aPlayer &9[D.HELPER] %arg-1% &ais now rank D.HELPER"
  356. send "&aYou are now D.HELPER" to arg-1
  357. set {chucvu.%player%} to "dhelper"
  358. set {rankdisplay.%uuid of arg-1%} to "&9[D.HELPER]"
  359. set {rankboard.%uuid of arg-1%} to "&9D.HELPER"
  360. execute console command "/ne player %arg-1% prefix &9[D.HELPER] &9"
  361. execute console command "/lp user %arg-1% group set d.helper"
  362. if arg-2 is "D.MOD":
  363. message "&aPlayer &2[D.MOD] %arg-1% &ais now rank D.MOD"
  364. send "&aYou are now D.MOD" to arg-1
  365. set {chucvu.%player%} to "dmod"
  366. set {rankdisplay.%uuid of arg-1%} to "&2[D.MOD]"
  367. set {rankboard.%uuid of arg-1%} to "&2D.MOD"
  368. execute console command "/ne player %arg-1% prefix &2[D.MOD] &2"
  369. execute console command "/lp user %arg-1% group set d.mod"
  370. if arg-2 is "D.ADMIN":
  371. message "&aPlayer &c[D.ADMIN] %arg-1% &ais now rank D.ADMIN"
  372. send "&aYou are now D.ADMIN" to arg-1
  373. set {chucvu.%player%} to "dadmin"
  374. set {rankdisplay.%uuid of arg-1%} to "&c[D.ADMIN]"
  375. set {rankboard.%uuid of arg-1%} to "&cD.ADMIN"
  376. execute console command "/ne player %arg-1% prefix &c[D.ADMIN] &c"
  377. execute console command "/lp user %arg-1% group set d.admin"
  378. if arg-2 is "MVP++":
  379. message "&aPlayer &6[MVP&c++&6] %arg-1% &ais now rank MVP++"
  380. send "&aYou are now MVP++" to arg-1
  381. set {chucvu.%player%} to "mvp++"
  382. set {rankdisplay.%uuid of arg-1%} to "&6[MVP&c++&6]"
  383. set {rankboard.%uuid of arg-1%} to "&6MVP&c++"
  384. execute console command "/ne player %arg-1% prefix &6[MVP&c++&6] &6"
  385. execute console command "/lp user %arg-1% group set mvp++"
  386. if arg-2 is "MVP+":
  387. message "&aPlayer &b[MVP&c+&b] %arg-1% &ais now rank MVP+"
  388. send "&aYou are now MVP+" to arg-1
  389. set {chucvu.%player%} to "mvp+"
  390. set {rankdisplay.%uuid of arg-1%} to "&b[MVP&c+&b]"
  391. set {rankboard.%uuid of arg-1%} to "&bMVP&c+"
  392. execute console command "/ne player %arg-1% prefix &b[MVP&c+&b] &b"
  393. execute console command "/lp user %arg-1% group set mvp+"
  394. if arg-2 is "MVP":
  395. message "&aPlayer &b[MVP] %arg-1% &ais now rank MVP"
  396. send "&aYou are now MVP" to arg-1
  397. set {chucvu.%player%} to "mvp"
  398. set {rankdisplay.%uuid of arg-1%} to "&b[MVP]"
  399. set {rankboard.%uuid of arg-1%} to "&bMVP"
  400. execute console command "/ne player %arg-1% prefix &b[MVP] &b"
  401. execute console command "/lp user %arg-1% group set mvp"
  402. if arg-2 is "VIP+":
  403. message "&aPlayer &a[VIP&6+&a] %arg-1% &ais now rank VIP+"
  404. send "&aYou are now VIP+" to arg-1
  405. set {chucvu.%player%} to "vip+"
  406. set {rankdisplay.%uuid of arg-1%} to "&a[VIP&6+&a]"
  407. set {rankboard.%uuid of arg-1%} to "&aVIP&6+"
  408. execute console command "/ne player %arg-1% prefix &a[VIP&6+&a] &a"
  409. execute console command "/lp user %arg-1% group set vip+"
  410. if arg-2 is "VIP":
  411. message "&aPlayer &a[VIP] %arg-1% &ais now rank VIP"
  412. send "&aYou are now VIP" to arg-1
  413. set {chucvu.%player%} to "vip"
  414. set {rankdisplay.%uuid of arg-1%} to "&a[VIP]"
  415. set {rankboard.%uuid of arg-1%} to "&aVIP"
  416. execute console command "/ne player %arg-1% prefix &a[VIP] &a"
  417. execute console command "/lp user %arg-1% group set vip"
  418. if arg-2 is "DEFAULT":
  419. message "&aPlayer &7%arg-1% &ais now rank DEFAULT"
  420. send "&aYou are now DEFAULT" to arg-1
  421. set {chucvu.%player%} to "default"
  422. set {rankdisplay.%uuid of arg-1%} to "&7"
  423. set {rankboard.%uuid of arg-1%} to "&7Default"
  424. execute console command "/ne player %arg-1% prefix &7"
  425. execute console command "/lp user %arg-1% group set default"
  426. if arg-2 is not "OWNER", "ADMIN", "MOD", "HELPER", "YOUTUBE", "D.ADMIN", "D.MOD", "D.HELPER", "TRYHARD", "MVP++", "MVP+", "MVP", "VIP+", "VIP" or "DEFAULT":
  427. #message "&cInvalid Rank!"
  428. 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)
  429. stop
  430. else:
  431. json("%player%", "&cUse: /rank (username)|| &c(rank)||ttp:&cClick to view a list of ranks.||cmd:/rank help ranks", false)
  432. else:
  433. json("%player%", "&cUse: /rank (username)|| &c(rank)||ttp:&cClick to view a list of ranks.||cmd:/rank help ranks", false)
  434.  
  435. on connect:
  436. if {chucvu.%player%} is not set:
  437. set {chucvu.%player%} to "default"
  438. set {rankdisplay.%uuid of player%} to "&7"
  439. set {rankboard.%uuid of player%} to "&7Default"
  440. add 1 to {achievements.%uuid of player%}
  441. add 1 to {level.%uuid of player%}
  442. if {level.%uuid of player%} is not set:
  443. add 1 to {level.%uuid of player%}
  444. if {achievements.%uuid of player%} is not set:
  445. add 1 to {achievements.%uuid of player%}
  446. else:
  447. if {level.%uuid of player%} is not set:
  448. add 1 to {level.%uuid of player%}
  449. if {achievements.%uuid of player%} is not set:
  450. add 1 to {achievements.%uuid of player%}
  451.  
  452.  
  453.  
  454. on join:
  455. if {chucvu.%player%} is not set:
  456. execute console command "ne player %player% prefix &7"
  457.  
  458.  
  459. on tab completer for "/help":
  460. cancel event
  461.  
  462. on join:
  463. if {vanish.%player%} is not set:
  464. set {vanish.%player%} to false
  465.  
  466. on join:
  467. if {chucvu.%player%} is "default":
  468. set join message to ""
  469. execute console command "/ne player %player% prefix &7"
  470. stop
  471. if {vanish.%player%} is not true:
  472. if {chucvu.%player%} is "vip":
  473. set join message to "&a[VIP] %player% &6joined the lobby!"
  474. execute console command "ne player %player% prefix &a[VIP] &a"
  475. if {chucvu.%player%} is "vip+":
  476. set join message to "&a[VIP&6+&a] &a%player% &6joined the lobby!"
  477. execute console command "ne player %player% prefix &a[VIP&6+&a] &a"
  478. if {chucvu.%player%} is "mvp":
  479. set join message to "&b[MVP] %player% &6joined the lobby!"
  480. execute console command "ne player %player% prefix &b[MVP] &b"
  481. if {chucvu.%player%} is "mvp+":
  482. set join message to "&b[MVP&c+&b] &b%player% &6joined the lobby!"
  483. execute console command "ne player %player% prefix &b[MVP&c+&b] &b"
  484. if {chucvu.%player%} is "mvp++":
  485. set join message to " &3>&c>&a> &6[MVP&c++&6] &6%player% &6joined the lobby! &a<&c<&3<"
  486. execute console command "ne player %player% prefix &6[MVP&c++&6] &6"
  487. stop
  488. if {rankdisplay.%uuid of player%} is "&d[TRYHARD]":
  489. set join message to "&d[TRYHARD] %player% &6joined the lobby!"
  490. execute console command "ne player %player% prefix &d[TRYHARD] &d"
  491. stop
  492. if {chucvu.%player%} is "yt":
  493. set join message to "&c[&fYOUTUBE&c] %player% &6joined the lobby!"
  494. execute console command "ne player %player% prefix &c[&fYOUTUBE&c] &c"
  495. if {chucvu.%player%} is "dhelper":
  496. set join message to "&9[D.HELPER] %player% &6joined the lobby!"
  497. execute console command "ne player %player% prefix &9[D.HELPER] &9"
  498. if {chucvu.%player%} is "helper":
  499. set join message to "&9[HELPER] %player% &6joined the lobby!"
  500. execute console command "ne player %player% prefix &9[HELPER] &9"
  501. if {chucvu.%player%} is "dmod":
  502. set join message to "&2[D.MOD] %player% &6joined the lobby!"
  503. execute console command "ne player %player% prefix &2[D.MOD] &2"
  504. if {chucvu.%player%} is "mod":
  505. set join message to "&2[MOD] %player% &6joined the lobby!"
  506. execute console command "ne player %player% prefix &2[MOD] &2"
  507. if {chucvu.%player%} is "dadmin":
  508. set join message to "&c[D.ADMIN] %player% &6joined the lobby!"
  509. execute console command "ne player %player% prefix &c[D.ADMIN] &c"
  510. if {chucvu.%player%} is "admin":
  511. set join message to "&c[ADMIN] %player% &6joined the lobby!"
  512. execute console command "ne player %player% prefix &c[ADMIN] &c"
  513. if {chucvu.%player%} is "owner":
  514. set join message to "&c[OWNER] %player% &6joined the lobby!"
  515. execute console command "ne player %player% prefix &c[OWNER] &c"
  516. else:
  517. set join message to ""
  518. loop all players:
  519. if {rank.%uuid of loop-player%} is not "yt", "mod", "admin", "owner" or "dev":
  520. add loop-player to {_vanishto::*}
  521. hide player from {_vanishto::*}
  522. set {vanish.%player%} to true
  523. send "&aYou vanished!"
  524. set action bar of player to "You are currently &cVANISHED"
  525. stop
  526.  
  527.  
  528. on quit:
  529. set leave message to ""
  530.  
  531.  
  532. command /msg [<offline player>] [<text>]:
  533. aliases: /tell, /message, /whisper, /w
  534. trigger:
  535. if argument 1 is set:
  536. if arg-1 is online:
  537. if argument 2 is set:
  538. if {chucvu.%player%} is not set:
  539. message "&cnull"
  540. stop
  541. if {chucvu.%player%} is not set:
  542. message "&cnull"
  543. stop
  544. if {chucvu.%player%} is "default":
  545. if {chucvu.%player%} is "default":
  546. message "&dTo &7%arg-1%: %arg 2%"
  547. loop all players:
  548. if loop-player is arg-1:
  549. send "&dFrom &7%executor%: &7%arg 2%" to loop-player
  550. else:
  551. message "&dTo &7%{rankdisplay.%uuid of arg-1%}% %arg-1%: &7%arg 2%"
  552. loop all players:
  553. if loop-player is arg-1:
  554. send "&dFrom &7%executor%: &7%arg 2%" to loop-player
  555. else:
  556. if {chucvu.%player%} is "default":
  557. message "&dTo &7%arg-1%: %arg 2%"
  558. loop all players:
  559. if loop-player is arg-1:
  560. send "&dFrom %{rankdisplay.%uuid of executor%}% %executor%: &7%arg 2%" to loop-player
  561. else:
  562. message "&dTo &7%{rankdisplay.%uuid of arg-1%}% %arg-1%: &7%arg 2%"
  563. loop all players:
  564. if loop-player is arg-1:
  565. send "&dFrom %{rankdisplay.%uuid of executor%}% %executor%: &7%arg 2%" to loop-player
  566. else:
  567. message "&cInvalid usage! Use: /msg (player) (message)"
  568. stop
  569. else:
  570. message "&cThat player is not online!"
  571. stop
  572. else:
  573. message "&cInvalid usage! Use: /msg (player) (message)"
  574. stop
  575.  
  576.  
  577.  
  578. on portal enter:
  579. stop
  580.  
  581.  
  582.  
  583.  
  584. on tab completer for "/tp":
  585. if argument at 1 is not "here":
  586. add "here" to completions
  587. add "all" to completions
  588. stop
  589. else:
  590. if argument at 1 is "here":
  591. loop all players:
  592. add "%loop-player%" to completions
  593. stop
  594.  
  595.  
  596.  
  597. command /gm [<text>]:
  598. trigger:
  599. if {chucvu.%player%} is "admin", "dadmin", "owner" or "dev":
  600. if argument 1 is set:
  601. if argument 1 is "1", "c" or "creative":
  602. message "&aYour gamemode has been updated to CREATIVE mode"
  603. set gamemode of player to creative
  604. else:
  605. if argument 1 is "0", "s" or "survival":
  606. message "&aYour gamemode has been updated to SURVIVAL mode"
  607. set gamemode of player to survival
  608. else:
  609. if argument 1 is "2", "a" or "adventure":
  610. message "&aYour gamemode has been updated to ADVENTURE mode"
  611. set gamemode of player to adventure
  612. else:
  613. message "&aYour gamemode has been updated to SURVIVAL mode"
  614. set gamemode of player to survival
  615. else:
  616. message "&cInvalid Usage! /gamemode (mode)"
  617. else:
  618. message "&cI'm sorry, but you do not have permission to perform this"
  619. message "&ccommand. Please contact the server administrators if you"
  620. message "&cbelieve that this is an error."
  621.  
  622. command /vanish [<text>]:
  623. aliases: /v
  624. trigger:
  625. if {chucvu.%player%} is "yt", "mod", "dhelper", "dmod", "dadmin", "admin", "owner" or "dev":
  626. if {vanish.%player%} is true:
  627. loop all players:
  628. if {rank.%uuid of loop-player%} is not "yt", "mod", "dhelper", "dmod", "dadmin", "admin", "owner" or "dev":
  629. add loop-player to {_vanishto::*}
  630. reveal player from all players
  631. set {vanish.%player%} to false
  632. send "&aYou reappeared!"
  633. if {nick.%player%} is true:
  634. set action bar of player to "You are currently &cNICKED"
  635. stop
  636. set action bar of player to coloured ""
  637. set player tab name to "%player%"
  638. set player's nametag to "%player%"
  639. if {chucvu.%player%} is "default":
  640. execute console command "ne player %player% prefix &7"
  641. stop
  642. if {chucvu.%player%} is "vip":
  643. execute console command "ne player %player% prefix &a[VIP] &a"
  644. stop
  645. if {chucvu.%player%} is "vip+":
  646. execute console command "ne player %player% prefix &a[VIP&6+&a] &a"
  647. stop
  648. if {chucvu.%player%} is "mvp":
  649. execute console command "ne player %player% prefix &b[MVP] &b"
  650. stop
  651. if {chucvu.%player%} is "mvp+":
  652. execute console command "ne player %player% prefix &b[MVP&c+&b] &b"
  653. stop
  654. if {chucvu.%player%} is "mvp++":
  655. execute console command "ne player %player% prefix &6[MVP&c++&6] &6"
  656. stop
  657. if {chucvu.%player%} is "yt":
  658. execute console command "ne player %player% prefix &c[&fYOUTUBE&c] &c"
  659. stop
  660. if {chucvu.%player%} is "dhelper":
  661. execute console command "ne player %player% prefix &9[D.HELPER] &9"
  662. stop
  663. if {chucvu.%player%} is "helper":
  664. execute console command "ne player %player% prefix &9[HELPER] &9"
  665. stop
  666. if {chucvu.%player%} is "dmod":
  667. execute console command "ne player %player% prefix &2[D.MOD] &2"
  668. stop
  669. if {chucvu.%player%} is "mod":
  670. execute console command "ne player %player% prefix &2[MOD] &2"
  671. stop
  672. if {chucvu.%player%} is "dadmin":
  673. execute console command "ne player %player% prefix &c[D.ADMIN] &c"
  674. stop
  675. if {chucvu.%player%} is "admin":
  676. execute console command "ne player %player% prefix &c[ADMIN] &c"
  677. stop
  678. if {chucvu.%player%} is "owner":
  679. execute console command "ne player %player% prefix &c[OWNER] &c"
  680. stop
  681. else:
  682. loop all players:
  683. if {rank.%uuid of loop-player%} is not "yt", "mod", "dhelper", "dmod", "dadmin", "admin", "owner" or "dev":
  684. add loop-player to {_vanishto::*}
  685. hide player from {_vanishto::*}
  686. set {vanish.%player%} to true
  687. send "&aYou vanished!"
  688. if {nick.%player%} is true:
  689. set action bar of player to "Bạn đang &cTÀNG HÌNH&f, &cĐỔI TÊN"
  690. stop
  691. set action bar of player to "Bạn đang &cTÀNG HÌNH"
  692. else:
  693. message "&cYou do not have permission to use this command!"
  694.  
  695.  
  696. every 2 seconds:
  697. loop all players:
  698. if {vanish.%loop-player%} is true:
  699. if {nick.%loop-player%} is not true:
  700. set action bar of loop-player to "Bạn đang &cTÀNG HÌNH"
  701. else:
  702. set action bar of loop-player to "Bạn đang &cTÀNG HÌNH&f, &cĐỔI TÊN"
  703. if {nick.%loop-player%} is true:
  704. if {vanish.%loop-player%} is not true:
  705. set action bar of loop-player to "Bạn đang &cĐỔI TÊN"
  706. else:
  707. set action bar of loop-player to "Bạn đang &cTÀNG HÌNH&f, &cĐỔI TÊN"
  708.  
  709.  
  710.  
  711.  
  712.  
  713. on skript load:
  714. delete {signguis::*}
  715.  
  716. on script load:
  717. import "org.bukkit.Material"
  718.  
  719. function clientBlock(location: location, type: object, viewers: players, data: int = 0):
  720. set {_material} to check [{_type} is a text] ? try {Material}.valueOf({_type}.toUpperCase()) : ({_type}.getRandom() ? {_type}).getType()
  721. set {_args::*} to {_location}, {_material} and {_data}
  722. loop {_viewers::*}:
  723. try loop-value.sendBlockChange({_args::*});
  724.  
  725. function clientSign(players: players, location: location, 1: string = "", 2: string = "", 3: string = "", 4: string = ""):
  726. set {_args::*} to {_location}
  727. add [({_1}, {_2}, {_3} and {_4}) as string] to {_args::*}
  728. loop {_players::*}:
  729. try loop-value.sendSignChange({_args::*});
  730.  
  731. function getLines(packet: packet) :: strings:
  732. loop ...{_packet}.getHandle().b():
  733. add "%loop-value.getText()%" to {_lines::*}
  734. return {_lines::*}
  735.  
  736. function signGUI(player: player, 1: string = "", 2: string = "", 3: string = "", 4: string = ""):
  737. set {_x} to x-loc of {_player}
  738. set {_z} to z-loc of {_player}
  739. set {_y} to y-loc of {_player}
  740. set {_world} to world of {_player}
  741. set {_packet} to new play_server_open_sign_editor packet
  742. set {_location} to location(round({_x}), 0, round({_z}), {_world})
  743. set location pinfo 0 of {_packet} to {_location}
  744. if "%{_1}%%{_2}%%{_3}%%{_4}%" is not "":
  745. clientBlock({_location}, "sign_post", {_player})
  746. clientSign({_player}, {_location}, {_1}, {_2}, {_3}, {_4})
  747. set {_reset} to true
  748. send {_player} packet {_packet}
  749. set {_uuid} to uuid of {_player}
  750. set {signguis::%{_uuid}%} to true
  751. if {_reset} is set:
  752. set {_type} to type of block at {_location}
  753. clientBlock({_location}, {_type}, {_player})
  754.  
  755. on packet event play_client_update_sign:
  756. if {signguis::%player's uuid%} is set:
  757. delete {signguis::%player's uuid%}
  758. sync:
  759. call custom event "sign gui done" to details (event-player, event-packet, world of {_location} and {_location}) args getLines(event-packet)
  760.  
  761. evt "sign gui done":
  762. set {_lines::*} to custom event's args
  763. replace all " " with "" in {_lines::1}
  764. set {_n} to the length of {_lines::1}
  765. if {_n} is greater than 16:
  766. send "&cThat name is not permitted!"
  767. stop
  768. 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 "\":
  769. send "&cThat name is not permitted!"
  770. stop
  771. set {_p1} to "%{_lines::1}%" parsed as offline player
  772. set {_l1} to "%{_lines::1}%" parsed as text
  773. if {_p1} is online:
  774. send "&cThat name is not permitted!"
  775. stop
  776. set {_uuidp1} to uuid of {_p1}
  777. if {rank.%{_uuidp1}%} is not "default", "vip", "vip+", "mvp", "mvp+" or "mvp++":
  778. send "&cThat name is not permitted!"
  779. stop
  780. message "&aYou are now nicked as %{_l1}%"
  781. set {nickname.%player%} to "%{_l1}%"
  782. set {nick.%player%} to true
  783. set {nk1} to "&a[VIP] &a"
  784. set {nk2} to "&a[VIP&c+&a] &a"
  785. set {nk3} to "&b[MVP] &b"
  786. set {nk4} to "&b[MVP&c+&b] &b"
  787. if {nickrank.%player%} is "DEFAULT":
  788. execute console command "/ne player %player% prefix &7"
  789. set player's nametag to colored "&7%{_l1}%"
  790. set player's tab list name to "&7%{_l1}%"
  791. wait 2 tick
  792. set player's tab list name to "&7%{_l1}%"
  793. execute console command "essentials:nick %player% &7%{_l1}%"
  794. execute console command "/ne reload"
  795. execute console command "pex user %player% group set nk"
  796. if {nickrank.%player%} is "VIP":
  797. execute console command "/ne player %player% prefix &a[VIP] &a"
  798. set player's nametag to colored "&a%{_l1}%"
  799. set player's tab list name to "&a[VIP] &a%{_l1}%"
  800. wait 2 tick
  801. set player's tab list name to "&a%{_l1}%"
  802. execute console command "pex user %player% group set nk1"
  803. execute console command "essentials:nick %player% &a%{_l1}%"
  804. execute console command "/ne reload"
  805. if {nickrank.%player%} is "VIP_PLUS":
  806. execute console command "/ne player %player% prefix &a[VIP&c+&a] &a"
  807. set player's nametag to colored "&a%{_l1}%"
  808. set player's tab list name to "&a[VIP&c+&a] &a%{_l1}%"
  809. wait 2 tick
  810. set player's tab list name to "&a%{_l1}%"
  811. execute console command "pex user %player% group set nk2"
  812. execute console command "essentials:nick %player% &a%{_l1}%"
  813. execute console command "/ne reload"
  814. if {nickrank.%player%} is "MVP":
  815. execute console command "/ne player %player% prefix &b[MVP] &b"
  816. set player's nametag to colored "&b%{_l1}%"
  817. set player's tab list name to "&b[MVP&&B] %{_l1}%"
  818. wait 2 tick
  819. set player's tab list name to "&b%{_l1}%"
  820. execute console command "essentials:nick %player% &b%{_l1}%"
  821. execute console command "pex user %player% group set nk3"
  822. execute console command "/ne reload"
  823. if {nickrank.%player%} is "MVP_PLUS":
  824. execute console command "/ne player %player% prefix &b[MVP&c+&b] &b"
  825. set player's nametag to colored "&b%{_l1}%"
  826. set player's tab list name to "&b[MVP&C+&B] %{_l1}%"
  827. wait 2 tick
  828. set player's tab list name to "&b%{_l1}%"
  829. execute console command "essentials:nick %player% &b%{_l1}%"
  830. execute console command "pex user %player% group set nk4"
  831. execute console command "/ne reload"
  832. if player's displayed skin is not player's skin:
  833. reset player's displayed skin
  834. access "getSkin" from {_l1}
  835. wait 7 ticks
  836. if {_skin} is set:
  837. set player's displayed skin to {_skin}
  838. if {vanish.%player%} is true:
  839. set action bar of player to "You are currently &cVANISHED&f, &cNICKED"
  840. else:
  841. set action bar of player to "You are currently &cNICKED"
  842. execute console command "/ne reload"
  843. set {_book} to a new book
  844. 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%"
  845. if {nickrank.%player%} is "DEFAULT":
  846. set {_component1} to a new text component with "&7%{_l1}%"
  847. if {nickrank.%player%} is "VIP":
  848. set {_component1} to a new text component with "&a[VIP] %{_l1}%"
  849. if {nickrank.%player%} is "VIP_PLUS":
  850. set {_component1} to a new text component with "&a[VIP&6+&a] %{_l1}%"
  851. if {nickrank.%player%} is "MVP":
  852. set {_component1} to a new text component with "&b[MVP] %{_l1}%"
  853. if {nickrank.%player%} is "MVP_PLUS":
  854. set {_component1} to a new text component with "&b[MVP&c+&b] %{_l1}%"
  855. if {nickrank.%player%} is "MVP_PLUS_PLUS":
  856. set {_component1} to a new text component with "&6[MVP&c++&6] %{_l1}%"
  857. set {_component2} to a new text component with "%nl%"
  858. 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"
  859. add {_component} to {_nick::*}
  860. add {_component1} to {_nick::*}
  861. add {_component2} to {_nick::*}
  862. add {_component3} to {_nick::*}
  863. add text components {_nick::*} to book {_book}
  864. open book {_book} to player
  865.  
  866. command /nick [<text>]:
  867. trigger:
  868. if argument 1 is set:
  869. if argument 1 is "reset":
  870. if {nick.%player%} is true:
  871. set {nick.%player%} to false
  872. delete {nickname.%player%}
  873. execute console command "essentials:nick %player% off"
  874. send "&aĐã unnick thành công!"
  875. message "&aTên của bạn đã được đặt lại!"
  876. set action bar of player to coloured ""
  877. set player tab name to "%player%"
  878. set player's nametag to "%player%"
  879. reset player's displayed skin
  880. if {chucvu.%player%} is "default":
  881. execute console command "ne player %player% prefix &7"
  882. execute console command "pex user %player% group set default"
  883. stop
  884. if {chucvu.%player%} is "vip":
  885. execute console command "ne player %player% prefix &a[VIP] &a"
  886. execute console command "pex user %player% group set VIP"
  887. stop
  888. if {chucvu.%player%} is "vip+":
  889. execute console command "ne player %player% prefix &a[VIP&6+&a] &a"
  890. execute console command "pex user %player% group set VIP+"
  891. stop
  892. if {chucvu.%player%} is "mvp":
  893. execute console command "ne player %player% prefix &b[MVP] &b"
  894. execute console command "pex user %player% group set MVP"
  895. stop
  896. if {chucvu.%player%} is "mvp+":
  897. execute console command "ne player %player% prefix &b[MVP&c+&b] &b"
  898. execute console command "pex user %player% group set MVP+"
  899. stop
  900. if {chucvu.%player%} is "yt":
  901. execute console command "ne player %player% prefix &c[&fYOUTUBE&c] &c"
  902. execute console command "pex user %player% group set YOUTUBER"
  903. stop
  904. if {chucvu.%player%} is "dhelper":
  905. execute console command "ne player %player% prefix &9[D.HELPER] &9"
  906. execute console command "pex user %player% group set D.HELPER"
  907. stop
  908. if {chucvu.%player%} is "helper":
  909. execute console command "ne player %player% prefix &9[HELPER] &9"
  910. execute console command "pex user %player% group set HELPER"
  911. stop
  912. if {chucvu.%player%} is "dmod":
  913. execute console command "ne player %player% prefix &2[D.MOD] &2"
  914. execute console command "pex user %player% group set D.MOD"
  915. stop
  916. if {chucvu.%player%} is "mod":
  917. execute console command "ne player %player% prefix &2[MOD] &2"
  918. execute console command "pex user %player% group set MOD"
  919. stop
  920. if {chucvu.%player%} is "dadmin":
  921. execute console command "ne player %player% prefix &c[D.ADMIN] &c"
  922. execute console command "pex user %player% group set D.ADMIN"
  923. stop
  924. if {chucvu.%player%} is "admin":
  925. execute console command "ne player %player% prefix &c[ADMIN] &c"
  926. execute console command "pex user %player% group set ADMIN"
  927. stop
  928. if {chucvu.%player%} is "owner":
  929. execute console command "ne player %player% prefix &c[OWNER] &c"
  930. execute console command "pex user %player% group set OWNER"
  931. stop
  932. if {vanish.%player%} is true:
  933. set action bar of player to "Hiện tại bạn đang &cTÀNG HÌNH"
  934. stop
  935. stop
  936. else:
  937. set {_book} to a new book
  938. 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%"
  939. set {_component1} to a new text component with "%nl%"
  940. set {_component2} to a new text component with "➤ &7DEFAULT"
  941. add click event with action RUN_COMMAND with execute "/nickhelp rank DEFAULT" to text component {_component2}
  942. add hover event with action SHOW_TEXT with text "&7Nhấn vào đây để hiện với &7Default" to text component {_component2}
  943. set {_component3} to a new text component with "%nl%➤ &aVIP"
  944. add click event with action RUN_COMMAND with execute "/nickhelp rank VIP" to text component {_component3}
  945. add hover event with action SHOW_TEXT with text "&7Nhấn vào đây để hiện với &aVIP" to text component {_component3}
  946. set {_component4} to a new text component with "%nl%➤ &aVIP&6+"
  947. add click event with action RUN_COMMAND with execute "/nickhelp rank VIP_PLUS" to text component {_component4}
  948. add hover event with action SHOW_TEXT with text "&7Nhấn vào đây để hiện với &aVIP&6+" to text component {_component4}
  949. set {_component5} to a new text component with "%nl%➤ &bMVP"
  950. add click event with action RUN_COMMAND with execute "/nickhelp rank MVP" to text component {_component5}
  951. add hover event with action SHOW_TEXT with text "&7Nhấn vào đây để hiện với &bMVP" to text component {_component5}
  952. set {_component6} to a new text component with "%nl%➤ &bMVP&c+"
  953. add click event with action RUN_COMMAND with execute "/nickhelp rank MVP_PLUS" to text component {_component6}
  954. add hover event with action SHOW_TEXT with text "&7Nhấn vào đây để hiện với &bMVP&c+" to text component {_component6}
  955. add {_component} to {_nick::*}
  956. add {_component1} to {_nick::*}
  957. add {_component2} to {_nick::*}
  958. add {_component3} to {_nick::*}
  959. add {_component4} to {_nick::*}
  960. add {_component5} to {_nick::*}
  961. add {_component6} to {_nick::*}
  962. add text components {_nick::*} to book {_book}
  963. open book {_book} to player
  964.  
  965.  
  966. command /nickhelp [<text>] [<text>]:
  967. permission: nick.use
  968. permission message: &cBạn không có quyền!
  969. trigger:
  970. if argument 1 is not set:
  971. stop
  972. else if argument 2 is not set:
  973. stop
  974. else:
  975. if argument 1 is "rank":
  976. if argument 2 is "DEFAULT":
  977. send "&aĐã chuyển chức vụ thành &7DEFAULT&a!"
  978. set {nickrank.%player%} to "DEFAULT"
  979. else:
  980. if argument 2 is "VIP":
  981. message "&aĐã chuyển chức vụ thành &aVIP&a!"
  982. set {nickrank.%player%} to "VIP"
  983.  
  984. if argument 2 is "VIP_PLUS":
  985. message "&aĐã chuyển chức vụ thành &aVIP&6+&a!"
  986. set {nickrank.%player%} to "VIP_PLUS"
  987. if argument 2 is "MVP":
  988. message "&aĐã chuyển chức vụ thành &bMVP&a!"
  989. set {nickrank.%player%} to "MVP"
  990. if argument 2 is "MVP_PLUS":
  991. message "&aĐã chuyển chức vụ thành &bMVP&c+&a!"
  992. set {nickrank.%player%} to "MVP_PLUS"
  993. set {_book} to a new book
  994. 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!"
  995. set {_component1} to a new text component with "%nl%"
  996. set {_component2} to a new text component with "%nl%➤ Nhập tên"
  997. add click event with action RUN_COMMAND with execute "/nickhelp sign start" to text component {_component2}
  998. add hover event with action SHOW_TEXT with text "&7Nhấn để nhập tên." to text component {_component2}
  999. set {_component3} to a new text component with "%nl%➤ Sử dụng random tên"
  1000. add click event with action RUN_COMMAND with execute "/nickhelp random name" to text component {_component3}
  1001. add hover event with action SHOW_TEXT with text "&7Nhấn để đặt tên bất kì." to text component {_component3}
  1002. add {_component} to {_nick::*}
  1003. add {_component1} to {_nick::*}
  1004. add {_component2} to {_nick::*}
  1005. add {_component3} to {_nick::*}
  1006. add text components {_nick::*} to book {_book}
  1007. open book {_book} to player
  1008. if argument 1 is "sign":
  1009. signGUI(player, " ", "^^^^^^^^^^^^^^^", "Hãy viết", "tên của bạn vào đây")
  1010. if argument 1 is "random":
  1011. set {_a} to random element out of {nicks::*}
  1012. message "&aBạn đã đổi tên thành %{_a}%"
  1013. set {nickname.%player%} to "%{_a}%"
  1014. set {nick.%player%} to true
  1015. if {nickrank.%player%} is "DEFAULT":
  1016. execute console command "/ne player %player% prefix &c"
  1017. set player's nametag to colored "&7%{_a}%"
  1018. set player's tab list name to "&7%{_a}%"
  1019. execute console command "pex user player prefix &7"
  1020. wait 2 tick
  1021. set player's tab list name to "&7%{_a}%"
  1022. set player's display name to "&7%{_a}%"
  1023. execute console command "/ne reload"
  1024. if {nickrank.%player%} is "VIP":
  1025. execute console command "/ne player %player% prefix &a[VIP] &a"
  1026. set player's nametag to colored "&a%{_a}%"
  1027. set player's tab list name to "&a%{_a}%"
  1028. wait 2 tick
  1029. set player's tab list name to "&a%{_a}%"
  1030. execute console command "/ne reload"
  1031. if {nickrank.%player%} is "VIP_PLUS":
  1032. execute console command "/ne player %player% prefix &a[VIP&c+&a] &a"
  1033. set player's nametag to colored "&a%{_a}%"
  1034. set player's tab list name to "&a%{_a}%"
  1035. wait 2 tick
  1036. set player's tab list name to "&a%{_a}%"
  1037. execute console command "/ne reload"
  1038. if {nickrank.%player%} is "MVP":
  1039. execute console command "/ne player %player% prefix &b[MVP] &b"
  1040. set player's nametag to colored "&b%{_a}%"
  1041. set player's tab list name to "&b%{_a}%"
  1042. wait 2 tick
  1043. set player's tab list name to "&b%{_a}%"
  1044. execute console command "/ne reload"
  1045. if {nickrank.%player%} is "MVP_PLUS":
  1046. execute console command "/ne player %player% prefix &b[MVP&c+&b] &b"
  1047. set player's nametag to colored "&b%{_a}%"
  1048. set player's tab list name to "&b%{_a}%"
  1049. wait 2 tick
  1050. set player's tab list name to "&b%{_a}%"
  1051. execute console command "/ne reload"
  1052. if player's displayed skin is not player's skin:
  1053. reset player's displayed skin
  1054. access "getSkin" from {_a}
  1055. wait 7 ticks
  1056. if {_skin} is set:
  1057. set player's displayed skin to {_skin}
  1058. if {vanish.%player%} is true:
  1059. set action bar of player to "Hiện tại bạn đang &cTÀNG HÌNH&f, &cĐỔI TÊN"
  1060. else:
  1061. set action bar of player to "Hiện tại ban đang &cĐỔI TÊN"
  1062. execute console command "/ne reload"
  1063. set {_book} to a new book
  1064. set {_component} to a new text component with "You have finished%nl%setting up your nickname!%nl%%nl%You will be nicked as%nl%"
  1065. if {nickrank.%player%} is "DEFAULT":
  1066. set {_component1} to a new text component with "&7%{_a}%"
  1067. if {nickrank.%player%} is "VIP":
  1068. set {_component1} to a new text component with "&a[VIP] %{_a}%"
  1069. if {nickrank.%player%} is "VIP_PLUS":
  1070. set {_component1} to a new text component with "&a[VIP&6+&a] %{_a}%"
  1071. if {nickrank.%player%} is "MVP":
  1072. set {_component1} to a new text component with "&b[MVP] %{_a}%"
  1073. if {nickrank.%player%} is "MVP_PLUS":
  1074. set {_component1} to a new text component with "&b[MVP&c+&b] %{_a}%"
  1075. if {nickrank.%player%} is "MVP_PLUS_PLUS":
  1076. set {_component1} to a new text component with "&6[MVP&c++&6] %{_a}%"
  1077. set {_component2} to a new text component with "%nl%"
  1078. set {_component3} to a new text component with "%nl%&rTo go back to being%nl%your usual self, type:%nl%&l/nick reset"
  1079. add {_component} to {_nick::*}
  1080. add {_component1} to {_nick::*}
  1081. add {_component2} to {_nick::*}
  1082. add {_component3} to {_nick::*}
  1083. add text components {_nick::*} to book {_book}
  1084. open book {_book} to player
  1085.  
  1086. command /oldnick [<text>]:
  1087. permission: op
  1088. permission message: &cThis command is disabled.
  1089. trigger:
  1090. if {chucvu.%player%} is "yt", "mod", "admin", "owner" or "dev":
  1091. if {nick.%player%} is not true:
  1092. if argument 1 is set:
  1093. set {_n} to the length of arg 1
  1094. if arg-1 contains " ":
  1095. send "&cThat name is not permitted!"
  1096. stop
  1097. if {_n} is greater than 16:
  1098. send "&cThat name is not permitted!"
  1099. stop
  1100. 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 "\":
  1101. send "&cThat name is not permitted!"
  1102. stop
  1103. set {_p1} to "%arg-1%" parsed as offline player
  1104. if {_p1} is online:
  1105. send "&cThat name is not permitted!"
  1106. stop
  1107. set {_uuidp1} to uuid of {_p1}
  1108. if {rank.%{_uuidp1}%} is not "default", "vip", "vip+", "mvp", "mvp+" or "mvp++":
  1109. send "&cThat name is not permitted!"
  1110. stop
  1111. message "&aYou are now nicked as %arg-1%"
  1112. set {nickname.%player%} to "%arg-1%"
  1113. set {nick.%player%} to true
  1114. execute console command "/ne player %executor% prefix &7"
  1115. set player's nametag to colored "&7%arg-1%"
  1116. set player tab name to "&7%arg-1%"
  1117. if player's displayed skin is not player's skin:
  1118. reset player's displayed skin
  1119. access "getSkin" from arg-1
  1120. wait 2 ticks
  1121. if {_skin} is set:
  1122. set player's displayed skin to {_skin}
  1123. if {vanish.%player%} is true:
  1124. set action bar of player to "Bạn đang &cTÀNG HÌNH&f, &cĐỔI TÊN"
  1125. else:
  1126. set action bar of player to "Bạn đang &cĐỔI TÊN"
  1127.  
  1128. else:
  1129. message "&cInvalid Usage! Use /nick (tên)"
  1130. else:
  1131. if argument 1 is "reset":
  1132. execute player command "/unnick"
  1133. stop
  1134. message "&cBạn hiện đang dùng đổi tên! Sử dụng /unnick để bỏ đổi tên!"
  1135. else:
  1136. message "&cYou do not have permission to use this command!"
  1137.  
  1138. command /chucvu:
  1139. trigger:
  1140. if {chucvu.%player%} is "default":
  1141. send "default"
  1142. stop
  1143. if {chucvu.%player%} is "vip":
  1144. send "vip"
  1145. stop
  1146. if {chucvu.%player%} is "vip+":
  1147. send "vip+"
  1148. stop
  1149. if {chucvu.%player%} is "mvp":
  1150. send "mvp"
  1151. stop
  1152. if {chucvu.%player%} is "mvp+":
  1153. send "mvp+"
  1154. stop
  1155. if {chucvu.%player%} is "mvp++":
  1156. send "mvp++"
  1157. stop
  1158. if {chucvu.%player%} is "yt":
  1159. send "yt"
  1160. stop
  1161. if {chucvu.%player%} is "dhelper":
  1162. send "dhelper"
  1163. stop
  1164. if {chucvu.%player%} is "helper":
  1165. send "helper"
  1166. stop
  1167. if {chucvu.%player%} is "dmod":
  1168. send "dmod"
  1169. stop
  1170. if {chucvu.%player%} is "mod":
  1171. send "mod"
  1172. stop
  1173. if {chucvu.%player%} is "dadmin":
  1174. send "dadmin"
  1175. stop
  1176. if {chucvu.%player%} is "admin":
  1177. send "admin"
  1178. stop
  1179. if {chucvu.%player%} is "owner":
  1180. send "owner"
  1181. stop
  1182. command /unnick [<text>]:
  1183. trigger:
  1184. if {chucvu.%player%} is "yt", "mod", "admin", "owner" or "dev":
  1185. if {nick.%player%} is true:
  1186. set {nick.%player%} to false
  1187. delete {nickname.%player%}
  1188. set player's prefix to ""
  1189. if {chucvu.%player%} is "default":
  1190. execute console command "ne player %player% prefix &7"
  1191. execute console command "pex user %player% group set default"
  1192. set player's tab list name to "&7%player%"
  1193. set player's nametag to colored "&7%player%"
  1194. execute console command "essentials:nick %player% off"
  1195. send "&aĐã unnick thành công!"
  1196. stop
  1197. if {chucvu.%player%} is "vip":
  1198. execute console command "ne player %player% prefix &a[VIP] &a"
  1199. execute console command "pex user %player% group set vip"
  1200. set player's tab list name to "&a%player%"
  1201. set player's nametag to colored "&a[VIP] %player%"
  1202. execute console command "essentials:nick %player% off"
  1203. send "&aĐã unnick thành công!"
  1204. stop
  1205. if {chucvu.%player%} is "vip+":
  1206. execute console command "ne player %player% prefix &a[VIP&6+&a] &a"
  1207. execute console command "pex user %player% group set vip+"
  1208. set player's tab list name to "&a%player%"
  1209. set player's nametag to colored "&a[VIP&c+&a] %player%"
  1210. execute console command "essentials:nick %player% off"
  1211. send "&aĐã unnick thành công!"
  1212. stop
  1213. if {chucvu.%player%} is "mvp":
  1214. execute console command "ne player %player% prefix &b[MVP] &b"
  1215. execute console command "pex user %player% group set mvp"
  1216. set player's tab list name to "&b%player%"
  1217. set player's nametag to colored "&b[MVP] %player%"
  1218. execute console command "essentials:nick %player% off"
  1219. send "&aĐã unnick thành công!"
  1220. stop
  1221. if {chucvu.%player%} is "mvp+":
  1222. execute console command "ne player %player% prefix &b[MVP&c+&b] &b"
  1223. execute console command "pex user %player% group set mvp+"
  1224. set player's tab list name to "&b%player%"
  1225. set player's nametag to colored "&b[MVP&c+&b] %player%"
  1226. execute console command "essentials:nick %player% off"
  1227. send "&aĐã unnick thành công!"
  1228. stop
  1229. if {chucvu.%player%} is "mvp++":
  1230. execute console command "ne player %player% prefix &6[MVP&c++&6] &6"
  1231. execute console command "pex user %player% group set mvp++"
  1232. set player's tab list name to "&6%player%"
  1233. set player's nametag to colored "&a6[MVP&C++&6] %player%"
  1234. execute console command "essentials:nick %player% off"
  1235. send "&aĐã unnick thành công!"
  1236. stop
  1237. if {chucvu.%player%} is "yt":
  1238. execute console command "ne player %player% prefix &c[&fYOUTUBE&c] &c"
  1239. execute console command "pex user %player% group set YOUTUBER"
  1240. set player's tab list name to "&c%player%"
  1241. set player's nametag to colored "&c[&FYOUTUBE&C] %player%"
  1242. execute console command "essentials:nick %player% off"
  1243. send "&aĐã unnick thành công!"
  1244. stop
  1245. if {chucvu.%player%} is "dhelper":
  1246. execute console command "ne player %player% prefix &9[D.HELPER] &9"
  1247. execute console command "pex user %player% group set DHelper"
  1248. set player's tab list name to "&9%player%"
  1249. set player's nametag to colored "&9[D.HELPER] %player%"
  1250. execute console command "essentials:nick %player% off"
  1251. send "&aĐã unnick thành công!"
  1252. stop
  1253. if {chucvu.%player%} is "helper":
  1254. execute console command "ne player %player% prefix &9[HELPER] &9"
  1255. execute console command "pex user %player% group set Helper"
  1256. set player's tab list name to "&9%player%"
  1257. set player's nametag to colored "&9[HELPER] %player%"
  1258. execute console command "essentials:nick %player% off"
  1259. send "&aĐã unnick thành công!"
  1260. stop
  1261. if {chucvu.%player%} is "dmod":
  1262. execute console command "ne player %player% prefix &2[D.MOD] &2"
  1263. execute console command "pex user %player% group set dmod"
  1264. set player's tab list name to "&2%player%"
  1265. set player's nametag to colored "&2[D.MOD] %player%"
  1266. execute console command "essentials:nick %player% off"
  1267. send "&aĐã unnick thành công!"
  1268. stop
  1269. if {chucvu.%player%} is "mod":
  1270. execute console command "ne player %player% prefix &2[MOD] &2"
  1271. execute console command "pex user %player% group set mod"
  1272. set player's tab list name to "&2%player%"
  1273. set player's nametag to colored "&2[MOD] %player%"
  1274. execute console command "essentials:nick %player% off"
  1275. send "&aĐã unnick thành công!"
  1276. stop
  1277. if {chucvu.%player%} is "dadmin":
  1278. execute console command "ne player %player% prefix &c[D.ADMIN] &c"
  1279. execute console command "pex user %player% group set dadmin"
  1280. set player's tab list name to "&c%player%"
  1281. set player's nametag to colored "&C[D.ADMIN] %player%"
  1282. execute console command "essentials:nick %player% off"
  1283. send "&aĐã unnick thành công!"
  1284. stop
  1285. if {chucvu.%player%} is "admin":
  1286. execute console command "ne player %player% prefix &c[ADMIN] &c"
  1287. execute console command "pex user %player% group set Admin"
  1288. set player's tab list name to "&c%player%"
  1289. set player's nametag to colored "&C[ADMIN] %player%"
  1290. execute console command "essentials:nick %player% off"
  1291. send "&aĐã unnick thành công!"
  1292. stop
  1293. if {chucvu.%player%} is "owner":
  1294. execute console command "/ne player %player% prefix &c[OWNER] &c"
  1295. execute console command "pex user %player% group set OWNER"
  1296. set player's tab list name to "&c[OWNER] %player%"
  1297. set player's nametag to colored "&C[OWNER] %player%"
  1298. execute console command "essentials:nick %player% off"
  1299. send "&aĐã unnick thành công!"
  1300. stop
  1301. wait 1 tick
  1302. execute console command "/ne reload"
  1303. else:
  1304. message "&cBạn chưa đổi nick!"
  1305. else:
  1306. message "&cBẠn không có quyền sử dụng lệnh này!"
  1307.  
  1308. func "getSkin":
  1309. set {_player} to parameter 1
  1310. set {_uuid} to {_player} parsed as offline player's uuid
  1311. set {_trimmed-uuid-parts::*} to {_uuid} split by "-"
  1312. set {_trimmed-uuid} to join {_trimmed-uuid-parts::*} by ""
  1313. send request to "https://api.mineskin.org/generate/user/%{_trimmed-uuid}%"
  1314. map json last response's body to {_skin-api::*}
  1315. set transient "skinOutput" to skin with value {_skin-api::data::texture::value} signature {_skin-api::data::texture::signature}
  1316. $ access
  1317. set {_skin} to transient "skinOutput"
  1318. return
  1319.  
  1320. command /test:
  1321. trigger:
  1322. execute player command "nick" as op
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement