Can someone tell me wtf just happened....

Janessa • First time mom☺️ Due Nov 4th with a baby girl 💕
I'm 38w2d (due in 12 days). I went to the bathroom to have a pee, totally normal. I got changed and me and my bf went for a walk down the road to our buddies place, about half way there I felt something leak out of me.. I've been having green/yellow discharge pour out of me lately.. Doctor told me at my last appointment that was normal. Anyways, I walked back home and wipped, it was part of my muscas plug (bloody show) then I can hear stuff leak into the toilet as if I was peeing but I didn't... It wasn't a whole lot but was that my water breaking?? Ftm here..