Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.19 KB | None | 0 0
  1. every 1 second:
  2. loop all players:
  3. if {Chat::%loop-player's uuid%::Cooldown} is set:
  4. if {Chat::%loop-player's uuid%::Cooldown} <= 0.5 seconds:
  5. delete {Chat::%loop-player's uuid%::Cooldown}
  6. else:
  7. remove 0.5 seconds from {Chat::%loop-player's uuid%::Cooldown}
  8. if {Command::%loop-player's uuid%::Cooldown} is set:
  9. if {Command::%loop-player's uuid%::Cooldown} <= 0.5 seconds:
  10. delete {Command::%loop-player's uuid%::Cooldown}
  11. else:
  12. remove 0.5 seconds from {Command::%loop-player's uuid%::Cooldown}
  13. on chat:
  14. if event is not cancelled:
  15. if {Chat::%player's uuid%::Cooldown} is not set:
  16. set {Chat::%player's uuid%::Cooldown} to 2 seconds
  17. else:
  18. send "&cPlease wait %{Chat::%player's uuid%::Cooldown}% &cbefore chatting again..."
  19. cancel event
  20. stop
  21. if {Chat::%player's uuid%::Repeat} is set:
  22. if length of {Chat::%player's uuid%::Repeat} > 5:
  23. if {Chat::%player's uuid%::Repeat} contains message:
  24. send "&cPlease do not repeat yourself"
  25. cancel event
  26. stop
  27. else if length of {Chat::%player's uuid%::Repeat} < 3:
  28. if {Chat::%player's uuid%::Repeat} is message:
  29. send "&cPlease do not repeat yourself"
  30. cancel event
  31. stop
  32. set {Chat::%player's uuid%::Repeat} to message
  33. set {_0} to message
  34. replace all ".", ":", ";", "##", "/", "<", ">", "!", """", "¤", "$", "%%", "&", "(", ")" and "," in {_0} with ""
  35. set {_1::*} to split {_0} at " "
  36. loop {_1::*}:
  37. if loop-value is "anal", "anus", "prick", "ass", "ballsack", "bastard", "bitch", "biatch", "bloody", "blowjob", "boob", "boobs", "butt", "buttplug", "cock", "cunt", "dick", "didlo", "fag", "fuck", "fuk", "fucker", "fucked", "fucking", "fuckre", "fukre", "nigger", "nigga", "penis", "pussy", "sex", "shit", "sh1t", "sh!t", "slut", "tit", "tits", "turd", "twat", "vagina" or "whore":
  38. cancel event
  39. send "&cPlease talk respectfully"
  40. stop
  41. else if {Chat::Spam::*} contains loop-value:
  42. cancel event
  43. send "&cYour message was considered spam"
  44. stop
  45. set {_Spam::*} to split message at ""
  46. set {_SpamLoop} to 0
  47. loop {_Spam::*}:
  48. add 1 to {_SpamLoop}
  49. if {_SpamLoop} is not 1:
  50. set {_Num} to {_SpamLoop} - 1
  51. set {_SpamLoopTwo} to {_Spam::%{_Num}%}
  52. if loop-value is {_SpamLoopTwo}:
  53. add 1 to {_SpamTrue}
  54. else:
  55. add 1 to {_SpamFalse}
  56. if length of regex replace "[^A-Z]" with "" in loop-value >= 1:
  57. add 1 to {_Caps}
  58. if {_SpamTrue} >= 8:
  59. send "&cYour message was considered spam"
  60. cancel event
  61. stop
  62. else if {_SpamTrue} > {_SpamFalse}:
  63. if length of message > 10:
  64. send "&cYour message was considered spam"
  65. cancel event
  66. stop
  67. else:
  68. set {_Trigger} to {_SpamTrue} * 2
  69. if {_SpamTrue} > {_SpamFalse}:
  70. send "&cYour message was considered spam"
  71. cancel event
  72. stop
  73. if {_Caps} > 6:
  74. set message to message in lower case
  75. send "&cPlease do not use an excessive amount of CAPS"
  76. if {Chat::Toggled} is true:
  77. if player does not have permission "Staff.Chat":
  78. cancel event
  79. send "&cChat is currently muted"
  80. stop
  81. if {Nickname::%player's uuid%} is not set:
  82. if {Chat::%player's uuid%::Color} is not set:
  83. broadcast "%player's prefix% &7%player%: %message%"
  84. else:
  85. broadcast "%player's prefix% &7%player%: <%{Chat::%player's uuid%::Color}%>%message%"
  86. else if {Chat::%player's uuid%::Color} is not set:
  87. broadcast "%player's prefix% &7%{Nickname::%player's uuid%}%&7: %message%"
  88. else:
  89. broadcast "%player's prefix% &7%{Nickname::%player's uuid%}%&7: <%{Chat::%player's uuid%::Color}%>%message%"
  90. cancel event
  91. on command:
  92. if event is not cancelled:
  93. if sender is not the console:
  94. if {Command::%player's uuid%::Cooldown} is not set:
  95. set {Command::%player's uuid%::Cooldown} to 2 seconds
  96. else if command is not "levelup":
  97. delete {Command::%player's uuid%::Cooldown}
  98. else if player does not have permission "Command.Bypass.Cooldown":
  99. send "&cPlease wait %{Command::%player's uuid%::Cooldown}% &cbefore issuing anymore commands..."
  100. cancel event
  101. command /chat [<text>] [<text>] [<text>] [<text>]:
  102. trigger:
  103. if player has permission "Staff.Chat":
  104. if arg-1 is not set:
  105. send "&cUsage: /chat (spam|toggle|mute|clear|clean)"
  106. else if arg-1 is "spam":
  107. if player has permission "Staff.Chat.Spam":
  108. if arg-2 is not set:
  109. send "&cUsage: /chat spam (add|remove|view|show)"
  110. else if arg-2 is "add":
  111. if arg-3 is not set:
  112. send "&cUsage: /chat spam add <word>"
  113. else if arg-4 is set:
  114. send "&cToo many arguments"
  115. else if {Chat::Spam::*} contains arg-3:
  116. send "&cThis word is already added!"
  117. else:
  118. send "&aThis word was successfully added: %arg-3%"
  119. add arg-3 to {Chat::Spam::*}
  120. else if arg-2 is "remove":
  121. if arg-3 is not set:
  122. send "&cUsage: /chat spam remove <word>"
  123. else if arg-4 is set:
  124. send "&cToo many arguments"
  125. else if {Chat::Spam::*} does not contain arg-3:
  126. send "&cThis word does not exist in the spam filter!"
  127. else:
  128. send "&aThis word was successfully removed: %arg-3%"
  129. remove arg-3 from {Chat::Spam::*}
  130. else if arg-2 is "view" or "show":
  131. if arg-4 is set:
  132. send "&cWay too many arguments"
  133. else if arg-3 is set:
  134. send "&cToo many arguments"
  135. else if {Chat::Spam::*} is not set:
  136. send "&cThe list is currently empty"
  137. else:
  138. send "&aShowing List:" and "&a%{Chat::Spam::*}%"
  139. else:
  140. send "&cUsage: /chat spam (add|remove|view|show)"
  141. else:
  142. send "&cYou lack permission"
  143. else if arg-1 is "toggle" or "mute":
  144. if player has permission "Staff.Chat.Toggle":
  145. if arg-2 is not set:
  146. ToggleChat("none", player, false)
  147. else if arg-3 is not set:
  148. if arg-2 is "-s":
  149. ToggleChat("none", player, true)
  150. else:
  151. ToggleChat(arg-2, player, false)
  152. else if arg-3 is set:
  153. if arg-3 is "-s":
  154. ToggleChat(arg-2, player, true)
  155. else:
  156. send "&cUsage: /chat toggle [reason] [-s]"
  157. else if arg-2 is "-s":
  158. ToggleChat("none", player, false)
  159. else:
  160. send "&cUsage: /chat toggle [reason] [-s]"
  161. else:
  162. send "&cYou lack permission"
  163. else if arg-1 is "clear" or "clean":
  164. if player has permission "Staff.Chat.Clear":
  165. if arg-2 is set:
  166. ClearChat(arg-2, player)
  167. else:
  168. ClearChat("none", player)
  169. else:
  170. send "&cYou lack permission"
  171. else:
  172. send "&cYou lack permission"
  173. function ClearChat(r: string, exe: player):
  174. loop 500 times:
  175. broadcast " "
  176. loop all players:
  177. if loop-player has permission "Staff.Logs":
  178. send "&3[STAFF] &fChat has been cleared by %{_exe}%" to loop-player
  179. if {_r} is "none":
  180. broadcast "&cChat has been cleared"
  181. else:
  182. broadcast "&cChat has been cleared due to %{_r}%"
  183. function ToggleChat(r: string, exe: player, s: boolean):
  184. if {_r} is "none":
  185. if {_s} is false:
  186. send "&aSuccessfully toggled chat" to {_exe}
  187. else:
  188. send "&aSuccessfully toggled chat - Silently" to {_exe}
  189. else if {_s} is false:
  190. send "&aSuccesfully toggled chat - Reason Provided" to {_exe}
  191. else:
  192. send "&aSuccesfully toggled chat - Silently - Reason Provided" to {_exe}
  193. if {Chat::Toggled} is not set:
  194. set {Chat::Toggled} to true
  195. if {_s} is false:
  196. if {_r} is not "none":
  197. broadcast "&cChat has been muted due to %{_r}%&c!"
  198. else:
  199. broadcast "&cChat has been muted!"
  200. else:
  201. delete {Chat::Toggled}
  202. if {_s} is false:
  203. broadcast "&cChat has been unmuted!"
  204. loop all players:
  205. if loop-player has permission "Staff.Logs":
  206. if {_r} is not "none":
  207. send "&3[STAFF] &fChat has been toggled by %{_exe}% due to %{_r}%" to loop-player
  208. else:
  209. send "&3[STAFF] &fChat has been toggled by %{_exe}%" to loop-player
  210. on quit:
  211. delete {Chat::%player's uuid%::Cooldown}
  212. delete {Chat::%player's uuid%::Repeat}
  213. delete {Command::%player's uuid%::Cooldown}
  214. delete {Chat::%player's uuid%::Reply}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement