Question: How do I make it so when a player right clicks the sword and teleports, that if there is a block in front of them, it will teleport them 1 block away from the block?
Code:
Code:
code_language.skript:
on rightclick with diamond sword:
name of player's tool is "&eEnderman Sword":
set {_Waited} to difference between {Teleport::%player%} and now
if {_Waited} is less than 20 seconds:
stop
else:
set {AbilityInUse} to "True"
send "&cAbility &8&l» &7You have activated your &aTeleport &7ability" to player
set {Teleport::%player%} to now
set {_Block} to block 4 in front of player
play "ENDERMAN_TELEPORT" to player at volume 1
teleport player above {_Block}