Im making a gun like the one from hypixel zombies but it only says "hi" in chat when i left click and the ammo is low:
Code:
on left click:
if the player is holding {pistolchamber.%player%} of {pistol}:
send "hi"
set {_dura} to the durability of the player's tool
set {tool} to the player's tool
set {_d} to 90% of {_dura}
remove {_d} from durability of {tool}
wait 2 ticks
set {_d} to 80% of {_dura}
remove {_d} from durability of {tool}
wait 2 ticks
set {_d} to 70% of {_dura}
remove {_d} from durability of {tool}
wait 2 ticks
set {_d} to 60% of {_dura}
remove {_d} from durability of {tool}
wait 2 ticks
set {_d} to 50% of {_dura}
remove {_d} from durability of {tool}
wait 2 ticks
set {_d} to 40% of {_dura}
remove {_d} from durability of {tool}
wait 2 ticks
set {_d} to 30% of {_dura}
remove {_d} from durability of {tool}
wait 2 ticks
set {_d} to 20% of {_dura}
remove {_d} from durability of {tool}
wait 2 ticks
set {_d} to 10% of {_dura}
remove {_d} from durability of {tool}
wait 2 ticks
set {_d} to 0% of {_dura}
remove {_d} from durability of {tool}
wait 2 ticks
set {pistolchamber.%player%} to 10
set {tool} to 10 wooden hoes named "&6Pistol" with lore "&7This is your starter gun. You're" and "&7gonna want to upgrade this at" and "&7some point."