Hello! I would like to use an egg to switch player's locations when they right click on a player. If they don't right click on a certain player when right clicking, it doesn't remove the egg from the inventory and doesn't execute any commands. Can you help me out here?
My code right now:
on right click with a egg:
name of player's tool is "&6&lSwitch"
{swap.cooldown::%player%} isn't true
set {swap.cooldown::%player%} to true
shoot a egg from player
wait 16 seconds
set {swap.cooldown::%player%} to false
on damage:
projectile exists
projectile is a egg
name of attacker's tool is "&6&lSwitch"
set {_this} to victim's location
set {_that} to attacker's location
teleport victim to {_that}
teleport attacker to {_this}
My code right now:
on right click with a egg:
name of player's tool is "&6&lSwitch"
{swap.cooldown::%player%} isn't true
set {swap.cooldown::%player%} to true
shoot a egg from player
wait 16 seconds
set {swap.cooldown::%player%} to false
on damage:
projectile exists
projectile is a egg
name of attacker's tool is "&6&lSwitch"
set {_this} to victim's location
set {_that} to attacker's location
teleport victim to {_that}
teleport attacker to {_this}