Can someone fix this dash skript?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Yushaa

Active Member
Oct 19, 2023
64
2
8
26
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}