Roblox Interview Question

Asked to explain logic behind OA task 2 factory game