View difference between Paste ID: wp8rf7py and s8HfZ8Gu
SHOW: | | - or go back to the newest paste.
1
command /setspawn:
2
	permission: setspawn
3
	trigger:
4
		set {spawn} to location of player
5
		send "Spawn zostal ustawiony!"
6
command /spawn:
7
	trigger:
8
		if {spawn} is set:
9-
		set {_pos} to location of player
9+
			set {_pos} to location of player
10-
		add 5 to {time.%player%}
10+
			add 5 to {time.%player%}
11-
		loop 5 times:
11+
			loop 5 times:
12-
			wait 1 real second
12+
				wait 1 real second
13-
			if {_pos} isn't location of player:
13+
				if {_pos} isn't location of player:
14-
				send "Poruszyles sie, teleportacja anulowana!"
14+
					send "Poruszyles sie, teleportacja anulowana!"
15-
				stop trigger
15+
					stop trigger
16-
			remove 1 from {time.%player%}
16+
				remove 1 from {time.%player%}
17-
			if {time.%player%} is 0:
17+
				if {time.%player%} is 0:
18-
				teleport player to {spawn}
18+
					teleport player to {spawn}
19-
				send "Przeteleportowano na spawn!"
19+
					send "Przeteleportowano na spawn!"
20
on first join:
21
	if {spawn} is set:
22
		teleport player to {spawn}
23
on respawn:
24
	if {spawn} is set:
25
		teleport player to {spawn}