Minecraft, Dead By Daylight minigame question [closed]

This is my interpretation of the game:

There are 5 devices on a map, each will light up as soon as an attached button is clicked 100 times. If all 5 devices are lit, the gate opens and the survivors rush through.

Your /scoreboard players add 1 is not going to work because there is a lack of parameters.

Your question boils down to how the device is constructed, perhaps in the perfect world it is an iron block with a stone button on top. However, scoreboard variables in minecraft are only available to entities, not blocks. Therefore you will have to add a marker entity near the machine, or simply summon one inside the machine with exact coordinates. While the button is pressed, a command with execute as @e[sort=nearest,limit=1,type=marker] run scoreboard players add @s device_var 1 would be run. Then, a chained command block would call the command execute as @e[sort=nearest,limit=1,type=marker,scores={device_var=100..}] at @s run setblock ~ ~2 ~ minecraft:light This should check if the device is pressed over 100 or more times.

Detect if light blocks are present at certain coordinates with the if block statement in the execute command.

execute if block x y z light if block x y z light ...... if block x y z light run say openDoor

Each tuple of coordinates represent the exact position of a potential light source block.

replace the run say openDoor with your desired action when all machines have been decoded.

To say in advance, there are many aspects of commands involved in the above and it may take a long time of testing and polishing to really get it to work. The method mentioned above is merely a template and my own intepretation of your design and is by no mean set in stone.

I hope this helps and do you need further elaborations?