Jump to content

Whitelist Skript


itsKimo

Recommended Posts

options:
	prefix: <##00BFFF>&lSERVER NAME &8| <##00BFFF>
	hex: <##00BFFF>
command whitelist [<text>] [<offlineplayer>]:
	permission: whitelist.sk
	permission message: &cInsufficient permissions!
	trigger:
		if arg-1 is not set:
			send "&c/whitelist help" to player
		else if arg-1 is not "help" or "list" or "add" or "remove" or "on" or "off":
			send "&c/whitelist help" to player
		else if arg-1 is "help":
			send "{@prefix}Whitelist Help" to player
			send action bar "{@hex}Loading..." to player
			wait 1 second
			send action bar "" to player
			wait 10 tick
			send action bar "{@hex}Loading..." to player
			wait 10 tick
			send action bar "" to player
			send "{@hex}/whitelist help &7&o(sends you this menu)" to player
			send "{@hex}/whitelist list &7&o(sends you the whitelist)" to player
			send "{@hex}/whitelist add (user) &7&o(add people to the whitelist)" to player
			send "{@hex}/whitelist remove (user) &7&o(remove people from the whitelist)" to player
			send "{@hex}/whitelist on &7&o(turns on the whitelist)" to player
			send "{@hex}/whitelist off &7&o(turns off the whitelist)" to player
		else if arg-1 is "list":
			send "{@prefix}Whitelist&7: %{whitelist::*}%" to player if size of {whitelist::*} is greater than 0
			send "{@prefix}Whitelist&7: Empty" to player if size of {whitelist::*} is not greater than 0
		else if arg-1 is "add":
			if arg-2 is not set:
				send "&c/whitelist help" to player
			else:
				if {whitelist::*} contains "%arg-2%":
					send "&cThis player is already whitelisted!" to player
					stop
				else:
					add arg-2 to {whitelist::*}
					send "&aYou have added %arg-2% &ato the whitelist!" to player
		else if arg-1 is "remove":
			if arg-2 is not set:
				send "&c/whitelist help" to player
			else:
				if {whitelist::*} does not contain "%arg-2%":
					send "&cThis player is not whitelisted!" to player
				else:
					remove arg-2 from {whitelist::*}
					send "&aYou have removed %arg-2% &afrom the whitelist!" to player
		else if arg-1 is "on":
			if {whitelist} is set:
				send "&cThe whitelist is already on!" to player
				stop
			else:
				set {whitelist} to true
				send "&aThe whitelist has been turned on!" to all players
		else if arg-1 is "off":
			if {whitelist} is not set:
				send "&cThe whitelist is already off!" to player
				stop
			else:
				delete {whitelist}
				send "&aThe whitelist has been turned off!" to all players
join:
	{whitelist} is set:
		{whitelist::*} does not contain "%player%":
			kick player due to "&cThe server is currently whitelisted!"
			stop
		else:
			player has played before:
				player has permission "staff.sk":
					set join message to "&a+ &8| &a%player% &7(&2STAFF&7)"
				else:
					set join message to "&a+ &8| &a%player%"
			else:
				set join message to "{@hex}&l+ &8| {@hex}%player% &7({@hex}##%number of all offline players%"
	else:
		player has played before:
			player has permission "staff.sk":
				set join message to "&a+ &8| &a%player% &7(&2STAFF&7)"
			else:
				set join message to "&a+ &8| &a%player%"
		else:
			set join message to "{@hex}&l+ &8| {@hex}%player% &7({@hex}##%number of all offline players%"
quit:
	if {whitelist} is set:
		set quit message to ""
	else:
		player has permission "staff.sk":
			set quit message to "&c- &8| &c%player% &7(&2STAFF&7)"
		else:
			set quit message to "&c- &8| &c%player%"
			
			
			

heres a cool whitelist skript i made, idk I got bored and made it for my server, just give me credit if u use it, dont reply saying this sucks i dont care. have a nice day

Link to comment
Share on other sites

I am not saying it sucks or anything but I'm saying that it's unnecessary? Vanilla has a built in /whitelist command. Why bother making another?

 

Owner of play.hiveminez.net

 

⊱------------------------------⊰

Joined Minehut on 1/28/2021 (Same day I got Minecraft)

[VIP] - 3/14/2021

[LEGEND] - 5/27/2021

⊱------------------------------⊰

Discord - NotKaizo#0001

In-game name - iKaizo_

If you need any help, feel free to contact me.

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...