How can i set only SpawnRight's location when SpawnRight is selected

I want to set spawnright’s location when is on left is true (SpawnRight selected). There is a way by duplicating the code but i just want to know if i can do it without duplicating.

[this is my code] (Bp - Album on Imgur)

[thats what i want to do and how its done by duplicating the code (works fine)] (Imgur: The magic of the Internet)

I can use it like that. I guess its not that bad because its not too much code that i duplicated but people say duplicating the code is a bad thing (maybe because its confusing to read or lower performance idk the reason) but if thats true and there is a way to do it without duplicating, i want to learn.

I hope you can help, thanks.