Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-----------------------------#
- # Anti-Adv.sk #
- # Code by mathhulk #
- # Upload by BrettPlayMC #
- #-----------------------------#
- options:
- # Use \nl to specify a new line.
- prefix: &c[ANTI-ADV] &7#This is the Skript prefix#
- adminperm: anti-adv.admin #This is the permission for all admin commands/args.#
- adminmsg: Possible advertising from &4%player%&c &8(&4%player's world%&8) &8: &c%{_msg}% #This is the message sent to staff if a player is caught advertising.#
- warnmsg: &4Advertising &7is not allowed. #This is the message sent to the player if they advertise.#
- cmd: anti-adv #This is the main Skript command.#
- cmdperm: anti-adv.check #This is the main command permission#
- cmdaliases: /antiadv, /aa, /antiad #This is the list of main command aliases that you can edit.#
- permmsg: &cYou cannot use that. #This is the message sent to people if they don't have permission.#
- argnotset: Please specify an &4argument&7. #This is sent if an argument in a command is NOT set.#
- checkmsg: &8&m----------------------&f \nl &4Warnings &8: &c%arg 2% \nl &4Amount &8: &c%{advertisement.warnings::%uuid of arg 2%}% \nl &4UUID &8: &c%uuid of arg 2% \nl &8&m----------------------&f #This is the message sent for checking.#
- resetmsg: The warning amount of &4%arg 2% &7have been reset. #This is sent when someone's warnings are reset.#
- resetallmsg: The warning amounts of &4all players &7have been reset. #This is sent if ALL player's warnings have been reset.#
- fillmessage: I love this server! #This is the message that the advertisement is replaced with in chat.#
- wordadded: &4%arg 2% &7has been added to the list of blocked words. #This is sent when a domain has been successfully added to the list of blocked domains in game.#
- # helpmessage: &8&m----------------------&f %nl% &4Check &8: &c/{@cmd} check [player] \nl &4Reset &8: &c/{@cmd} [resetall|reset] [player] \nl &4Add Words &8: &c/anti-adv add [word] \nl &8&m----------------------&f ##This is the help message.#
- helpmessage: &8&m----------------------&f \nl &4Check &8: &c/{@cmd} check [player]
- notfound: &4%arg 1% &7is not a command. #This is sent if someone enters an invalid argument.#
- #---------------------------#
- # NOTICE! #
- # ^^^^ ^^^^ #
- # IF YOU DO NOT KNOW WHAT #
- # YOU ARE DOING THEN DO NOT #
- # EDIT THE SKRIPT BEYOND #
- # THIS POINT! #
- #---------------------------#
- on join:
- if {advertisement.warnings::%uuid of player%} is not set:
- set {advertisement.warnings::%uuid of player%} to 0
- on chat:
- if message contains "%{blocked.words::*}%":
- set {_msg} to the message
- set message to "{@fillmessage}"
- add 1 to {advertisement.warnings::%uuid of player%}
- loop all players:
- if loop-player has permission "{@adminperm}":
- send "{@prefix}{@adminmsg}" to loop-player
- stop
- send "{@prefix}{@warnmsg}"
- command /{@cmd} [<text>] [<offlineplayer>]:
- permission: {@cmdperm}
- permission message: {@permmsg}
- aliases: {@cmdaliases}
- trigger:
- if arg 1 is not set:
- send "{@helpmessage}"
- else:
- if arg 1 is set:
- if arg 1 is "check":
- if arg 2 is not set:
- send "{@prefix}{@argnotset}"
- else:
- send "{@checkmsg}"
- if arg 1 is "reset":
- if player has permission "{@adminperm}":
- if arg 2 is not set:
- send "{@prefix}{@argnotset}"
- if arg 2 is set:
- set {advertisement.warnings::%uuid of arg 2%} to 0
- send "{@prefix}{@resetmsg}"
- else:
- send "{@permmsg}"
- if arg 1 is "resetall":
- if player has permission "{@adminperm}":
- set {advertisement.warnings::*} to 0
- send "{@prefix}{@resetallmsg}"
- else:
- send "{@permmsg}"
- if arg 1 is "add":
- if player has permission "{@adminperm}":
- if arg 2 is not set:
- send "{@prefix}{@argnotset}"
- if arg 2 is set:
- add arg 2 to {blocked.words::*}
- send "{@prefix}{@wordadded}"
- else:
- send "{@permmsg}"
- else if arg 1 is not "add" or "resetall" or "reset" or "check":
- send "{@prefix}{@notfound}"
- on load:
- set {version} to "2.5"
- message "&c[ANTI-ADV] &7Successfully loaded &4Anti Advertisement V2 &8v&a%{version}%&7." to console
- set {antiadv2::running} to true
- if {antiask::running} is not set:
- message "&c[ANTI-ADV] &7We couldn't find &4AntiAsk&7!" to console
- message "&c[ANTI-ADV] &7Make sure to download it on Spigot or by going here: &7&ohttps://www.spigotmc.org/resources/anti-ask-anti-ad-v1-hook-skript.32955/" to console
- on unload:
- message "&c[ANTI-ADV] &7Successfully unloaded &fAnti Advertisement V2 &8v&a%{version}%&7. Goodbye!" to console
- delete {antiadv2::running}
Advertisement
Add Comment
Please, Sign In to add comment