Make only 1 image visible when last checked image was visible (hard to explain)

Memory leaks are some stuffs in memory those are cleaned up , for example in your script when you click the Button you are creating one more setting.MouseButton1Click:Connect(function() , doing this will create a connect for MouseButton1Click in the memory and each time you click more and more of the Connection will be created and they exist in memory .

For more info : Garbage Collection and Memory Leaks in Roblox - What you should know