Returns the player's active weapon.
The weapon the player is currently has equipped.
Prints the player's active weapon's class name.
print(Entity( 1 ):GetActiveWeapon():GetClass())
Output: The active weapon's class. For example, if you are holding the tool gun then this will be "gmod_tool".