require('__base__/script/freeplay/control.lua')
function playerwon(event)
    if event.player_won then
        helpers.write_file("05-2026.txt","true",false)
    end
end

script.on_event(defines.events.on_pre_scenario_finished, playerwon)
