import { system, world, Entity, Player } from '@minecraft/server'

world.afterEvents.entityHitEntity.subscribe((event) => {
	let damagingEntity = event.damagingEntity;
	const player = event.damagingEntity
	if ((damagingEntity.typeId == 'minecraft:player' && damagingEntity.getComponent('inventory').container.getItem(player.selectedSlot).typeId == 'redstone:infernal_scythe') == true) {
		const entity = event.hitEntity;
		entity.setOnFire(6, true)
	}
})