Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # Skript created by: Voy7 (Spigot: Voy_)
- #
- # Edit all settings in the "AutoBroadcast" folder that is in your plugins folder.
- #
- # Please do not edit any of the skript unless you know what your doing!
- #
- #Code:
- on load:
- if folder "plugins/AutoBroadcast" doesn't exists:
- create folder "plugins/AutoBroadcast"
- if file "plugins/AutoBroadcast/config.yml" doesn't exists:
- create file "plugins/AutoBroadcast/config.yml"
- write "Author_Join_Message" with value "true" to "plugins/AutoBroadcast/config.yml"
- write "Prefix" with value "&b&lAutoBroadcast >> &7" to "plugins/AutoBroadcast/config.yml"
- write "Permission_Node_For_Command" with value "AutoBroadcast.toggle" to "plugins/AutoBroadcast/config.yml"
- write "No_Permission_Message" with value "&cYou do not have permission to do this command!" to "plugins/AutoBroadcast/config.yml"
- write "Broadcasts.Message1" with value "This server is awesome!" to "plugins/AutoBroadcast/config.yml"
- write "Broadcasts.Message2" with value "AutoBroadcast developed by Voy7!" to "plugins/AutoBroadcast/config.yml"
- write "Broadcasts.Message3" with value "Donate to this server!" to "plugins/AutoBroadcast/config.yml"
- write "Broadcasts.Message4" with value "Look at the rules!" to "plugins/AutoBroadcast/config.yml"
- write "Broadcasts.Message5" with value "Respect the staff!" to "plugins/AutoBroadcast/config.yml"
- set {ab.authorjoin} to value "Author_Join_Message" get of "plugins/AutoBroadcast/config.yml"
- set {ab.prefix} to value "Prefix" get of "plugins/AutoBroadcast/config.yml"
- set {ab.permnode} to value "Permission_Node_For_Command" get of "plugins/AutoBroadcast/config.yml"
- set {ab.permmsg} to value "No_Permission_Message" get of "plugins/AutoBroadcast/config.yml"
- set {ab.message1} to value "Broadcasts.Message1" get of "plugins/AutoBroadcast/config.yml"
- set {ab.message2} to value "Broadcasts.Message2" get of "plugins/AutoBroadcast/config.yml"
- set {ab.message3} to value "Broadcasts.Message3" get of "plugins/AutoBroadcast/config.yml"
- set {ab.message4} to value "Broadcasts.Message4" get of "plugins/AutoBroadcast/config.yml"
- set {ab.message5} to value "Broadcasts.Message5" get of "plugins/AutoBroadcast/config.yml"
- set {ab.loop} to "1"
- if {ab.show} is not set:
- set {ab.show} to "true"
- wait 10 ticks
- broadcast "&bAutoBroadcast has been enabled."
- command /autobroadcast [<string>] [<text>]:
- description: Toggle AutoBroadcast messages.
- permission: {ab.permnode}
- permission message: {ab.permmsg}
- aliases: /ab
- trigger:
- if arg 1 is not set:
- send "&bToggle AutoBroadcast: &3/AutoBroadcast ON / OFF" to player
- stop
- if arg 1 is "on":
- set {ab.show} to "true"
- send "&bAutoBroadcast is now &3Enabled&b." to player
- stop
- if arg 1 is "off":
- set {ab.show} to "false"
- send "&bAutoBroadcast is now &3Disabled&b." to player
- stop
- else:
- send "&bToggle AutoBroadcast: &3/AutoBroadcast ON / OFF" to player
- stop
- on join:
- if {ab.authorjoin} is "true":
- wait 1 tick
- send "&bAutoBroadcast developed by &7Voy7&b." to player
- stop
- every 5 minutes:
- if {ab.show} is "true":
- if {ab.loop} is "1":
- broadcast "%{ab.prefix}%%{ab.message1}%"
- set {ab.loop} to "2"
- stop
- if {ab.loop} is "2":
- broadcast "%{ab.prefix}%%{ab.message2}%"
- set {ab.loop} to "3"
- stop
- if {ab.loop} is "3":
- broadcast "%{ab.prefix}%%{ab.message3}%"
- set {ab.loop} to "4"
- stop
- if {ab.loop} is "4":
- broadcast "%{ab.prefix}%%{ab.message4}%"
- set {ab.loop} to "5"
- stop
- if {ab.loop} is "5":
- broadcast "%{ab.prefix}%%{ab.message5}%"
- set {ab.loop} to "1"
- stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement