announce.sk

Created by Hypenexy

Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.

command /announce [<text>]:
	permission: moderator
	permission message: &cYou need to be at least a &4moderator&c to use this command!
	trigger:
		set {_alertmessage} to arg
		replace all "niggah" or "lesbian" or "pussy" or "pussies" or "cancer" in {_alertmessage} with "******"
		replace all "shit" or "damn" or "shit" or "stfu" or "dumb" or "fuck" or "eba" or "thot" or "dick" or "cock" or "cunt" or "homo" or "rape" or "porn" or "tits" or "anal" or "sex" or "fap" or "aids" in {_alertmessage} with "****"
		replace all "idiot" or "bastard" or "bitch" or "nigga" or "nigger" or "penis" in {_alertmessage} with "*****"
		if arg is not set:
			send "&6    (/Midelight/}"
			send "&7 Avaliable arguments:"
			send ""
			send " &7/announce &f<message> -title"
			send " &7/announce &f<message> -s"
			stop
		if arg contains "-s":
			if arg contains "-title":
				send "&cYou cannot include -s and -title! Titles are anonymous by default."
				stop
			if arg contains "-raw":
				send "&cYou cannot include -s, -title and -raw! Titles and raw are anonymous by default."
				stop
			replace all "-s" with "" in {_alertmessage}
			send bungeecord message "&4Announcement!" and "&r%{_alertmessage}%" to the bungeecord channel "announce"
			stop
		if arg contains "-title":
			if arg contains "-raw":
				send "&cYou cannot include -s, -title and -raw! Titles and raw are anonymous by default."
				stop
			send bungeecord message "%{_alertmessage}%" to the bungeecord channel "announcetitle"
			stop
		if arg contains "-raw":
			replace all "-raw" with "" in {_alertmessage}
			send bungeecord message "%{_alertmessage}%" to the bungeecord channel "announce"
			stop
		if arg is set:
			send bungeecord message "&4Announcement by %player%&4!" and "&r%{_alertmessage}%" to the bungeecord channel "announce"

on skungee message from channel "announcetitle":
	set {_alertmessage} to coloured skungee message
	replace all "-title" with "" in {_alertmessage}
	loop all players:
		send title "&4Announcement" with subtitle "&c%{_alertmessage}%" to loop-player for 3 second with fadein 1 second and fade out 1 second
		play "ENTITY_EXPERIENCE_ORB_PICKUP" to loop-player at volume 10
		play "ENTITY_FIREWORK_BLAST" to loop-player at volume 10
		if {_alertmessage} contains "purr" or "prrr" or "prr":
			play "ENTITY_CAT_PURR" to loop-player at volume 7
		if {_alertmessage} contains "creeper" or "creper":
			wait 2 seconds
			play "ENTITY_CREEPER_PRIMED" to loop-player at volume 10
			wait 1.5 second
			play "ENTITY_GENERIC_EXPLODE" to loop-player at volume 10
		
on skungee message from channel "announce":
	loop all players:
		send coloured skungee message to loop-player