I'm not all that great with speeches but I might start out saying "my dear teammates (I'm not sure if they're your team mates or...?), it's been an honor to have met you all and coached you all during my high school years. This team has been a major part of my life and I'm very glad to have to opportunity to spend my time with everyone." then add in some unforgettable memories maybe? You could also include how they've impacted your life or how they have improved your experience at school for those 4 years? Good luck :)
Start by writing how thankful you are to be on the team, let alone be the captain of a team. Then, go on about how much you have always admired others around you and how much of a family bond you all have with each other. Then, you can just thank them for the memories and for everything they have done for you. Finish by saying how much you love them and you will always remember them!