ref script