Remove item that is used to click on TuSKe GUI item.

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

Gpopcorn

Member
Mar 20, 2021
1
0
1
16
When somebody clicks on an item in a TuSKe GUI I want that item to be deleted and I would like for somebody to point me in the right direction! I want the player to drag an item into an anvil and that item that was dragged into the anvil to vanish while it gives you a new, better item.

My code so far:

Code:
function reforgeRustyHoe(p: player):
    send "yes" to {_p}
    remove wooden hoe named "&7Rusty Hoe" from {_p}'s inventory

on right click on anvil:
    cancel event
    open virtual hopper inventory named "&aReforge Station" to player
    format gui slot 0 and 1 and 3 and 4 of player with dark gray stained glass pane named "&f"

    format gui slot 2 of player with anvil named "&aReforge" with lore "&7Requires 1 Reforge Token" and "&7Drag and drop tools here to reforge them." to run function reforgeRustyHoe(player) with cursor wooden hoe named "&7Rusty Hoe"

This code does perform the function, but it doesn't delete the item I want.

I would be glad if anyone helped!
 
Status
Not open for further replies.