Create a ConVar object on the client realm to enable/disable the viewmodel.
local cvarObject =CreateClientConVar("nogun", "1", true, false, "Hide the current viewmodel.") -- Create the ConVar objecthook.Add("HUDPaint", "draw_viewmodel", function()
LocalPlayer():DrawViewModel( cvarObject:GetBool() ) -- Call ConVar:GetBool() inside the parameters of DrawViewModelend)