Can someone make it so this dash skript dashes the player based on the name of the tool their using instead of the item?
on rightclick with a gold hoe:
Dash(player)
function Dash(p: player):
set {_u} to {_p}'s uuid
if {dash.last::%{_u}%} is set:
set {_wait} to difference between {dash.last::%{_u}%} and now
else:
set {_wait} to {@Cooldown}
if {_wait} >= {@Cooldown}:
set {dash.last::%{_u}%} to now
if {_p} is on ground:
push {_p} forwards at speed {@Speed}
else:
push {_p} forwards at speed {@Speed} / 2
else:
send action bar "&cCD: %difference between {_wait} and {@Cooldown}% left" to {_p}
on rightclick with a gold hoe:
Dash(player)
function Dash(p: player):
set {_u} to {_p}'s uuid
if {dash.last::%{_u}%} is set:
set {_wait} to difference between {dash.last::%{_u}%} and now
else:
set {_wait} to {@Cooldown}
if {_wait} >= {@Cooldown}:
set {dash.last::%{_u}%} to now
if {_p} is on ground:
push {_p} forwards at speed {@Speed}
else:
push {_p} forwards at speed {@Speed} / 2
else:
send action bar "&cCD: %difference between {_wait} and {@Cooldown}% left" to {_p}