if you have roboport and construction bot,then loot can be pickup by them.
this script trigger every second instead of tick,so it should not bottleneck of anything,
but any optimization can be provided or you can just fork a better version by youself.