I want to find out and/or set the number that a tool is assigned to in inventory.
For example, the first tool is put in slot 1 (with hotkey 1), etc up to slot 10 (with hotkey zero), and the rest goes into the extended backpack with positions 11+.
Dropping a tool does not move other tools into a lower slot, so gaps emerge, where newly aquired tools are then put in. After a while it becomes a mess, and I want to know for a newly aquired tool in which inventory slot it was assigned.
I am assuming this is a local property. Can it be accessed anywhere? Through the official api or by accessing the core gui?
It wont work to keep a mirror inventory that applies the same add/remove rules in order to know, because if players move their tools to a different slot this would not be detected.
Any pro scripter who can give me any info or leads on this? Thanks a lot!!!

3 comments
With "Unequipping a tool", do you mean dropping it? Because normally, when unequipping a tool, it doesn't create a gap, it just stays in your hotbar.
Ah thanks, I indeed meant dropping, not unequipping, thanks! I edited it
If you make a new backpack system by first disabling the default backpack you can use a list and manipulate the positions that way