Hovik,
window.addEventListener("load", function() {
let sample = [{arr :['design', 'galery', 'slider', 'contacts'], src : 'stars1.png'}];
let directory = 'http://test.strides.website/img/stars/';
let carts = [...document.querySelectorAll('.pasive')];
carts.forEach((form) => {
let sumOut = form.querySelector('.score');
let img = form.querySelector('.cart_star')
form.addEventListener("change", () => {
let checks = [...form.querySelectorAll('input[type="checkbox"]:checked')];
let sum = 0;
let checksName = checks.map(item => (sum += +item.dataset.price, item.name));
sumOut.innerHTML = 'first ' + sum + ' last';
img.src = 'http://test.strides.website/img/stars/stars1.png';
for(const { arr, src } of sample)
arr.every(title => checksName.includes(title)) && (img.src = directory + src)
})
})
});