Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- every 1 second:
- loop all players:
- if {Chat::%loop-player's uuid%::Cooldown} is set:
- if {Chat::%loop-player's uuid%::Cooldown} <= 0.5 seconds:
- delete {Chat::%loop-player's uuid%::Cooldown}
- else:
- remove 0.5 seconds from {Chat::%loop-player's uuid%::Cooldown}
- if {Command::%loop-player's uuid%::Cooldown} is set:
- if {Command::%loop-player's uuid%::Cooldown} <= 0.5 seconds:
- delete {Command::%loop-player's uuid%::Cooldown}
- else:
- remove 0.5 seconds from {Command::%loop-player's uuid%::Cooldown}
- on chat:
- if event is not cancelled:
- if {Chat::%player's uuid%::Cooldown} is not set:
- set {Chat::%player's uuid%::Cooldown} to 2 seconds
- else:
- send "&cPlease wait %{Chat::%player's uuid%::Cooldown}% &cbefore chatting again..."
- cancel event
- stop
- if {Chat::%player's uuid%::Repeat} is set:
- if length of {Chat::%player's uuid%::Repeat} > 5:
- if {Chat::%player's uuid%::Repeat} contains message:
- send "&cPlease do not repeat yourself"
- cancel event
- stop
- else if length of {Chat::%player's uuid%::Repeat} < 3:
- if {Chat::%player's uuid%::Repeat} is message:
- send "&cPlease do not repeat yourself"
- cancel event
- stop
- set {Chat::%player's uuid%::Repeat} to message
- set {_0} to message
- replace all ".", ":", ";", "##", "/", "<", ">", "!", """", "¤", "$", "%%", "&", "(", ")" and "," in {_0} with ""
- set {_1::*} to split {_0} at " "
- loop {_1::*}:
- 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":
- cancel event
- send "&cPlease talk respectfully"
- stop
- else if {Chat::Spam::*} contains loop-value:
- cancel event
- send "&cYour message was considered spam"
- stop
- set {_Spam::*} to split message at ""
- set {_SpamLoop} to 0
- loop {_Spam::*}:
- add 1 to {_SpamLoop}
- if {_SpamLoop} is not 1:
- set {_Num} to {_SpamLoop} - 1
- set {_SpamLoopTwo} to {_Spam::%{_Num}%}
- if loop-value is {_SpamLoopTwo}:
- add 1 to {_SpamTrue}
- else:
- add 1 to {_SpamFalse}
- if length of regex replace "[^A-Z]" with "" in loop-value >= 1:
- add 1 to {_Caps}
- if {_SpamTrue} >= 8:
- send "&cYour message was considered spam"
- cancel event
- stop
- else if {_SpamTrue} > {_SpamFalse}:
- if length of message > 10:
- send "&cYour message was considered spam"
- cancel event
- stop
- else:
- set {_Trigger} to {_SpamTrue} * 2
- if {_SpamTrue} > {_SpamFalse}:
- send "&cYour message was considered spam"
- cancel event
- stop
- if {_Caps} > 6:
- set message to message in lower case
- send "&cPlease do not use an excessive amount of CAPS"
- if {Chat::Toggled} is true:
- if player does not have permission "Staff.Chat":
- cancel event
- send "&cChat is currently muted"
- stop
- if {Nickname::%player's uuid%} is not set:
- if {Chat::%player's uuid%::Color} is not set:
- broadcast "%player's prefix% &7%player%: %message%"
- else:
- broadcast "%player's prefix% &7%player%: <%{Chat::%player's uuid%::Color}%>%message%"
- else if {Chat::%player's uuid%::Color} is not set:
- broadcast "%player's prefix% &7%{Nickname::%player's uuid%}%&7: %message%"
- else:
- broadcast "%player's prefix% &7%{Nickname::%player's uuid%}%&7: <%{Chat::%player's uuid%::Color}%>%message%"
- cancel event
- on command:
- if event is not cancelled:
- if sender is not the console:
- if {Command::%player's uuid%::Cooldown} is not set:
- set {Command::%player's uuid%::Cooldown} to 2 seconds
- else if command is not "levelup":
- delete {Command::%player's uuid%::Cooldown}
- else if player does not have permission "Command.Bypass.Cooldown":
- send "&cPlease wait %{Command::%player's uuid%::Cooldown}% &cbefore issuing anymore commands..."
- cancel event
- command /chat [<text>] [<text>] [<text>] [<text>]:
- trigger:
- if player has permission "Staff.Chat":
- if arg-1 is not set:
- send "&cUsage: /chat (spam|toggle|mute|clear|clean)"
- else if arg-1 is "spam":
- if player has permission "Staff.Chat.Spam":
- if arg-2 is not set:
- send "&cUsage: /chat spam (add|remove|view|show)"
- else if arg-2 is "add":
- if arg-3 is not set:
- send "&cUsage: /chat spam add <word>"
- else if arg-4 is set:
- send "&cToo many arguments"
- else if {Chat::Spam::*} contains arg-3:
- send "&cThis word is already added!"
- else:
- send "&aThis word was successfully added: %arg-3%"
- add arg-3 to {Chat::Spam::*}
- else if arg-2 is "remove":
- if arg-3 is not set:
- send "&cUsage: /chat spam remove <word>"
- else if arg-4 is set:
- send "&cToo many arguments"
- else if {Chat::Spam::*} does not contain arg-3:
- send "&cThis word does not exist in the spam filter!"
- else:
- send "&aThis word was successfully removed: %arg-3%"
- remove arg-3 from {Chat::Spam::*}
- else if arg-2 is "view" or "show":
- if arg-4 is set:
- send "&cWay too many arguments"
- else if arg-3 is set:
- send "&cToo many arguments"
- else if {Chat::Spam::*} is not set:
- send "&cThe list is currently empty"
- else:
- send "&aShowing List:" and "&a%{Chat::Spam::*}%"
- else:
- send "&cUsage: /chat spam (add|remove|view|show)"
- else:
- send "&cYou lack permission"
- else if arg-1 is "toggle" or "mute":
- if player has permission "Staff.Chat.Toggle":
- if arg-2 is not set:
- ToggleChat("none", player, false)
- else if arg-3 is not set:
- if arg-2 is "-s":
- ToggleChat("none", player, true)
- else:
- ToggleChat(arg-2, player, false)
- else if arg-3 is set:
- if arg-3 is "-s":
- ToggleChat(arg-2, player, true)
- else:
- send "&cUsage: /chat toggle [reason] [-s]"
- else if arg-2 is "-s":
- ToggleChat("none", player, false)
- else:
- send "&cUsage: /chat toggle [reason] [-s]"
- else:
- send "&cYou lack permission"
- else if arg-1 is "clear" or "clean":
- if player has permission "Staff.Chat.Clear":
- if arg-2 is set:
- ClearChat(arg-2, player)
- else:
- ClearChat("none", player)
- else:
- send "&cYou lack permission"
- else:
- send "&cYou lack permission"
- function ClearChat(r: string, exe: player):
- loop 500 times:
- broadcast " "
- loop all players:
- if loop-player has permission "Staff.Logs":
- send "&3[STAFF] &fChat has been cleared by %{_exe}%" to loop-player
- if {_r} is "none":
- broadcast "&cChat has been cleared"
- else:
- broadcast "&cChat has been cleared due to %{_r}%"
- function ToggleChat(r: string, exe: player, s: boolean):
- if {_r} is "none":
- if {_s} is false:
- send "&aSuccessfully toggled chat" to {_exe}
- else:
- send "&aSuccessfully toggled chat - Silently" to {_exe}
- else if {_s} is false:
- send "&aSuccesfully toggled chat - Reason Provided" to {_exe}
- else:
- send "&aSuccesfully toggled chat - Silently - Reason Provided" to {_exe}
- if {Chat::Toggled} is not set:
- set {Chat::Toggled} to true
- if {_s} is false:
- if {_r} is not "none":
- broadcast "&cChat has been muted due to %{_r}%&c!"
- else:
- broadcast "&cChat has been muted!"
- else:
- delete {Chat::Toggled}
- if {_s} is false:
- broadcast "&cChat has been unmuted!"
- loop all players:
- if loop-player has permission "Staff.Logs":
- if {_r} is not "none":
- send "&3[STAFF] &fChat has been toggled by %{_exe}% due to %{_r}%" to loop-player
- else:
- send "&3[STAFF] &fChat has been toggled by %{_exe}%" to loop-player
- on quit:
- delete {Chat::%player's uuid%::Cooldown}
- delete {Chat::%player's uuid%::Repeat}
- delete {Command::%player's uuid%::Cooldown}
- delete {Chat::%player's uuid%::Reply}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement