Jump to content

skript teleport player after 10 seconds


eladtzuman

Recommended Posts

thats gonna be a little hard so iam not expecting people to know how to do this and help anyway, i wanna do a block that if you stand on it 10 seconds it will teleport you to a location i want

but if you leave the block it stop the countdown also if the player stand on it 10 seconds and teleport to the place other players cannot do it until the player that teleported leave the area. (all with skript)

Link to comment
Share on other sites

I did it quickly, but it should work, just put your wolrd in "your world", coordinates in (0, 0, 0) where do you want it to teleport the player and block which one do you want the player to step instead of diamond block. If so, let me know.

on step on diamond block:
    if block under player is diamond block:
        if {wait} is false:
            set {_loc} to location at (0, 0, 0) in world "your world"
            send "Teleport in 10 seconds" to player
            wait 1 second
            if block under player is diamond block:
                send "Teleport in 9 seconds" to player
                wait 1 second
                if block under player is diamond block:
                    send "Teleport in 8 seconds" to player
                    wait 1 second
                    if block under player is diamond block:
                        send "Teleport in 7 seconds" to player
                        wait 1 second
                        if block under player is diamond block:
                            send "Teleport in 6 seconds" to player
                            wait 1 second
                            if block under player is diamond block:
                                send "Teleport in 5 seconds" to player
                                wait 1 second
                                if block under player is diamond block:
                                    send "Teleport in 4 seconds" to player
                                    wait 1 second
                                    if block under player is diamond block:
                                        send "Teleport in 3 seconds" to player
                                        wait 1 second
                                        if block under player is diamond block:
                                            send "Teleport in 2 seconds" to player
                                            wait 1 second
                                            if block under player is diamond block:
                                                send "Teleport in 1 seconds" to player
                                                wait 1 seconds
                                                teleport player to {_loc}
        else:
            send "&cYou cant teleport right now!"

on world change:
    if player's world is "your world":
        set {wait} to true
    if player's world is not "your world":
        set {wait} to false

 

  • Like 1
Link to comment
Share on other sites

on step on diamond block:
	if block under player is diamond block:
		if {wait} is false:
			location of event-block is location(2,60,2)
			set {_loc} to location(0, 0, 0, world "world")
			set {_pl} to player's location
			loop 10 times:
				if {_pl} is player's location:
					wait 1 seconds
					add 1 to {_}
					send title "&a&lTELEPORT" with subtitle "&7Wait %loop-value% seconds%nl%&cDon't move!"
					if {_} is 10:
						teleport player to {_loc}
						send title "&a&lTELEPORT" with subtitle "&7Telported!"
				else:
					stop loop
					send title "&a&lTELEPORT" with subtitle "&cYou moved teleport canceled!"
		else:
			send "&cYou cant teleport right now!"
on world change:
	if player's world is "your world":
		set {wait} to true
	else:
		set {wait} to false

Try this

Edited by devyy
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...