input.InputChanged:connect(function(Z)if Z.UserInputType==Enum.UserInputType.MouseMovement then local w=Vector2.new(Z.Delta.x/Sensitivity,Z.Delta.y/Sensitivity)*Smoothness local z=TargetAngleX-w.y TargetAngleX=z>=80 and 80 or z<=-80 and-80 or z TargetAngleY=(TargetAngleY-w.x)%360 end end)input.InputBegan:connect(function(Z)if Z.UserInputType==Enum.UserInputType.Keyboard then if Z.KeyCode==CanToggleMouse.activationkey then if CanToggleMouse.allowed and freemouse==false then freemouse=true else freemouse=false end end end end)
---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----

input.InputChanged:connect(function(inputObject)
	if inputObject.UserInputType == Enum.UserInputType.MouseMovement then
		local delta = Vector2.new(inputObject.Delta.x / Sensitivity, inputObject.Delta.y / Sensitivity) * Smoothness

		local X = TargetAngleX - delta.y
		TargetAngleX = (X >= 80 and 80) or (X <= -80 and -80) or X
		TargetAngleY = (TargetAngleY - delta.x) % 360
	end
end)

input.InputBegan:connect(function(inputObject)
	if inputObject.UserInputType == Enum.UserInputType.Keyboard then
		if inputObject.KeyCode == CanToggleMouse.activationkey then
			if CanToggleMouse.allowed and freemouse == false then
				freemouse = true
			else
				freemouse = false
			end
		end
	end
end)
