Get active gmod_tool with certain tool

I have a small project that I am working on and was wondering if anyone knows how to make it so when I make a console command it will not only pull out my

tool gun but it will pull out the tool gun and select the remove selection or the button selection etc. any help would be nice I have the code and it pulls out my

tool gun but I have to preselect what function I want it to preform.

if LocalPlayer():GetActiveWeapon():GetClass() != “gmod_tool” then
local lastwep = LocalPlayer():GetActiveWeapon()

But how can I make it pull out the button function or remove function?

I have no idea what you mean. Button/remove function?

dam okay sorry its hard to explain like I want to be able to pull out the toolgun with the button tool with one command and then with another command I would like to be able to pull out the tool gun with the remove tool. Does that make anymore sense?

He wants to pull out the toolgun, and then select the mode, as in, use the weld part of it, or use the ball socket, or use the rope.

gmod_tool toolname? ( Console command )
If you want to run it from lua, do something like RunConsoleCommand(“gmod_tool”,“remover”)

Awesome Let me give it a try,

that actually worked perfectly I think I might have over thought that one lol thank you for the help.