Paste #69821: Edit of P#69820 - Untitled Paste

Date: 2020/05/28 14:38:28 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


CommitToNotUsingRawObjectNotationInScripts:
    type: command
    name: enablehalo
    usage: /enablehalo
    description: Enables your Halo for being a good Denizzle!
    aliases:
        - PraiseDenizen
    script:
        - if <player.has_flag[GoodDenizzle]>:
            - flag player GoodDenizzle:!
            - narrate "<&c>Your Halo disapears!"
        - else:
            - flag player GoodDenizzle
            - narrate "<&a>You become a good Denizzle!"
            - run GoodDenizzleGoingToHeaven

GoodDenizzleGoingToHeaven:
    type: task
    debug: false
    script:
        - define HaloColor <color[255,255,0]>
        - while <player.has_flag[GoodDenizzle]> && <player.is_online>:
            - define Pitch <player.location.pitch.to_radians>
            - define Yaw <player.location.yaw.mul[-1].to_radians>
            - define Loc <player.eye_location.below[0.2]>
            - define Angle <location[0,0.6,0.25].rotate_around_y[<[Loop_Index].to_radians.mul[<element[10].add[72]>]>].rotate_around_x[<[Pitch]>].rotate_around_y[<[Yaw]>]>
            - playeffect effect:redstone at:<[Loc].add[<[Angle]>]> offset:0 special_data:0.5|<[HaloColor]>
            - if <[Loop_Index].mod[4]> == 0:
                - wait 1t
        - flag player GoodDenizzle:!
        - narrate "<&c>Your Halo disapears!"