Solved Help with counting handheld items

  • 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!

Status
Not open for further replies.

Plav

Member
Dec 18, 2022
14
1
3
26
so I created a skript for a button that would "clean" a brick. But here is the problem, if you are holding multiple bricks, it will only give back 1 iron ingot, is there a way to make it give back the same amount of iron ingots as the amount of bricks you were holding? can you please send me an edited version of this skript that will do that
Code:
on rightclick on a stone button with brick:
    if name of tool of player is "&cRusty Scrap Metal":
        send "&aCleaning The Rust" to player
        send "&bWait 5 Seconds Before It Is Clean!" to player
        remove player's held item from player's inventory
        wait 5 seconds
        give player 1 iron ingot named "&7Scrap Metal"
[doublepost=1671831803,1671737558][/doublepost]can someone reply?
 
Code:
on rightclick on a stone button with brick:
    if name of player's held item is "&cRusty Scrap Metal":
        send "&aCleaning The Rust" to player
        send "&bWait 5 Seconds Before It Is Clean!" to player
        set {_count} to amount of player's held item in player's inventory
        remove player's held item from player's inventory
        wait 5 seconds
        give {_count} of iron ingot named "&7Scrap Metal" to player
:emoji_wink:
 
Status
Not open for further replies.