I'm trying to make an item duplication script. You use /dupe and it duplicates the item you're holding. I'm not very good at coding, but this is what i have so far:
command /dupe:
trigger:
set {_x} to amount of player's held item in player's inventory
message "%{_x}%"
set {_y} to player's held item
message "%{_y}%"
give %{_x}% %{_y}% to player
command /dupe:
trigger:
set {_x} to amount of player's held item in player's inventory
message "%{_x}%"
set {_y} to player's held item
message "%{_y}%"
give %{_x}% %{_y}% to player