make a turret that has a gun part clamped separately from the base
check every second or so who has the flag of turrets team
if someone has the flag you check if that person is from opposing team
if they are, you do a raycast from turret to that person
if that raycast hits said person you rotate the gun to [(targets position + (targets velocity * (distance between turret and taget / speed of projectile))) - turret position]
when it looks at that target (use "vector3 dot" between direction where turret should look and current direction of turret, and see if it's bigger than around 0.8-0.9) you shoot the projectile launcher thats clamped to the gun
before you ask, no i wont do allat in recroom to show you a screenshot