You can embed in your script a uuencoded tar file and unpack it like this:
tar xf - <<EOF
The uuencoded tarball
EOF
You can encode the data this way:
$ tar cf - src_tree | compress | uuencode src_tree.tar.Z >your_here_doc
then paste the file your_here_doc
where 'The uuencoded tarball'
line is now, something like this:
$ (echo tar cf - '<<EOF'; cat your_here_doc; echo EOF) >self_expanding_files.sh