Paste #109200: Firerate

Date: 2023/04/24 14:48:51 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


raycast:
    type: world
    events:
        on player right clicks block with:AWP:
        - define start_location <player.eye_location>
        - define target_location <[start_location].ray_trace[range=32;default=air;ignore=<player>;raysize=.4]>
        - playeffect crit <[start_location].points_between[<[target_location]>].distance[2]> quantity:1 visibility:100 offset:0
        - playsound <player.location> sound:entity_firework_rocket_blast pitch:.7 volume:.3

shot_sniper:
    type: world
    events:
        on player right clicks block with:AWP:
        - define hit <player.precise_target_position.y>
        - define Target <player.target||null>
        - if <[hit]> >= <player.target.eye_location.y.sub[0.05]> && <[hit]> <= <player.target.eye_location.y.add[0.70]>:
            - hurt 100 <[Target]> source:<player>
        - else if <[hit]> >= <player.target.eye_location.y.sub[1.4]> && <[hit]> <= <player.target.eye_location.y.add[0.70]>:
            - hurt 100 <[Target]> source:<player>




AWP:
    type: item
    material: carrot_on_a_stick
    display name: <&l><white>AWP
    mechanisms:
            custom_model_data: 2
    flags:
        gun:
         stats: