# How to get a hammer weapon that when you press a swings and you have to buy it

**URL:** <https://forum.makecode.com/t/how-to-get-a-hammer-weapon-that-when-you-press-a-swings-and-you-have-to-buy-it/20629>\
**Category:** Help\
**Created:** [June 15, 2023, 3:35pm UTC](https://forum.makecode.com/t/how-to-get-a-hammer-weapon-that-when-you-press-a-swings-and-you-have-to-buy-it/20629 "2023-06-15T15:35:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Piseth](https://avatars.discourse-cdn.com/v4/letter/p/ac91a4/32.png) [@Piseth](https://forum.makecode.com/u/Piseth)\
**Post date:** [June 15, 2023, 3:35pm UTC](https://forum.makecode.com/t/how-to-get-a-hammer-weapon-that-when-you-press-a-swings-and-you-have-to-buy-it/20629/1 "2023-06-15T15:35:32Z")

</div>

so when i try to make the projectile that i already have that shoots and adding a hammer lags the game so pls help me

---

<div class="post-metadata">

**Author:** ![Piseth](https://avatars.discourse-cdn.com/v4/letter/p/ac91a4/32.png) [@Piseth](https://forum.makecode.com/u/Piseth)\
**Post date:** [June 16, 2023, 4:15pm UTC](https://forum.makecode.com/t/how-to-get-a-hammer-weapon-that-when-you-press-a-swings-and-you-have-to-buy-it/20629/2 "2023-06-16T16:15:05Z")

</div>

why nobody responded?  
me lonely but also need tha code

---

<div class="post-metadata">

**Author:** ![YuHayate](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yuhayate/32/8275_2.png) [@YuHayate](https://forum.makecode.com/u/YuHayate)\
**Post date:** [June 16, 2023, 9:03pm UTC](https://forum.makecode.com/t/how-to-get-a-hammer-weapon-that-when-you-press-a-swings-and-you-have-to-buy-it/20629/3 "2023-06-16T21:03:25Z")

</div>

i don’t know what you mean

---

<div class="post-metadata">

**Author:** ![ChimbroDaPro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/chimbrodapro/32/15852_2.png) [@ChimbroDaPro](https://forum.makecode.com/u/ChimbroDaPro)\
**Post date:** [June 19, 2023, 5:48pm UTC](https://forum.makecode.com/t/how-to-get-a-hammer-weapon-that-when-you-press-a-swings-and-you-have-to-buy-it/20629/4 "2023-06-19T17:48:33Z")

</div>

Same.

---

<div class="post-metadata">

**Author:** ![YuHayate](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yuhayate/32/8275_2.png) [@YuHayate](https://forum.makecode.com/u/YuHayate)\
**Post date:** [June 28, 2023, 5:23pm UTC](https://forum.makecode.com/t/how-to-get-a-hammer-weapon-that-when-you-press-a-swings-and-you-have-to-buy-it/20629/5 "2023-06-28T17:23:30Z")

</div>

do you mean “How to get a weapon to attack on **A** button press, And a way to purchase That weapon”?

---

<div class="post-metadata">

**Author:** ![Piseth](https://avatars.discourse-cdn.com/v4/letter/p/ac91a4/32.png) [@Piseth](https://forum.makecode.com/u/Piseth)\
**Post date:** [July 3, 2023, 5:13pm UTC](https://forum.makecode.com/t/how-to-get-a-hammer-weapon-that-when-you-press-a-swings-and-you-have-to-buy-it/20629/6 "2023-07-03T17:13:49Z")

</div>

yes that is correct
