Welcome to SkriptTools.net!

SkriptTools is now part of the skUnity family! skUnity will keep SkriptTools running, updating and adding new features.


- You can now search scripts by author by doing "author:name". For example: "author:nfell2009"

- Login to SkriptTools using your skUnity account to save your favourite scripts and come back to them

Login

Script Viewer

View the code of the script directly in your browser without downloading anything.

Current File: MooseHome.sk - Download / View on the skUnity Parser

# JellyMoose's less simple but very functional multi-home system
#
# Refer to the skUnity post for information regarding usage and permissions.
# Addons required: json.sk
# Also, please don't steal this skript without telling me. If you're going to use it on a public server message me and I may be able to help out even more ;)
# If it's on a private server it's all good!
# Enjoy!

command /sethome [<text>]:
	trigger:
		if arg 1 is set:
			if {homename::%uuid of player%::*} contains "%arg 1%":
				message "&bHome // &fYou already have a home of that name"

			else:
				if player have permission "moosehome.staff":
					add arg 1 to {homename::%uuid of player%::*}
					add location of player to {homes::%uuid of player%::*}
					message "&bHome // &fSuccessfully set &3/home %arg 1% &fat your current location"

				else if player have permission "moosehome.donor4":
					if amount of {homes::%uuid of player%::*} < 100:
						add arg 1 to {homename::%uuid of player%::*}
						add location of player to {homes::%uuid of player%::*}
						message "&bHome // &fSuccessfully set &3/home %arg 1% &fat your current location"

					else if amount of {homes::%uuid of player%::*} = 100:
						message "&bHome // &fSorry you have reach the maximum amount of homes, use &3/delhome &ffor some room"
				else if player have permission "moosehome.donor3":
					if amount of {homes::%uuid of player%::*} < 50:
						add arg 1 to {homename::%uuid of player%::*}
						add location of player to {homes::%uuid of player%::*}
						message "&bHome // &fSuccessfully set &3/home %arg 1% &fat your current location"

					else if amount of {homes::%uuid of player%::*} = 50:
						message "&bHome // &fSorry you have reach the maximum amount of homes, use &3/upgrade &fto get more"

				else if player have permission "moosehome.donor2":
					if amount of {homes::%uuid of player%::*} < 25:
						add arg 1 to {homename::%uuid of player%::*}
						add location of player to {homes::%uuid of player%::*}
						message "&bHome // &fSuccessfully set &3/home %arg 1% &fat your current location"

					else if amount of {homes::%uuid of player%::*} = 25:
						message "&bHome // &fSorry you have reach the maximum amount of homes, use &3/upgrade &fto get more"

				else if player have permission "moosehome.donor1":
					if amount of {homes::%uuid of player%::*} < 10:
						add arg 1 to {homename::%uuid of player%::*}
						add location of player to {homes::%uuid of player%::*}
						message "&bHome // &fSuccessfully set &3/home %arg 1% &fat your current location"

					else if amount of {homes::%uuid of player%::*} = 10:
						message "&bHome // &fSorry you have reach the maximum amount of homes, use &3/upgrade &fto get more"

				else if player have permission "moosehome.member":
					if amount of {homes::%uuid of player%::*} < 5:
						add arg 1 to {homename::%uuid of player%::*}
						add location of player to {homes::%uuid of player%::*}
						message "&bHome // &fSuccessfully set &3/home %arg 1% &fat your current location"

					else if amount of {homes::%uuid of player%::*} = 5:
						message "&bHome // &fSorry you have reach the maximum amount of homes, use &3/upgrade &fto get more"

				else if player have permission "moosehome.guest":
					if amount of {homes::%uuid of player%::*} < 2:
						add arg 1 to {homename::%uuid of player%::*}
						add location of player to {homes::%uuid of player%::*}
						message "&bHome // &fSuccessfully set &3/home %arg 1% &fat your current location"

					else if amount of {homes::%uuid of player%::*} = 2:
						message "&bHome // &fSorry you have reach the maximum amount of homes, use &3/upgrade &fto get more"



		else if arg 1 is not set:
			message "&bHome // &fCorrect usage: &3/sethome [homename]"

command /home [<text>]:
	trigger:
		if arg 1 is set:
			if arg 1 is "list" or "view":
				if {homename::%uuid of player%::*} is not empty:
					loop {homename::%uuid of player%::*}:
						json("%player%", "&7[&3%loop-index%&7] &8- &b%loop-variable% &8- &7%{homes::%uuid of player%::%loop-index%}%||ttp:&fClick to go to this home.||cmd:/home %loop-variable%")
					stop
				else:
					message "&bHome // &fYou don't have any homes, use &3/sethome"
					stop

			else:
				if {homename::%uuid of player%::*} doesn't contain "%arg 1%":
					message "&bHome // &fYou don't have a home of that name"
				else:
					loop {homename::%uuid of player%::*}:
						if {homename::%uuid of player%::%loop-index%} is "%arg 1%":
							message "&bHome // &fArrived at &3/home %arg 1%"
							teleport player to {homes::%uuid of player%::%loop-index%}
							stop

		else if arg 1 is not set:
			message "&8------&b Home // &fCorrect usage: &8------"
			message "  "
			message "&8 >  &3/home [homename] &7- Teleports you to chosen home"
			message "&8 >  &3/home list &7- Lists all your set homes"
			message "&8 >  &3/sethome [homename] &7- Sets a new home"
			message "&8 >  &3/delhome [homename] &7- Deletes an old home"
			message "  "
			message "&8---------------------------------"

command /delhome [<text>]:
	trigger:
		if arg 1 is set:
			if {homename::%uuid of player%::*} doesn't contain "%arg 1%":
				message "&bHome // &fYou don't have a home of that name"
			else:
				loop {homename::%uuid of player%::*}:
					if {homename::%uuid of player%::%loop-index%} is "%arg 1%":
						remove {homename::%uuid of player%::%loop-index%} from {homename::%uuid of player%::*}
						remove {homes::%uuid of player%::%loop-index%} from {homes::%uuid of player%::*}
						message "&bHome // &fSuccessfully deleted &3/home %arg 1%"
						stop

		else if arg 1 is not set:
			message "&bHome // &Correct usage: &3/delhome [homename]"