shot_testgun: type: world events: on player right clicks block with:testgun: - define start_location - define target_location <[start_location].ray_trace[range=60;entities=*;ignore=;fluids=true;nonsolids=true;default=air]> - playeffect effect:redstone at:<[start_location].points_between[<[target_location]>].distance[0.5]> quantity:1 offset:0 visibility:100 special_data:1| - playsound sound:entity_firework_rocket_blast pitch:0 at:<[start_location]> effect:crit offset:0 visibility:1 volume:1 - inject beshot_testgun - inject recoil - determine cancelled beshot_testgun: type: task script: - define hit_location - define target - if <[hit_location]> >= && <[hit_location]> <= : - hurt 100 <[target]> source: - else if <[hit_location]> <= && <[hit_location]> <= : - hurt 1 <[target]> source: - else: - hurt 10 <[target]> source: recoil: type: task script: - if : - define recoil ].left[]> - else: - define recoil ].left[]> - look recoil testgun: type: item material: wooden_hoe display name: TestGun flags: gun: headdamage: 100 bodydamage: 10 feetdamage: 1 range: 60 maxbullet: 30 currentbullet: 30 recoil: 100 sneakrecoil: 1000 reloadrate: 2 fireraterate: 0.3