Jump to content

Request on Skript


WaterBreatheZs

Recommended Posts

on load:
	set {item} to stick named "Waypoint"

on right click holding {item}:
	set {waypoint} to player's location		# (if this doesnt work, you could replace location with coordinates)
	wait 1 second

	teleport player to {waypoint}
	loop players within 5 meters of the player:
		teleport loop-player to {waypoint}

I would suggest adding a cooldown to the feature, since it could be spammed like in milliseconds.

 

With cooldown:

on load:
	set {item} to stick named "Waypoint"
	set {cooldown.%player%} to false

on right click holding {item}:
	if {cooldown.%player%} is true:
		send "You are on cooldown!" to player
		stop

	if {cooldown.%player%} is false:
		set {cooldown.%player%} to true
		set {waypoint} to player's location		# (if this doesnt work, you could replace location with coordinates)
		wait 1 second

		teleport player to {waypoint}
		loop players within 5 meters of the player:
			teleport loop-player to {waypoint}
		set {cooldown.%player%} to false
		stop

^ You could also add that on join the player's cooldown is reset, in the case they leave the server while on cooldown. (I think that affects it, but im noit sure)

Link to comment
Share on other sites

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...