func GenerateReference() string {
	return "RBX" + generateUUID()
}
GenerateReference generates a unique string that can be used as a reference
to an Instance.
package rbxfile
import (
	"crypto/rand"
	"io"
)
type PropRef struct {
	Instance  *Instance
	Property  string
	Reference string
}
type References map[string]*Instance
func (refs References) Resolve(propRef PropRef) bool {
	if refs == nil {
		return false
	}
	if propRef.Instance == nil {
		return false
	}
	referent := refs[propRef.Reference]
	propRef.Instance.Properties[propRef.Property] = ValueReference{
		Instance: referent,
	}
	return referent != nil && !IsEmptyReference(propRef.Reference)
}
func (refs References) Get(instance *Instance) (ref string) {
	if instance == nil {
		return ""
	}
	ref = instance.Reference
	if refs == nil {
		return ref
	}
	if IsEmptyReference(ref) || refs[ref] != nil && refs[ref] != instance {
		for {
			ref = GenerateReference()
			if _, ok := refs[ref]; !ok {
				instance.Reference = ref
				break
			}
		}
	}
	refs[ref] = instance
	return ref
}
func IsEmptyReference(ref string) bool {
	switch ref {
	case "", "null", "nil":
		return true
	default:
		return false
	}
}
func generateUUID() string {
	var buf [32]byte
	if _, err := io.ReadFull(rand.Reader, buf[:16]); err != nil {
		panic(err)
	}
	buf[6] = (buf[6] & 0x0F) | 0x40  
	buf[8] = (buf[8] & 0x3F) | 0x80  
	const hextable = "0123456789ABCDEF"
	for i := len(buf)/2 - 1; i >= 0; i-- {
		buf[i*2+1] = hextable[buf[i]&0x0f]
		buf[i*2] = hextable[buf[i]>>4]
	}
	return string(buf[:])
}