Paste #73042: Flide

Date: 2020/07/26 09:42:57 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


flide_cmd:
    type: command
    debug: false
    name: flide
    description: Flide into the skyde!
    usage: /flide
    permission: denizen.flide
    script:
    - if !<player.has_permission[denizen.flide]||false>:
        - narrate <&c>Nope!
        - stop
    - actionbar "<gold>Launching! Hold sneak to land!"
    - adjust <player> velocity:0,2,0
    - wait 14t
    - adjust <player> gliding:true
    - while <player.is_online> && !<player.is_on_ground> && <player.gliding> && !<player.is_sneaking>:
        - wait 1t
        - adjust <player> velocity:<player.location.direction.vector.mul[2]>

flide2_cmd:
    type: command
    debug: false
    name: flide2
    description: Flide into the skyde! v2.0!
    usage: /flide2
    permission: denizen.flide2
    script:
    - if !<player.has_permission[denizen.flide2]||false>:
        - narrate <&c>Nope!
        - stop
    - actionbar "<gold>Launching! Hold sneak to land!"
    - adjust <player> velocity:0,2,0
    - wait 14t
    - adjust <player> gliding:true
    - while <player.is_online> && !<player.is_on_ground> && <player.gliding> && !<player.is_sneaking>:
        - wait 1t
        - define vel <player.velocity.add[<player.location.direction.vector.mul[0.05]>]>
        - if <[vel].vector_length> > 2.5:
            - define vel <[vel].normalize.mul[2.5]>
        - adjust <player> velocity:<[vel]>