PS1 ammo before and after death

Hey there. Sorry for giving the confusing title but heres what I’m struggling with. Before I paste the code, what I’m trying to do is have a weapon which you can buy on the PS1 store and when you do, itll equip you with said weapon. You can holster and equip it like normal and so on. But the issue im having is that because I’m going to have the weapon and ammo both seperate and both will have to be purchased, my weapon resets its ammo value back to what it was brought for. So heres my code for my weapon:


ITEM.Name = 'Milkor MK1'
ITEM.Price = 1000
ITEM.Material = 'vgui/entities/m9k_milkormgl.vmt'
ITEM.WeaponClass = 'm9k_milkormgl'
ITEM.SingleUse = false

 function ITEM:PlayerSpawn(ply, modifications)  
	ply:Give(self.WeaponClass)
 end

function ITEM:OnEquip(ply)
	ply:Give(self.WeaponClass)
	ply:SelectWeapon(self.WeaponClass)
end

function ITEM:OnHolster(ply, modifications)
	ply:StripWeapon(self.WeaponClass)
end

function ITEM:OnSell(ply)
	ply:StripWeapon(self.WeaponClass)
end


ITEM.SubCategory = "M9K" 

So what I mean is that weapon is set to give you 6 rounds and thats it. Ive edited its core/base lua file from the addon pack to give you 6 rounds when you spawn it.
Now the issue is whenever you die and youve used lets say 3 rounds, when you spawn, it gives you the full clip back as if youve just brought it instead of the remaining 3 rounds you had.

I need this to not do that but I think I need to play around with the playerspawn function a bit but I cant find anything suitable enough to lookup the players ammo before they die and carrying it over to after they spawn. Im still learning lua so could someone help me out? Thanks