I still cannot get this to work. The filters don't seem to do anything.
import { world } from "@minecraft/server"
world.events.projectileHit.subscribe(eventData => {
const {
source,
projectile
} = eventData
if (!source.hasTag("gamer")) return;
if (projectile != 'minecraft:arrow') return;
const { block } = eventData.getBlockHit()
if (block.type.id != 'minecraft:target') return;
let power = block.getRedstonePower()
if (power <= 10) return;
source.runCommandAsync(`function getkey`)
})