local function v()isfirstperson=false if viewmodel.Parent~=nil then viewmodel.Parent=nil end if rigtype=="\082\049\053"then rightshoulderclone.Enabled=false leftshoulderclone.Enabled=false viewmodel.Parent=nil leftshoulder.Parent=larm leftshoulder.Part0=torso leftshoulder.Part1=larm rightshoulder.Parent=rarm rightshoulder.Part0=torso rightshoulder.Part1=rarm leftshoulder.Enabled=true rightshoulder.Enabled=true armtransparency=0 visiblearms(false)else rightshoulderclone.Enabled=false leftshoulderclone.Enabled=false viewmodel.Parent=nil larm.Anchored=false rarm.Anchored=false leftshoulder.Enabled=true rightshoulder.Enabled=true armtransparency=0 visiblearms(false)end end
-- turn off the viewmodel system
local function disableviewmodel()
	isfirstperson = false
	if viewmodel.Parent ~= nil then
		viewmodel.Parent = nil
	end
	if rigtype == "R15" then
		-- disable viewmodel joints, enable real character joints
		rightshoulderclone.Enabled = false
		leftshoulderclone.Enabled = false
		viewmodel.Parent = nil
		-- reset shoulder joints to normal
		leftshoulder.Parent = larm
		leftshoulder.Part0 = torso
		leftshoulder.Part1 = larm
		rightshoulder.Parent = rarm
		rightshoulder.Part0 = torso
		rightshoulder.Part1 = rarm
		--
		leftshoulder.Enabled = true
		rightshoulder.Enabled = true
		--
		armtransparency = 0
		visiblearms(false)
	else
		rightshoulderclone.Enabled = false
		leftshoulderclone.Enabled = false
		viewmodel.Parent = nil
		-- reset shoulder joints to normal, anchor the arms
		--[[
		leftshoulder.Parent = torso
		leftshoulder.Part0 = torso
		leftshoulder.Part1 = larm
		rightshoulder.Parent = torso
		rightshoulder.Part0 = torso
		rightshoulder.Part1 = rarm]]
		--

		larm.Anchored = false
		rarm.Anchored = false

		leftshoulder.Enabled = true
		rightshoulder.Enabled = true

		--
		armtransparency = 0
		visiblearms(false)
	end
end
