Advertisement
LukieNZ

E

May 29th, 2021
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.39 KB | None | 0 0
  1. options:
  2. ChatMutedMessage: &cChat is currently muted!
  3. #Include <time> in TalkSlowMessage to see time remaining
  4. TalkSlowMessage: &cPlease talk slower... &7((<time> &7left))
  5. AntiSpamMessage: &cPlease do not repeat yourself
  6. NoPermissionChatColor: &3&lCHATMANAGER &7You do not have permission to this chatcolor!
  7. #Create a bot from here, https://discord.com/developers/applications/829529848451301386/bot once done copy the bot token
  8. DiscordBotToken:
  9. #Bot name can be whatever you want, doesn't matter
  10. DiscordBotName: Pick Bot
  11. #Copy the channel id from your discord
  12. DiscordBotChannel:
  13. #BOT PART (IF YOU ALREADY HAVE A VIXIO BOT DO NOT MAKE ANOTHER ONE. LEAVE THE BOT TOKEN EMPTY AND SET DISCORDBOTNAME TO THE NAME OF YOUR BOT!
  14. #RESTART YOUR SERVER FOR THE BOT TO WORK (PLUGIN NEEDED: VIXIO)
  15.  
  16.  
  17. on skript load:
  18. set {_token} to "{@DiscordBotToken}"
  19. if {_token} is not set:
  20. stop
  21. login to "{@DiscordBotToken}" with the name "{@DiscordBotName}"
  22.  
  23.  
  24.  
  25. on guild message received seen by "{@DiscordBotName}":
  26. discord id of event-channel = "{@DiscordBotChannel}"
  27. send formatted "<##7BA1FF>&lDISCORD &f%event-member%&7: %event-message%" to all players
  28.  
  29.  
  30.  
  31.  
  32. on join:
  33. {cm::joined} is not set
  34. player is op
  35. wait 40 ticks
  36. send ""
  37. send "&3Thanks &7for adding my chatmanager, to set the chat format please do (&3/setformat (TEXT)&7). For more information about the chat formatting please do &3/cm help format &7for example, to have tags in your chat you could do &3/setformat <player> <tag>: <chatcolor><message>"
  38. send ""
  39. send "&7To create tags, use &3/createtag (TAG)&7, you can view them in &3/tags"
  40. send ""
  41. send "&7For more information please read the product description on the catalog or join my support server, the &3discord integration &7is explained in the product description and in the &3options &7of the script"
  42. send ""
  43. set {cm::joined} to true
  44.  
  45.  
  46.  
  47.  
  48.  
  49. #Command
  50. command /cm [<text>] [<text>]:
  51. aliases: /chatmanager
  52. permission message: &cYou do not have permission to execute this command!
  53. permission: cm
  54. trigger:
  55. if {cm::slowchat} is true:
  56. set {_cm::sc} to "&a¦"
  57. if {cm::antispam} is true:
  58. set {_cm::as} to "&a¦"
  59. if {cm::mutechat} is true:
  60. set {_cm::mc} to "&a¦"
  61. if arg-1 is not set:
  62. send " &3&lCHATMANAGER &3(Help)"
  63. send ""
  64. send formatted "%{_cm::sc} ? ""&c¦""% &8| &3SlowChat: &7&oMake People Chat Slower, limiting the Spam<reset>"
  65. send formatted "%{_cm::as} ? ""&c¦""% &8| &3AntiSpam: &7&oLimit Users to Only Saying the same thing Once!<reset>"
  66. send formatted "%{_cm::mc} ? ""&c¦""% &8| &3MuteChat: &7&oMute Chat for Non Staff Members<reset>"
  67. send ""
  68. send "&3SlowChat Timer: &7&o%{cm::timer} ? ""1 Second""%"
  69. send "&3Word Spam Limit: &7&o%{cm::wsl} ? ""None""%"
  70. send "&3Include Punctuation in AntiSpam: &7&o%{cm::ipa} ? ""false""%"
  71. send ""
  72. send "&7&oFor more help do /cm help, also refer to &3/filter"
  73. send ""
  74. stop
  75. if arg-1 = "help":
  76. if arg-2 is not set:
  77. send " &3&lCHATMANAGER &3(Help/Usage)"
  78. send "&7&o[] = &3Optional &7&o() = &3Mandatory"
  79. send ""
  80. send formatted "&3SlowChat: <tooltip:&7&oUse /cm (sc/slowchat) [on/off] &3or &7&o/slowchat [on/off]>&7&oHover on me<reset>"
  81. send formatted "&3AntiSpam: <tooltip:&7Use /cm (as/antispam) [on/off] &3or &7&o/antispam [on/off]>&7&oHover on me<reset>"
  82. send formatted "&3MuteChat: <tooltip:&7Use /cm (mc/mutechat) [on/off] &3or &7&o/mutechat [on/off]>&7&oHover on me<reset>"
  83. send formatted "&3SlowChat Timer: <tooltip:&7&oUse /cm timer (timespan) &3or &7&o/timer (timespan)>&7&oHover on me<reset>"
  84. send formatted "&3Word Spam Limit: <tooltip:&7&oUse /cm (wsl/wordspamlimit) (number)>&7&oHover on me<reset>"
  85. send formatted "&3Include Punctuation: <tooltip:&7&oUse /cm (ipa/includepunctuation) [on/off]>&7&oHover on me<reset>"
  86. send formatted "&3Clear Chat: <tooltip:&7&oUse /cm (cc/clearchat) &3or &7&o/clearchat &3or &7&o/cc>&7&oHover on me<reset>"
  87. send formatted "&3Set Format: <tooltip:&7&oUse /cm (format/setformat) (format) &3or &7&o/setformat (format)>&7&oHover on me<reset>"
  88. send ""
  89. send "&7&oFor Help on each command do /cm help (command), also refer to &3/filter"
  90. stop
  91. if arg-2 is not "SlowChat", "sc", "AntiSpam", "as", "MuteChat", "Mc", "Timer", "SlowChatTimer", "wsl", "wordspamlimit", "ipa", "IncludePunctuation", "cc", "format", "setformat" or "clearchat":
  92. send " &3&lCHATMANAGER &3(Error)"
  93. send ""
  94. send "&7&oAn error occured, this arguments you set are not recognized. Please do /cm help for help"
  95. send ""
  96. stop
  97. if arg-2 = "SlowChat" or "sc":
  98. send " &3&lSLOWCHAT&3(Help/Usage/SlowChat)"
  99. send "&7&o[] = &3Optional &7&o() = &3Mandatory"
  100. send ""
  101. send "&3Usage: %nl%&7&oUse /cm (sc/slowchat) [on/off] &3or &7&o/slowchat [on/off]"
  102. send "&3Description: %nl%&7&oSlowChat blocks players from sending messages too fast"
  103. send ""
  104. if arg-2 = "AntiSpam" or "as":
  105. send " &3&lANTISPAM&3(Help/Usage/AntiSpam)"
  106. send "&7&o[] = &3Optional &7&o() = &3Mandatory"
  107. send ""
  108. send "&3Usage: %nl%&7&oUse /cm (as/antispam) [on/off] &3or &7&o/antispam [on/off]"
  109. send "&3Description: %nl%&7&oAntiSpam blocks players from sending the same message too many times"
  110. send "&3Additional Information: &7&oWord Spam Limit can be set, use /cm help (wsl/wordspamlimit) for more information"
  111. send ""
  112. if arg-2 = "MuteChat" or "mc":
  113. send " &3&lMUTECHAT&3(Help/Usage/MuteChat)"
  114. send "&7&o[] = &3Optional &7&o() = &3Mandatory"
  115. send ""
  116. send "&3Usage: %nl%&7&oUse /cm (mc/mutechat) [on/off] &3or &7&o/mutechat[on/off]"
  117. send "&3Description: %nl%&7&oMuteChat blocks non staff members from speaking in chat"
  118. send ""
  119. if arg-2 = "Timer" or "SlowChatTimer":
  120. send " &3&lTIMER&3(Help/Usage/Timer)"
  121. send "&7&o[] = &3Optional &7&o() = &3Mandatory"
  122. send ""
  123. send "&3Usage: %nl%&7&oUse /cm timer (timespan) &3or &7&o/timer (timespan)"
  124. send "&3Description: %nl%&7&oSets the timer for slowchat"
  125. send ""
  126. if arg-2 = "wsl" or "WordSpamLimit":
  127. send " &3&lSPAMLIMIT&3(Help/Usage/Wsl)"
  128. send "&7&o[] = &3Optional &7&o() = &3Mandatory"
  129. send ""
  130. send "&3Usage: %nl%&7&oUse /cm (wsl/wordspamlimit) (number)"
  131. send "&3Description: %nl%&7&oSets the times people can repeat themselves"
  132. send ""
  133. if arg-2 = "ipa" or "IncludePunctuation":
  134. send " &3&lPUNCTUATION&3(Help/Usage/Ipa)"
  135. send "&7&o[] = &3Optional &7&o() = &3Mandatory"
  136. send ""
  137. send "&3Usage: %nl%&7&oUse /cm (ipa/includepunctuation) [on/off]"
  138. send "&3Description: %nl%&7&oInclude (!/./?/</>/[/]/##/@/$/%%/^/*) in AntiSpam"
  139. send ""
  140. if arg-2 = "cc" or "ClearChat":
  141. send " &3&lCLEARCHAT&3(Help/Usage/ClearChat)"
  142. send "&7&o[] = &3Optional &7&o() = &3Mandatory"
  143. send ""
  144. send "&3Usage: %nl%&7&oUse /cm (cc/clearchat) &3or &7&o/clearchat &3or &7&o/cc"
  145. send "&3Description: %nl%&7&oClear Chat for non staff members, eliminating all profanity"
  146. send ""
  147. if arg-2 = "format" or "setformat":
  148. send " &3&lFORMAT&3(Help/Usage/Format)"
  149. send "&7&o[] = &3Optional &7&o() = &3Mandatory"
  150. send ""
  151. send "&3Usage: %nl%&7&oUse /cm (format/setformat) (format) &3or &7&o/setformat (format)"
  152. send "&3Description: %nl%&7&oSet the chat format"
  153. send "&3Additional Information: %nl%%nl% &3&lLegend:"
  154. send "&3<player> = &7&oplayer's name"
  155. send "&3<prefix> = &7&oplayer's prefix"
  156. send "&3<nickname> = &7&oplayer's nickname"
  157. send "&3<suffix> = &7&oplayer's suffix"
  158. send "&3<chatcolor> = &7&oplayer's chat color"
  159. send "&3<message> = &7&oplayer's message"
  160. send "&3<group> = &7&oplayer's group"
  161. send "&3<tag> = &7player's tag"
  162. send "&3<team> = &7&oplayer's team (&3Only works with my team skript, click here to learn more about it&7&o)"
  163. send ""
  164. send "&3Ex: &7&o/cm setformat <player>: <message>"
  165. send ""
  166.  
  167. #SUBCOMMANDS
  168. if arg-1 = "mutechat" or "mc":
  169. if arg-2 = "on":
  170. if {cm::mutechat} = true:
  171. send "&3Error: &7&oChat is already muted"
  172. stop
  173. set {cm::mutechat} to true
  174. broadcast ""
  175. broadcast "&3&lCHAT MUTED &7&oby &3%player%"
  176. broadcast ""
  177. stop
  178. if arg-2 = "off":
  179. if {cm::mutechat} is not set:
  180. send "&3Error: &7&oChat is not muted"
  181. stop
  182. delete {cm::mutechat}
  183. broadcast ""
  184. broadcast "&3&lCHAT UNMUTED &7&oby &3%player%"
  185. broadcast ""
  186. stop
  187. if {cm::mutechat} = true:
  188. delete {cm::mutechat}
  189. broadcast ""
  190. broadcast "&3&lCHAT UNMUTED &7&oby &3%player%"
  191. broadcast ""
  192. stop
  193. set {cm::mutechat} to true
  194. broadcast ""
  195. broadcast "&3&lCHAT MUTED &7&oby &3%player%"
  196. broadcast ""
  197. stop
  198. if arg-1 = "slowchat" or "sc":
  199. if arg-2 = "on":
  200. if {cm::slowchat} = true:
  201. send "&3Error: &7&oChat is already slowed"
  202. stop
  203. set {cm::slowchat} to true
  204. broadcast ""
  205. broadcast "&3&lCHAT SLOWED &7&oby &3%player% &7&owith a timer of (&3&o%{cm::timer} ? ""1 second""%&7&o)"
  206. broadcast ""
  207. stop
  208. if arg-2 = "off":
  209. if {cm::slowchat} is not set:
  210. send "&3Error: &7&oChat is not slowed"
  211. stop
  212. delete {cm::slowchat}
  213. broadcast ""
  214. broadcast "&3&lCHAT UNSLOWED &7&oby &3%player%"
  215. broadcast ""
  216. stop
  217. if {cm::slowchat} = true:
  218. delete {cm::slowchat}
  219. broadcast ""
  220. broadcast "&3&lCHAT UNSLOWED &7&oby &3%player%"
  221. broadcast ""
  222. stop
  223. set {cm::slowchat} to true
  224. broadcast ""
  225. broadcast "&3&lCHAT SLOWED &7&oby &3%player%"
  226. broadcast ""
  227. stop
  228. if arg-1 = "antispam" or "as":
  229. if arg-2 = "on":
  230. if {cm::antispam} = true:
  231. send "&3Error: &7&oAntispam is already on"
  232. stop
  233. set {cm::antispam} to true
  234. broadcast ""
  235. broadcast "&3&lANTISPAM ON &7&oby &3%player%"
  236. broadcast ""
  237. stop
  238. if arg-2 = "off":
  239. if {cm::antispam} is not set:
  240. send "&3Error: &7&oAntiSpam is not on"
  241. stop
  242. delete {cm::antispam}
  243. broadcast ""
  244. broadcast "&3&lANTISPAM OFF &7&oby &3%player%"
  245. broadcast ""
  246. stop
  247. if {cm::antispam} = true:
  248. delete {cm::antispam}
  249. broadcast ""
  250. broadcast "&3&lANTISPAM OFF &7&oby &3%player%"
  251. broadcast ""
  252. stop
  253. set {cm::antispam} to true
  254. broadcast ""
  255. broadcast "&3&lANTISPAM ON &7&oby &3%player%"
  256. broadcast ""
  257. stop
  258. if arg-1 = "timer":
  259. if arg-2 is not set:
  260. send "&3Error: &7&oYou must give a timespan for the timer, use /cm help timer for more help!"
  261. stop
  262. else:
  263. set {_timer} to "%arg-2%" parsed as a timespan
  264. if {_timer} is not set:
  265. send "&3Error: &7&o(%arg-2%&7&o) was not recognized as a timespan!"
  266. stop
  267. if {_timer} < 1 second:
  268. send "&3Error: &7&oTimer must be more than one second!"
  269. stop
  270. set {cm::timer} to {_timer}
  271. broadcast "&3&lSLOWCHAT TIMER &7&oset to &3%{_timer}% &7&oby &3%player%"
  272. stop
  273. if arg-1 = "wsl" or "wordspamlimit":
  274. if arg-2 is not set:
  275. send "&3Error: &7&oYou must mention a number to be set as the word spam limit!"
  276. stop
  277. set {_number} to "%arg-2%" parsed as a number
  278. set {_number} to round({_number})
  279. if {_number} < 0:
  280. send "&3Error: &7&oWord Spam limit must be greater than 0!"
  281. stop
  282. if {_number} is not set:
  283. send "&3Error: &7&o(%arg-2%&7&o) is not recognized as a number!"
  284. stop
  285. set {cm::wsl} to {_number}
  286. broadcast "&3&lWORD SPAM LIMIT &7&oset to &3%{_number}% &7&oby &3%player%"
  287. stop
  288. if arg-1 is "format" or "setformat":
  289. if arg-2 is not set:
  290. send "&3Error: &7&oYou must mention the format to use, do &3/cm help format &7&ofor help!"
  291. stop
  292. set {_format} to "%colored arg-2%"
  293. replace all ">" with ">&7" in {_format}
  294. set {cm::format} to "%colored arg-2%"
  295. send "&3&lCHAT FORMAT UPDATE &7&oto (&7%{_format}%&7&o) by &3%player% &7&o(Staff Only Message)" to all players where [input has permission "cm"]
  296. if arg-1 = "includepunctuation" or "ipa":
  297. if arg-2 = "on":
  298. if {cm::ipa} = true:
  299. send "&3Error: &7&oIncludePunctuation is already on"
  300. stop
  301. set {cm::ipa} to true
  302. send "&3CHATMANAGER &7&o((STAFF ONLY)) &8• &7&oPunctuation is now included in antispam" to all players where [input has permission "cm"]
  303. stop
  304. if arg-2 = "off":
  305. if {cm::ipa} is not set:
  306. send "&3Error: &7&oIncludePunctuation is not on"
  307. stop
  308. delete {cm::ipa}
  309. send "&3CHATMANAGER &7&o((STAFF ONLY)) &8• &7&oPunctuation is now excluded in antispam" to all players where [input has permission "cm"]
  310. stop
  311. if {cm::ipa} = true:
  312. delete {cm::ipa}
  313. send "&3CHATMANAGER &7&o((STAFF ONLY)) &8• &7&oPunctuation is now excluded in antispam" to all players where [input has permission "cm"]
  314. stop
  315. set {cm::ipa} to true
  316. send "&3CHATMANAGER &7&o((STAFF ONLY)) &8• &7&oPunctuation is now included in antispam" to all players where [input has permission "cm"]
  317. stop
  318. if arg-1 = "clearchat" or "cc":
  319. loop 100 times:
  320. send "&7" to all players where [input doesn't have permission "cm"]
  321. send "&7%nl%&3&lCHATMANAGER &7&o((STAFF ONLY)) &8• &7&oChat was cleared by &3%player% &7&o((Chat is not cleared for staff))%nl%&7" to all players where [input has permission "cm"]
  322. broadcast "&3&lCHAT CLEARED &7&oby &3%player%"
  323. stop
  324.  
  325.  
  326.  
  327.  
  328. #Commands
  329.  
  330. command /slowchat [<text>]:
  331. permission: cm
  332. trigger:
  333. make player execute command "/cm sc %arg-1%"
  334.  
  335. command /antispam [<text>]:
  336. permission: cm
  337. trigger:
  338. make player execute command "/cm as %arg-1%"
  339.  
  340. command /mutechat [<text>]:
  341. permission: cm
  342. aliases: /mc
  343. trigger:
  344. make player execute command "/cm mc %arg-1%"
  345.  
  346. command /timer [<text>]:
  347. permission: cm
  348. trigger:
  349. make player execute command "/cm timer %arg-1%"
  350.  
  351. command /clearchat:
  352. permission: cm
  353. aliases: /cc
  354. trigger:
  355. make player execute command "/cm cc"
  356.  
  357. command /setformat [<text>]:
  358. permission: cm
  359. trigger:
  360. if arg-1 is not set:
  361. send "&3Error: &7You must indentify what format you would life, refer to (&3/cm help format&7)"
  362. stop
  363. make player execute command "/cm format %arg-1%"
  364.  
  365.  
  366. #ChatColor
  367.  
  368. command /chatcolor:
  369. trigger:
  370. set {_c} to "Colors"
  371. set {_c::*} to {_c} split by ""
  372. set {_firstColor} to "&d&l"
  373. set {_secondColor} to "&b&l"
  374. set {_color} to {_firstColor}
  375. loop {_c::*}:
  376. set {_c::%loop-index%} to "%{_color}%%{_c::%loop-index%}%"
  377. if {_color} = {_firstColor}:
  378. set {_color} to {_secondColor}
  379. else:
  380. set {_color} to {_firstColor}
  381. set {_word} to "%{_word} ? ""&7""%%{_c::%loop-index%}%"
  382. open virtual chest inventory with size 4 named "%{_word}%" to player
  383. if player is not op:
  384. set {_d} to "&7"
  385. format gui slot integers between 0 and 44 of player with gray stained glass pane named "&f"
  386. format gui slot 10 of player with white wool named "&f&lNo ChatColor" with lore "", "&fWhite &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: None""%" to run function cc(player, "white")
  387. format gui slot 11 of player with red wool named "&c&lRed ChatColor" with lore "", "&cRed &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: cc.red""%" to run function cc(player, "red")
  388. format gui slot 12 of player with blue wool named "&1&lBlue ChatColor" with lore "", "&1Blue &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: cc.blue""%" to run function cc(player, "blue")
  389. format gui slot 13 of player with lime wool named "&a&lLime ChatColor" with lore "", "&aLime &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: cc.lime""%" to run function cc(player, "lime")
  390. format gui slot 14 of player with light blue wool named "&b&lLight Blue ChatColor" with lore "", "&bLight Blue &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: cc.lightblue""%" to run function cc(player, "lightblue")
  391. format gui slot 15 of player with pink wool named "&d&lPink ChatColor" with lore "", "&dPink &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: cc.pink""%" to run function cc(player, "pink")
  392. format gui slot 16 of player with orange wool named "&6&lOrange ChatColor" with lore "", "&6Orange &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: cc.orange""%" to run function cc(player, "orange")
  393. format gui slot 20 of player with yellow wool named "&e&lYellow ChatColor" with lore "", "&eYellow &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: cc.yellow""%" to run function cc(player, "yellow")
  394. format gui slot 21 of player with purple wool named "&5&lPurple ChatColor" with lore "", "&5Purple &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: cc.purple""%" to run function cc(player, "purple")
  395. format gui slot 22 of player with cyan wool named "&3&lCyan ChatColor" with lore "", "&3Cyan &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: cc.cyan""%" to run function cc(player, "cyan")
  396. format gui slot 23 of player with green wool named "&2&lGreen ChatColor" with lore "", "&2Green &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: cc.cyan""%" to run function cc(player, "green")
  397. set {oi::%player's uuid%} to true
  398. set {_colors::*} to "&f", "&c", "&1", "&a", "&b", "&d", "&6", "&e", "&5" and "&3" and "&2"
  399. while {oi::%player's uuid%} = true:
  400. set {_c} to a random element out of {_colors::*}
  401. format gui slot 24 of player with concrete named "%{_c}%&lRainbow ChatColor" with lore "", "%{_c}%Rainbow &7ChatColor" and "%{_d} ? ""&7((ADMIN ONLY)) PERMISSION: cc.rainbow""%" to run function cc(player, "rainbow")
  402. wait 10 ticks
  403.  
  404.  
  405.  
  406. on inventory close:
  407. delete {oi::%player's uuid%}
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414. function cc(p: player, t: text):
  415. close {_p}'s inventory
  416. set {_u} to uuid of {_p}
  417. if {_t} = "white":
  418. set {chatcolor::%{_u}%} to "&f"
  419. send "&7Chatcolor updated to &fWhite" to {_p}
  420. stop
  421. if {_p} doesn't have permission "cc.%{_t}%":
  422. send "{@NoPermissionChatColor}" to {_p}
  423. stop
  424. if {_t} = "red":
  425. set {chatcolor::%{_u}%} to "&c"
  426. send "&7Chatcolor updated to &cRed" to {_p}
  427. if {_t} = "blue":
  428. set {chatcolor::%{_u}%} to "&1"
  429. send "&7Chatcolor updated to &1Blue" to {_p}
  430. if {_t} = "lime":
  431. set {chatcolor::%{_u}%} to "&a"
  432. send "&7Chatcolor updated to &aLime" to {_p}
  433. if {_t} = "lightblue":
  434. set {chatcolor::%{_u}%} to "&b"
  435. send "&7Chatcolor updated to &bLightBlue" to {_p}
  436. if {_t} = "pink":
  437. set {chatcolor::%{_u}%} to "&d"
  438. send "&7Chatcolor updated to &dPink" to {_p}
  439. if {_t} = "orange":
  440. set {chatcolor::%{_u}%} to "&6"
  441. send "&7Chatcolor updated to &6Orange" to {_p}
  442. if {_t} = "yellow":
  443. set {chatcolor::%{_u}%} to "&e"
  444. send "&7Chatcolor updated to &eYellow" to {_p}
  445. if {_t} = "purple":
  446. set {chatcolor::%{_u}%} to "&5"
  447. send "&7Chatcolor updated to &5Purple" to {_p}
  448. if {_t} = "cyan":
  449. set {chatcolor::%{_u}%} to "&3"
  450. send "&7Chatcolor updated to &3Cyan" to {_p}
  451. if {_t} = "rainbow":
  452. set {chatcolor::%{_u}%} to "rainbow"
  453. send "&7Chatcolor updated to &3Rainbow" to {_p}
  454. if {_t} = "green":
  455. set {chatcolor::%{_u}%} to "&2"
  456. send "&7Chatcolor updated to &2Green" to {_p}
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464. command /filter [<text>] [<text>]:
  465. permission: cm
  466. trigger:
  467. if arg-1 is not set:
  468. send "&3&lCHATMANAGER &7You are missing an argument (add, remove, list, strict)"
  469. send ""
  470. send "&3Strict mode &7means the word will be filtered if it contains a filter string. If filter is disabled, the word will be filtered if it is the exact same as the filtered string"
  471. send ""
  472. stop
  473. if arg-1 = "strict":
  474. if {cm::strict} = true:
  475. delete {cm::strict}
  476. send "&3&lCHATMANAGER &7Strict mode disabled (Words will only filter if they are exactly what is written when adding it to the filter)"
  477. stop
  478. set {cm::strict} to true
  479. send "&3&lCHATMANAGER &7Strict mode enabled (Words will now filter if they contain a filter phrase)"
  480. stop
  481. if arg-1 = "add":
  482. if arg-2 is not set:
  483. send "&3&lCHATMANAGER &7Please define what word you would like to add to the filter!"
  484. stop
  485. if {filter::*} contains arg-2:
  486. send "&3&lCHATMANAGER &3%arg-2% &7is already in the filter!"
  487. stop
  488. add arg-2 to {filter::*}
  489. send "&3&lCHATMANAGER &7Added &3%arg-2% &7to the filter!"
  490. stop
  491. if arg-1 = "remove":
  492. if arg-2 is not set:
  493. send "&3&lCHATMANAGER &7Please define what you would like to remove from the filter!"
  494. stop
  495. if {filter::*} doesn't contain arg-2:
  496. send "&3&lCHATMANAGER &3%arg-2% &7is not in the filter!"
  497. stop
  498. remove arg-2 from {filter::*}
  499. send "&3&lCHATMANAGER &7Removed &3%arg-2% &7from the filter!"
  500. stop
  501. if arg-1 = "list":
  502. send "&3&lCHATMANAGER &7List of profanity words added to filter..."
  503. send ""
  504. send "&7%{filter::*} ? ""None""%"
  505. send ""
  506.  
  507.  
  508.  
  509. on script load:
  510. broadcast "&3&lCHATMANAGER &7Loaded (/cm help) (/filter)"
  511.  
  512. #Chat Format
  513.  
  514. on chat:
  515. replace all "(:" and ":)" with "?" in message
  516. set {_format} to {cm::format}
  517. set {_nickname} to "%player's nickname%"
  518. replace all "<player>" in {_format} with "%player%"
  519. replace all "<prefix>" in {_format} with "%player's prefix%"
  520. replace all "<nickname>" in {_format} with "%{_nickname}%"
  521. replace all "<suffix>" in {_format} with "%player's suffix%"
  522. if {_format} contains "<chatcolor>":
  523. set {_true} to true
  524. replace all "<chatcolor>" in {_format} with "%{chatcolor::%player's uuid%} ? ""&7""%"
  525. if {tag::%player's uuid%} is set:
  526. if {tags::*} doesn't contain {tag::%player's uuid%}:
  527. delete {tag::%player's uuid%}
  528. replace all "<tag>" in {_format} with "%{tag::%player's uuid%} ? """"%"
  529. if {chatcolor::%player's uuid%} = "rainbow":
  530. if {_true} = true:
  531. replace all "rainbow" with "" in {_format}
  532. set {_l} to a random number between 0.3 and 0.7
  533. set {_o} to a random integer between 0 and 20
  534. set {_message} to uncolored message
  535. replace all "<message>" in {_format} with "%rainbow({_message}, 50, {_l}, {_o})%"
  536. else:
  537. set {_message} to uncolored message
  538. replace all "<message>" in {_format} with "%{_message}%"
  539. else:
  540. set {_message} to uncolored message
  541. replace all "<message>" in {_format} with "%{_message}%"
  542. replace all "<team>" in {_format} with "%{team::%player's uuid%} ? """"%"
  543. replace all "<group>" in {_format} with "%player's group%"
  544. if {cm::slowchat} = true:
  545. player doesn't have permission "cm"
  546. set {_timer} to {cm::timer}
  547. if {_timer} is not set:
  548. set {_timer} to 1 second
  549. if difference between now and {cm::lastwordtime::%player's uuid%} < {_timer}:
  550. cancel event
  551. set {_alrt} to "{@TalkSlowMessage}"
  552. set {_cooldown} to difference between now and {cm::lastwordtime::%player's uuid%}
  553. set {_cooldownt} to {_timer}
  554. remove {_cooldown} from {_cooldownt}
  555. replace all "<time>" with "%{_cooldownt}%" in {_alrt}
  556. send "%{_alrt}%"
  557. stop
  558. if {cm::mutechat} = true:
  559. player doesn't have permission "cm"
  560. cancel event
  561. send "{@ChatMutedMessage}"
  562. stop
  563. if {cm::antispam} = true:
  564. player doesn't have permission "cm"
  565. set {_msg} to "%message%"
  566. if {cm::ipa} = true:
  567. replace all "!", ".", "?", "<", ">", "[", "]", "##", "@", "$", "%%", "^" and "*" with "" in {_msg}
  568. set {_lastmsg} to {cm::lastword::%player's uuid%}
  569. set {_lm::*} to {_lastmsg} split by "|"
  570. set {_lm::1} to {_lm::1} parsed as an integer
  571. if "%{_lm::2}%" = "%{_msg}%":
  572. set {_limit} to {cm::wsl} ? 1
  573. set {_sw} to true
  574. if {_lm::1} >= {_limit}:
  575. send "{@AntiSpamMessage}"
  576. cancel event
  577. stop
  578. if {_sw} = true:
  579. set {cm::lastword::%player's uuid%} to "%{_lm::1} + 1%|%{_msg}%"
  580. else:
  581. set {cm::lastword::%player's uuid%} to "1|%{_msg}%"
  582. set {_b} to uncolored colored message
  583. set {_b::*} to {_b} split by " "
  584. if {cm::strict} = true:
  585. loop {filter::*}:
  586. if uncolored message contains loop-value:
  587. send "&7Your message was filtered for profanity"
  588. send "&c%player%&7's sentence was filtered (&c%uncolored message%&7)" to all players where [input has permission "cm"]
  589. cancel event
  590. stop
  591. else:
  592. size of {filter::*} > 0
  593. loop {_b::*}:
  594. if {filter::*} contains loop-value:
  595. send "&7Your message was filtered for profanity (&c%loop-value%&7)"
  596. send "&c%player%&7's message was filtered for profanity (&c%loop-value%&7)" to all players where [input has permission "cm"]
  597. cancel event
  598. stop
  599. set {cm::lastwordtime::%player's uuid%} to now
  600. set chat format to formatted "%colored {_format}%"
  601. send "%player%: %message%" to channel with id "{@DiscordBotChannel}" with "{@DiscordBotName}"
  602.  
  603. on script load:
  604. if {cm::format} is not set:
  605. set {cm::format} to "&7<player>&7: <message>"
  606. on stop:
  607. delete {cm::lastword::*}
  608. delete {cm::lastwordtime::*}
  609.  
  610.  
  611. #CREDIT TO SORBONS FOR THIS RAINBOW FUNCTION
  612. # https://www.spigotmc.org/resources/rainbowchat-skript.84868/
  613.  
  614. function decimalToHexadecimal(number: number) :: string:
  615. return ("00" if {_number} <= 0, else ("FF")) if {_number} is not between 0 and 255
  616. return join (character at (mod((floor({_number} / 16)), 16) + 1) in "0123456789ABCDEF") and (character at ((mod({_number}, 16)) + 1) in "0123456789ABCDEF")
  617.  
  618. function rainbow(input: string, wrapAmount: number = -1, lightness: number = 0.5, offset: number = 0) :: string:
  619. set {_delta} to 360 / ({_wrapAmount} if {_wrapAmount} > 0, else length of {_input})
  620. set {_lightnessModifier} to (({_lightness}*2)-1) * 255
  621. set {_angle} to 90 + ({_delta} * {_offset})
  622. loop length of {_input} times:
  623. set {_character} to character at loop-value in {_input}
  624. if {_character} or (character at (loop-value - 1) in {_input}) is "§":
  625. if "abcdefklmnor0123456789" contains {_character}:
  626. set {_format} to (join {_format} and "&%{_character}%") if {_character} is not "r", else ("")
  627. continue
  628. set {_output} to join {_output}, "<##%decimalToHexadecimal((0.5 * (sin({_angle}) + 1)) * 255 + {_lightnessModifier})%%decimalToHexadecimal((0.5 * (sin({_angle} + 120) + 1)) * 255 + {_lightnessModifier})%%decimalToHexadecimal((0.5 * (sin({_angle} + 240) + 1)) * 255 + {_lightnessModifier})%>", {_format} and {_character}
  629. remove {_delta} from {_angle}
  630. return formatted {_output}
  631.  
  632. function gradient(input: string, startColor: numbers, endColor: numbers, wrapAmount: number = -1) :: string:
  633. set {_delta} to 180 / ({_wrapAmount} if {_wrapAmount} > 0, else (length of unformatted {_input}) - 1)
  634. set {_angle} to 90
  635. loop length of {_input} times:
  636. set {_character} to character at loop-value in {_input}
  637. if {_character} or (character at (loop-value - 1) in {_input}) is "§":
  638. if "abcdefklmnor0123456789" contains {_character}:
  639. set {_format} to (join {_format} and "&%{_character}%") if {_character} is not "r", else ("")
  640. continue
  641. set {_startColorProportion} to (0.5 * (sin({_angle}) + 1))
  642. set {_endColorProportion} to (0.5 * (sin({_angle} + 180) + 1))
  643. set {_output} to join {_output}, "<##%decimalToHexadecimal(({_startColor::1} * {_startColorProportion}) + ({_endColor::1} * {_endColorProportion}))%%decimalToHexadecimal(({_startColor::2} * {_startColorProportion}) + ({_endColor::2} * {_endColorProportion}))%%decimalToHexadecimal(({_startColor::3} * {_startColorProportion}) + ({_endColor::3} * {_endColorProportion}))%>", {_format} and {_character}
  644. add {_delta} to {_angle}
  645. return formatted {_output}
  646.  
  647. #END OF FUNCTION
  648.  
  649.  
  650.  
  651.  
  652. #TAGS
  653.  
  654. command /tags:
  655. trigger:
  656. if {tags::*} doesn't contain {tag::%player's uuid%}:
  657. delete {tag::%player's uuid%}
  658. open virtual chest inventory with size 3 named "Tags" to player
  659. format gui slot integers between 0 and 44 of player with gray stained glass pane named "&f"
  660. format gui slot 10, 2, 20 and 12 of player with yellow stained glass pane named "&7"
  661. format gui slot 11 of player with shiny name tag named "&e&lTAGS" to run function tags(player, 1, 11)
  662. format gui slot 6, 14, 24 and 16 of player with orange stained glass pane named "&7"
  663. if {tag::%player's uuid%} is set:
  664. format gui slot 4 of player with shiny name tag named "&7Tag Selected: %{tag::%player's uuid%}%"
  665. else:
  666. format gui slot 4 of player with paper named "&7No Tag Selected"
  667. if player has permission "tags.admin":
  668. format gui slot 15 of player with shiny paper named "&6&lADMIN PANEL" with lore "&7Click to open the &6Admin Panel" to run:
  669. format gui slot 11 of player with shiny green concrete powder named "&a&lCREATE TAG" with lore "", "&7Use &a/createtag (TAG)" and ""
  670. format gui slot 10, 2, 20 and 12 of player with green stained glass pane named "&7"
  671. format gui slot 15 of player with barrier named "&c&lCLOSE" to run player command "/tags"
  672. stop
  673. else:
  674. format gui slot 15 of player with shiny paper named "&6&lADMIN PANEL" with lore "&7Click to open the &6Admin Panel" to run:
  675. format gui slot 15 of player with red stained glass pane named "&cNo permission"
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684. function tags(p: player, n: number, s: number):
  685. set {_page} to {_n}
  686. set {_amount} to {_page}*21
  687. set {_amount} to {_amount}-20
  688. if {_page} is not 1:
  689. if size of {tags::*} < {_amount}:
  690. format gui slot {_s} of {_p} with red stained glass pane named "&cNo more pages"
  691. stop
  692. else:
  693. if {_page} < 1:
  694. format gui slot {_s} of {_p} with red stained glass pane named "&cNo more pages"
  695. stop
  696. open virtual chest inventory with size 5 named "Tags - %{_page}%" to {_p}
  697. set {_s} to 0
  698. set {_colors::*} to "red", "yellow", "lime", "green", "orange", "pink", and "black"
  699. loop 45 times:
  700. if {_s} is between 10 and 16:
  701. format gui slot {_s} of {_p} with gray stained glass pane named "&7"
  702. else if {_s} is between 19 and 25:
  703. format gui slot {_s} of {_p} with gray stained glass pane named "&7"
  704. else if {_s} is between 28 and 34:
  705. format gui slot {_s} of {_p} with gray stained glass pane named "&7"
  706. else:
  707. set {_c} to a random element out of {_colors::*}
  708. set {_c} to "%{_c}% stained glass pane" parsed as an item
  709. format gui slot {_s} of {_p} with {_c} named "&7"
  710. add 1 to {_s}
  711. format gui slot 40 of {_p} with shiny barrier named "&c&lCLOSE" to run {_p} command "/tags"
  712. set {_u} to uuid of {_p}
  713. if {tag::%{_u}%} is set:
  714. format gui slot 4 of {_p} with anvil named "&cRemove Tag" to run:
  715. delete {tag::%{_u}%}
  716. send "&7Removed your tag." to {_p}
  717. format gui slot 4 of {_p} with anvil named "&cNo Tag"
  718. stop
  719. else:
  720. format gui slot 4 of {_p} with anvil named "&cNo Tag"
  721. set {_s} to 10
  722. set {_slot} to 1
  723. if {_page} is not 1:
  724. set {_pp} to {_page}-1
  725. add 4*{_pp} to {_amount}
  726. loop {tags::*}:
  727. if {_slot} < {_amount}:
  728. add 1 to {_slot}
  729. else:
  730. if {_s} = 17 or 18 or 26 or 27:
  731. add 1 to {_s}
  732. else:
  733. if {_s} > 34:
  734. exit loop
  735. stop
  736. set {_tag} to uncolored loop-value
  737. set {_ctag} to colored loop-value
  738. if {_p} has permission "tags.admin":
  739. set {_b} to "&7Middle Click to &cDelete tag"
  740. if {_p} has permission "tag.%{_tag}%":
  741. format gui slot {_s} of {_p} with shiny name tag named "&7%{_ctag}%" with lore "", "&7Click to select this tag", "", "&7Permission: &atag.%{_tag}%", "%{_b} ? """"%" and "" to run with "left" click:
  742. set {_u} to uuid of {_p}
  743. set {tag::%{_u}%} to "%{_ctag}%"
  744. close {_p}'s inventory
  745. send "&7Tag updated to &6%{_tag}%" to {_p}
  746. stop
  747. format gui slot {_s} of {_p} with shiny name tag named "&7%{_ctag}%" with lore "", "&7Click to select this tag", "", "&7Permission: &atag.%{_tag}%", "%{_b} ? """"%" and "" to run with "right" click:
  748. set {_u} to uuid of {_p}
  749. set {tag::%{_u}%} to "%{_ctag}%"
  750. close {_p}'s inventory
  751. send "&7Tag updated to &6%{_tag}%" to {_p}
  752. stop
  753. {_p} has permission "tags.admin"
  754. format gui slot {_s} of {_p} with shiny name tag named "&7%{_ctag}%" with lore "", "&7Click to select this tag", "", "&7Permission: &atag.%{_tag}%", "%{_b} ? """"%" and "" to run with "middle" click:
  755. remove "%{_ctag}%" from {tags::*}
  756. format gui slot {_s} of {_p} with paper named "&cDeleted Tag"
  757. stop
  758. else:
  759. format gui slot {_s} of {_p} with name tag named "&7%{_ctag}%" with lore "", "&7You do not have permission to this tag!", "", "&7Permission: &atag.%{_tag}%" and "" to run:
  760. format gui slot {_s} of {_p} with red stained glass pane named "&cNo permission"
  761. stop
  762. add 1 to {_s}
  763. add 1 to {_slot}
  764. format gui slot 44 of {_p} with arrow named "&aNext Page" to run function tags({_p}, {_page}+1, 44)
  765. format gui slot 36 of {_p} with arrow named "&cBack" to run function tags({_p}, {_page}-1, 36)
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772. command /createtag [<text>]:
  773. permission: tags.admin
  774. trigger:
  775. if arg-1 is not set:
  776. send "&7Hey, wrong usage! Use &a/createtag (TAG)"
  777. stop
  778. if {tags::*} contains colored arg-1:
  779. send "&7Hey, this tag already exists..."
  780. stop
  781. add colored arg-1 to {tags::*}
  782. send "&7New tag made! --> %colored arg-1%"
  783. stop
  784.  
  785.  
  786.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement