You have many way to do it, for example without an Inventory Script, you could just do something like:

-Player who has weapon say /equip weapon
-Then you replace replace basics gani with replaceani("idle","yourweapon-idle")
-And if you say /remove gun you could replace again the gani

Giving you a small script for it:
PHP Code:
#//CLIENTSIDE
function onPlayerChats(){
  if(
player.chat == "/equip yourweaponname"){
     
replaceani("idle", "yourweaponname-idle"); 
     
replaceani("walk", "yourweaponname-walk"); 
     
replaceani("sword", "yourweaponname-sword"); 
  }
  if(
player.chat == "/remove yourweaponname"){
     
replaceani("idle", "idle"); 
     
replaceani("walk", "walk"); 
     
replaceani("sword", "sword"); 
  }
}