Jump to content

Prefix skript V2


Cerial_Killer

Recommended Posts

Here is a skript I made 1 year ago!
BUT I have been improved at skripting since then and now it is way more functional!

It is very simple; doesn't require any addons

The file is below:

And here is the code here:

# Prefix Skript
# Version 2.0
# Made by Cerial_Killer (or xCerialPvP_ but cant change name >:[)
# Has some fixes, hope you will enjoy :)

options:
	prefix: &8[&3Pre&bfix&8]
	defaultPrefix: "&7[Default]" # The default prefix, obv.

variables:
	{prefix::%player%} = "&7[Default]"

on load:
	loop all players:
		if {prefix::%loop-player's uuid%} is not set:
			set {prefix::%loop-player's uuid%} to {@defaultPrefix}

command /prefix [<text>] [<text>]:
	#permission: prefix.use #If you want to have a permission node remove the #
	#permission message: &cSorry, but you do not have permission to execute this command.
	usage: &ePlease do &6/prefix help &efor commands.
	trigger:
		if arg 1 is "help":
			send "{@prefix} &eCommands:"
			send "&8&m                              "
			send "&3- &b/prefix help &7| &fDisplays this message."
			send "&3- &b/prefix set <prefix> &7| &fSets your prefix."
			send "&3- &b/prefix reset &7| &fResets your prefix."
			send "&8&m                              "

		if arg 1 is "set":
			if arg 2 is set:
				if arg 2 contains "&k":
					send "{@prefix} &cYour prefix cannot have scribbles in it."
					stop

				else:
					set {prefix::%player's uuid%} to colored arg 2
					send "{@prefix} &aYour prefix is now &3%colored arg 2%&a."
					stop

			else:
				send "{@prefix} &cPlease set a prefix."
				stop

		if arg 1 is "reset":
			set {prefix::%player's uuid%} to {@defaultPrefix}
			send "{@prefix} &aYour prefix has been reset."
			stop

on chat:
	set the chat format to "%{prefix::%player's uuid%}% %player's display name%&7: &f%message%"

 

prefix.sk

  • Like 1
Link to comment
Share on other sites

I would also recommend adding this to your Skript so when a player joins, it sets a prefix so when a new player joins, you don't have to reload the skript.

on load:
	if {prefix::%loop-player's uuid%} is not set:
		set {prefix::%loop-player's uuid%} to {@defaultPrefix}

 

Hello, I'm Nolan!


Cool Links

Vote Please - bit.ly/3tMXajE

MC Server - bit.ly/3hqYAOy


Please leave a like if I helped!


 

 

Link to comment
Share on other sites

22 hours ago, ChunkerDunkers said:

I would also recommend adding this to your Skript so when a player joins, it sets a prefix so when a new player joins, you don't have to reload the skript.


on load:
	if {prefix::%loop-player's uuid%} is not set:
		set {prefix::%loop-player's uuid%} to {@defaultPrefix}

 

i already have that?

Link to comment
Share on other sites

  • 11 months 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...