options:
Cooldown: 3 seconds
Speed: 2
on rightclick with a sword:
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}
I
on rightclick with a sword:
Dash(player)
I want to make this work when I'm wearing the custom boots of itemsadder instead of the sword. Can you give me some example code?
I used a translator so the words might be awkward
Cooldown: 3 seconds
Speed: 2
on rightclick with a sword:
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}
I
on rightclick with a sword:
Dash(player)
I want to make this work when I'm wearing the custom boots of itemsadder instead of the sword. Can you give me some example code?
I used a translator so the words might be awkward