How to make a block that gives you a tool

I just found this. @True_Snowi perhaps this can help you. It’s not marked as solved as of writing but I bet the replies already existing can help you.