scoreboard objectives add darkship_joined dummy
scoreboard objectives add lever_8214621 dummy
scoreboard players set #cur lever_8214621 0
execute if block 82 146 21 minecraft:lever[powered=true] run scoreboard players set #cur lever_8214621 1
scoreboard players operation #prev lever_8214621 = #cur lever_8214621