options:
Cooldown: 2 seconds
Speed: 2
on right click with a shield:
if player is holding shield named "&4&litemname":
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 "&citemname: %difference between {_wait} and {@Cooldown}% left" to {_p}
when i try with a shield named "Shield" i can dash for some reason, but i want it to work on only a shield named "&4&litemname"
Question
Oculuz33
options: Cooldown: 2 seconds Speed: 2 on right click with a shield: if player is holding shield named "&4&litemname": 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 "&citemname: %difference between {_wait} and {@Cooldown}% left" to {_p}when i try with a shield named "Shield" i can dash for some reason, but i want it to work on only a shield named "&4&litemname"
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now