If anybody needs any /spawn skripts i've made one the works pretty well, feel free to use!!
command /setspawn:
permission: op
trigger:
set {spawn} to location of block at location of player
send "Set spawn to where you were standing"
command /spawn:
trigger:
send "&3Teleporting you to spawn in 5 seconds" to player
wait 100 ticks
teleport player to {spawn}