Paste #49288: Untitled Paste

Date: 2018/08/21 06:29:54 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


EarthRide:
    type: world
    debug: true
    events:
        on player starts sneaking:
            - ^if <player.is_on_ground> {
                - queue clear
            }
            - if <player.flag[element]> != earth {
                - queue clear
            }
            - if <player.has_flag[element_toggled]> {
                - queue clear
            }
            - if <player.has_flag[EarthRideActive]> {
                - flag <player> EarthRideActive:!
                - queue clear
            }
            - if <player.location.cursor_on[5].material> != m@air {
                - queue clear
            }
            - if <li@m@sand|m@clay|m@dirt|m@grass|m@gravel|m@diorite|m@cobblestone|m@stone|m@polished_diorite|m@andesite|m@polished_andesite|m@granite|m@polished_granite.contains[<player.location.center.add[0,-2,0].material>]> {
                - if <player.has_flag[EarthRideActive]> {
                    - remove <player.flag[EarthRideActive]>
                    - queue clear
                }
                - flag <player> EarthRideActive
                - define underblock <player.location.center.add[0,-2,0].material>
                - showfake <def[underblock]> <player.location.center.add[0,-1,0]> players:<server.list_online_players> duration:10t
            }
        on player walks:
            - if <player.has_flag[EarthRideActive]> {
                - if !<li@m@sand|m@clay|m@dirt|m@grass|m@gravel|m@diorite|m@cobblestone|m@stone|m@polished_diorite|m@andesite|m@polished_andesite|m@granite|m@polished_granite.contains[<player.location.center.add[0,-2,0].material>]> {
                    - teleport <player> <player.location.add[0,-1,0]>
                }
                - adjust <player> "velocity:<player.location.direction.vector.mul[0.6]>"
                - showfake <player.location.center.add[0,-2,0].material> <player.location.center.add[0,-1,0]> players:<server.list_online_players> duration:15t
                - playeffect <player.location> effect:blockdust_<player.location.add[0,-2,0].material.id> quantity:25
                - playsound <player.location> sound:BLOCK_STONE_BREAK volume:100000000000
            }