how to detect item slot?

I need a way to detect when a player is in their eighth hotbar slot (and a method that doesn't store the data of SelectedItem to a scoreboard)
Continue to help post