Volcanic | A Platformer | v7.4
@Stage\n\nwhen I receive [start game v]\nset [brightness v] effect to (0)\nSet Timer []\nreset timer\nforever\n    Set Timer ([floor v] of ((timer) * (100)) )\nend\n\ndefine Set Timer (time)\nset [timer v] to ((time) / (100))\n\nwhen flag clicked\nswitch backdrop to (false v)\nif <<(username) = [griffpatch]> or <(username) = [griffpatch_tutor]>> then\n    set [☁ griffpatch? v] to [1]\nend\n\nwhen I receive [game loop v]\nforever\n    if <(ORBS) > [23]> then\n        set [scene # v] to [Boss]\n        broadcast (About to Change Scene v)\n        broadcast (Change Scene v)\n        set [base speaker v] to [Boss]\n        broadcast (Start Boss v)\n        broadcast (Read Text v)\n        repeat (50)\n            change [brightness v] effect by (-1)\n        end\n        stop [this script v]\n    end\nend\n\nwhen I receive [intro v]\nswitch backdrop to (alpha v)\n\n@Lag Reduction\n\n@Player\n\nwhen flag clicked\nhide\nset size to (100) %\nif <(intro?) = [0]> then\n    broadcast (Intro v) and wait\n    change [intro? v] by (1)\nelse\n    broadcast (Main Menu v)\nend\n\ndefine Move - in steps (steps)\nchange [falling v] by (1)\nrepeat (steps)\n    set [last value v] to (x position)\n    if <(action type) = [Crouch]> then\n        switch costume to (crouch0 v)\n    end\n    change x by ((speed x) / (steps))\n    if <(action type) = [Crouch]> then\n        switch costume to (hitbox crouch v)\n    end\n    Check If Touching Solid\n    if <(touching) > [0]> then\n        Collide X - Slope or Wall?\n    end\n    set [last value v] to (y position)\n    if <(action type) = [Crouch]> then\n        switch costume to (crouch0 v)\n    end\n    change y by ((speed y) / (steps))\n    if <(action type) = [Crouch]> then\n        switch costume to (hitbox crouch v)\n    end\n    Check If Touching Solid\n    if <(touching) > [0]> then\n        Collide Y - Ceiling or Floor?\n    end\nend\n\ndefine Check If Touching Solid\nif <<touching (level v)?> or <touching (platform v)?>> then\n    set [touching v] to [1]\n    stop [this script v]\nend\nset [touching v] to [0]\nset [hit costume v] to (costume [name v])\nif <(hit costume) = [Hitbox]> then\n    switch costume to (hitbox feet v)\nend\nif <touching (jump through platform v)?> then\n    if <(jump through) < [1]> then\n        change y by (-6)\n        if <(hit costume) = [Hitbox]> then\n            switch costume to (hitbox feet2 v)\n        end\n        if <touching (jump through platform v)?> then\n            set [touching v] to [1]\n        else\n            set [jump through v] to [1]\n        end\n        change y by (6)\n    end\nelse\n    set [jump through v] to [0]\nend\nswitch costume to (hit costume)\n\nwhen I receive [tick - player v]\nMoved - by Moving Platform\nswitch backdrop to <touching (level v)?>\nControls - Up and Down\nControls - Left and Right\nMove - in steps (([abs v] of (speed x) ) + ([abs v] of (speed y) ))\nSet Costume\n\ndefine Controls - Up and Down\nif <(action type) = [Crouch]> then\n    switch costume to (hitbox crouch v)\n    Check If Touching Solid\n    if <(touching) > [0]> then\n        switch costume to (hitbox v)\n        Fix Collision in Direction ((0) - (direction)) [10]\n    end\nend\nif <(iframe) < [2]> then\n    set [action type v] to [Walk]\nend\nif <(action type) = [Crouch]> then\n    switch costume to (hitbox crouch v)\nelse\n    switch costume to (hitbox v)\nend\nif <<(STICK BUTTON) > [0]> or <(STICK Y) = [1]>> then\n    if <<(wall slide) > [0]> and <(jumping) = [0]>> then\n        start sound [Jump v]\n        set [jumping v] to [1]\n        set [falling v] to [3]\n        set [wall slide v] to [0]\n        turn right (180) degrees\n        set [speed x v] to (((direction) / (90)) * (7))\n        set [long jump v] to [12]\n    end\n    if <<(falling) < [3]> and <(jumping) = [0]>> then\n        start sound [Jump v]\n        set [jumping v] to [1]\n        set [falling v] to [3]\n    end\n    if <<(jumping) > [0]> and <(jumping) < (JUMP DURATION)>> then\n        change [jumping v] by (1)\n        set [speed y v] to (JUMP FORCE)\n    end\nelse\n    set [jumping v] to [0]\nend\nchange [speed y v] by (GRAVITY)\nif <(wall slide) > [0]> then\n    Check Can Wall Slide\n    if <(speed y) < [0]> then\n        set [speed y v] to ((speed y) * (0.6))\n    end\nend\nif <(action type) = [Crouch]> then\n    switch costume to (hitbox v)\nend\nCheck If Touching Solid\nif <(action type) = [Crouch]> then\n    switch costume to (hitbox crouch v)\nend\nif <(wall slide) = [0]> then\n    if <<<(STICK Y) < [-0.5]> or <<key (down arrow v) pressed?> or <key (s v) pressed?>>> or <(touching) > [0]>> then\n        if <<(touching) > [0]> and <not <<(STICK Y) < [-0.5]> or <<key (down arrow v) pressed?> or <key (s v) pressed?>>>>> then\n            Fix Collision in Direction ((0) - (direction)) [10]\n            switch costume to (hitbox v)\n            Check If Touching Solid\n            switch costume to (hitbox crouch v)\n            if <(touching) = [0]> then\n                if <(iframe) > [0]> then\n                    change [iframe v] by (-1)\n                end\n                stop [this script v]\n            end\n        end\n        set [action type v] to [Crouch]\n        change [iframe v] by (1)\n    end\nend\nif <<not <<(STICK Y) < [-0.5]> or <<key (down arrow v) pressed?> or <key (s v) pressed?>>>> and <(touching) < [1]>> then\n    if <(iframe) > [0]> then\n        change [iframe v] by (-1)\n    end\nend\n\ndefine Controls - Left and Right\nif <(long jump) > [0]> then\n    change [long jump v] by (-1)\n    stop [this script v]\nend\nset [key x v] to (STICK X)\nif <([abs v] of (KEY X) ) < [0.3]> then\n    if <<(falling) > [2]> and <(wall slide) < [1]>> then\n        set [speed x v] to ((speed x) * (0.95))\n        stop [this script v]\n    end\n    if <<([abs v] of (speed x) ) < [1]> and <(wall slide) < [1]>> then\n        set [frame v] to [0]\n        set [speed x v] to [0]\n    else\n        change [frame v] by ([abs v] of ((speed x) / (6)) )\n    end\nelse\n    change [speed x v] by ((KEY X) * (ACCELERATION))\n    if <not <(direction) = ((KEY X) * (90))>> then\n        set [wall slide v] to [0]\n    end\n    point in direction ((KEY X) * (90))\n    change [frame v] by ([abs v] of ((speed x) / (6)) )\nend\nset [speed x v] to ((speed x) * (RESISTANCE))\n\ndefine Reset and Begin Level\nset [death? v] to [0]\nset [invulnerable v] to [0]\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [falling v] to [99]\nset [wall slide v] to [0]\nset [jumping v] to [0]\nset [long jump v] to [0]\nset [iframe v] to [0]\nset [action type v] to [Walk]\npoint in direction (90)\nBegin Scene # (SPAWN SCENE) go to x, y: (SPAWN X) (SPAWN Y) collison: [360]\n\nwhen I receive [game loop v]\nset size to (100) %\nset [ghost v] effect to (0)\nforever\n    broadcast (Tick - First v)\n    broadcast (Tick - Platforms v)\n    broadcast (Tick - Player v)\n    broadcast (Tick - Music v)\n    broadcast (Tick - Last v)\nend\n\nwhen I receive [tick - last v]\nif <(x position) > [239]> then\n    Begin Scene # ((SCENE #) + (1)) go to x, y: [-239] [] collison: [128]\nend\nif <(x position) < [-239]> then\n    Begin Scene # ((SCENE #) - (1)) go to x, y: [239] [] collison: [128]\nend\nif <(y position) > [180]> then\n    Begin Scene # ((SCENE #) + (100)) go to x, y: [] [-160] collison: [128]\nend\nif <(y position) < [-160]> then\n    Begin Scene # ((SCENE #) - (100)) go to x, y: [] [160] collison: [128]\nend\nif <(ORBS) > [23]> then\n    broadcast (Collected! v)\nend\nif <(action type) = [Crouch]> then\n    switch costume to (hitbox crouch v)\nelse\n    switch costume to (hitbox v)\nend\nset rotation style [don't rotate v]\nif <<touching (immobile danger v)?> or <touching (moving danger v)?>> then\n    broadcast (Lose Life v)\nend\nset rotation style [left-right v]\nSet Costume\n\ndefine Begin Scene # (scene #) go to x, y: (x) (y) collison: (repeat)\nset size to (100) %\nset [scene # v] to (scene #)\nif <(x) > []> then\n    set x to (x)\nend\nif <(y) > []> then\n    set y to (y)\nend\nbroadcast (About to Change Scene v)\nbroadcast (Change Scene v)\nstop [other scripts in sprite v]\nwait (0) seconds\nswitch costume to (hitbox v)\nset rotation style [don't rotate v]\nif <(x) > []> then\n    Fix Collision in Direction [0] (repeat)\nelse\n    Fix Collision in Direction [90] (repeat)\nend\nCheck If Touching Solid\nif <(touching) > [0]> then\n    switch costume to (hitbox crouch v)\n    if <(x) > []> then\n        Fix Collision in Direction [0] ((repeat) * (2))\n    else\n        Fix Collision in Direction [90] ((repeat) * (2))\n    end\nend\nSet Costume\nbroadcast (Game Loop v)\n\ndefine Fix Collision in Direction (dir) (repeat)\nset [temp v] to (direction)\nset [distance v] to [1]\npoint in direction (dir)\nrepeat (repeat)\n    Check If Touching Solid\n    if <(touching) < [1]> then\n        point in direction (temp)\n        stop [this script v]\n    end\n    move (distance) steps\n    turn right (180) degrees\n    change [distance v] by (1)\nend\npoint in direction (temp)\n\nwhen I receive [tick - first v]\nif <(action type) = [Crouch]> then\n    switch costume to (hitbox crouch v)\nelse\n    switch costume to (hitbox v)\nend\nset rotation style [don't rotate v]\nset [platform dx v] to []\nset [platform dy v] to []\n\ndefine Set Costume\nset rotation style [left-right v]\nif <(wall slide) > [0]> then\n    switch costume to (wall slide v)\n    stop [this script v]\nend\nif <(action type) = [Crouch]> then\n    if <<([abs v] of (speed x) ) > [2.761364]> or <not <<(falling) > [2]> or <(wall slide) > [0]>>>> then\n        set [speed x v] to ((speed x) * (0.85))\n    end\n    if <(iframe) > [4]> then\n        set [iframe v] to [4]\n    end\n    if <<(frame) > [0]> and <(iframe) = [4]>> then\n        switch costume to ((12) + ([floor v] of ((frame) mod (8)) ))\n    else\n        switch costume to (join [Crouch] (([floor v] of (iframe) ) * (0)))\n    end\n    stop [this script v]\nend\nif <(falling) > [1]> then\n    if <(speed y) > [0]> then\n        switch costume to (jump v)\n    else\n        switch costume to (fall v)\n    end\n    stop [this script v]\nend\nif <(frame) > [0]> then\n    switch costume to ((1) + ([floor v] of ((frame) mod (8)) ))\nelse\n    switch costume to (idle v)\nend\n\ndefine Collide X - Slope or Wall?\nCheck Can Wall Slide\nchange y by (1)\nCheck If Touching Solid\nif <(touching) > [0]> then\n    change y by (1)\n    Check If Touching Solid\n    if <(touching) > [0]> then\n        change y by (-2)\n        set x to (last value)\n        set [speed x v] to [0]\n        stop [this script v]\n    end\n    set [speed x v] to ((speed x) * (0.95))\nend\nset [speed x v] to ((speed x) * (0.95))\nSlip\n\ndefine Collide Y - Ceiling or Floor?\nset y to (last value)\nif <(speed y) > [0]> then\n    set [speed y v] to [0]\n    stop [this script v]\nend\nif <(falling) > [0]> then\n    set [falling v] to [0]\n    Slip\nend\nset [speed y v] to ((speed y) * (0.8))\n\ndefine Slip\nchange y by (-2)\nchange x by (1)\nCheck If Touching Solid\nif <(touching) < [1]> then\n    set [falling v] to [9]\n    change [speed x v] by (1)\n    stop [this script v]\nend\nchange x by (-2)\nCheck If Touching Solid\nif <(touching) < [1]> then\n    set [falling v] to [9]\n    change [speed x v] by (-1)\n    stop [this script v]\nend\nchange y by (2)\nchange x by (1)\n\ndefine Check Can Wall Slide\nif <(action type) = [Crouch]> then\n    stop [this script v]\nend\nif <(falling) < [2]> then\n    set [wall slide v] to [0]\n    stop [this script v]\nend\nswitch costume to (hitbox wallslide v)\nset rotation style [left-right v]\nCheck If Touching Solid\nset [wall slide v] to (touching)\nswitch costume to (hitbox v)\nset rotation style [don't rotate v]\n\nwhen I receive [lose life v]\nset [invulnerable v] to [1]\nset [death? v] to [1]\nstop [other scripts in sprite v]\nstart sound [Oops v]\nswitch costume to (dead v)\nset rotation style [all around v]\nrepeat (10)\n    turn right (36) degrees\n    change y by (10)\n    change [ghost v] effect by (10)\nend\nwait (0.5) seconds\nchange [lives v] by (-1)\nif <(LIVES) > [0]> then\n    Reset and Begin Level\nelse\n    broadcast (Game Over v)\nend\n\ndefine Moved - by Moving Platform\nchange x by (PLATFORM DX)\nchange y by (PLATFORM DY)\nCheck If Touching Solid\nif <(touching) > [0]> then\n    Find Closest Space to (x position) (y position) max [16]\n    if <(touching) > [0]> then\n        switch costume to (hitbox crouch v)\n        Find Closest Space to (x position) (y position) max [16]\n        if <(touching) < [1]> then\n            set [action type v] to [Crouch]\n            set [iframe v] to [4]\n            stop [this script v]\n        end\n        broadcast (Lose Life v)\n    end\nend\n\ndefine Find Closest Space to (x) (y) max (max)\nset [temp v] to (direction)\nset [distance v] to [1]\npoint in direction (0)\nrepeat (max)\n    repeat (16)\n        go to x: (x) y: (y)\n        move (distance) steps\n        Check If Touching Solid\n        if <(touching) < [1]> then\n            point in direction (temp)\n            stop [this script v]\n        end\n        turn right (22.5) degrees\n    end\n    change [distance v] by (1)\nend\ngo to x: (x) y: (y)\npoint in direction (temp)\n\nwhen I receive [start game v]\nshow\nset size to (100) %\npoint in direction (90)\nset [gravity v] to [-1.5]\nset [jump force v] to [12]\nset [jump duration v] to [8]\nset [acceleration v] to [1.5]\nset [resistance v] to [0.8]\nbroadcast (Reset Game v) and wait\nbroadcast (Setup v) and wait\ndelete all of [collected v]\nset [lives v] to [3]\nset [spawn scene v] to [1]\nset [spawn x v] to [-150]\nset [spawn y v] to [55]\nReset and Begin Level\nbroadcast (Read Text v)\n\nwhen I receive [player - bounce v]\nset [speed y v] to [15]\nset [falling v] to [4]\n\nwhen I receive [you win! v]\nstop [other scripts in sprite v]\n\nwhen I receive [start boss v]\nFix Collision in Direction (direction) [256]\ngo to x: (140) y: (-60)\n\nset [intro? v] to [0]\n\n@Trail\n\nwhen I start as a clone\nMake trail [10] frames\n\nwhen I receive [about to change scene v]\ndelete this clone\n\nwhen I receive [start game v]\nset [death? v] to [1]\ngo to (player v)\ngo to [back v] layer\nforever\n    go to (player v)\n    create clone of (_myself_ v)\nend\n\ndefine Make trail (frames) frames\nshow\nswitch costume to (join [Trail ] ([action type v] of [player v]))\nrepeat (frames)\n    if <(DEATH?) = [0]> then\n        set size to ((size) * (([size v] of [player v]) / (100))) %\n        change [ghost v] effect by ((100) / (frames))\n        change size by ((0) - ((100) / (frames)))\n    else\n        hide\n    end\nend\ndelete this clone\n\n@Level\n\nwhen flag clicked\nhide\nerase all\nset [scene # v] to [1]\ngo to x: (0) y: (0)\ngo to [back v] layer\ngo [forward v] (3) layers\n\nwhen I receive [change scene v]\nswitch costume to (join [Scene] (SCENE #))\nStamp Outline\nStamp Shadow\n\ndefine Stamp Shadow\nset [brightness v] effect to (-100)\nset [ghost v] effect to (85)\nchange y by (-10)\nchange x by (5)\nstamp\nchange y by (10)\nchange x by (-5)\nclear graphic effects\n\ndefine Stamp Outline\nset [brightness v] effect to (-10)\nset rotation style [don't rotate v]\nrepeat (8)\n    move (3) steps\n    stamp\n    move (-3) steps\n    turn right (45) degrees\nend\nclear graphic effects\n\nwhen I receive [about to change scene v]\nerase all\n\nwhen I receive [main menu v]\nshow\n\n@Jump Through Platform\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\ngo to [back v] layer\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (SCENE #))\nStamp Outline\nStamp Shadow\n\ndefine Stamp Shadow\nset [brightness v] effect to (-100)\nset [ghost v] effect to (85)\nchange y by (-10)\nchange x by (5)\nstamp\nchange y by (10)\nchange x by (-5)\nclear graphic effects\n\ndefine Stamp Outline\nset [brightness v] effect to (-10)\nset rotation style [don't rotate v]\nrepeat (8)\n    move (3) steps\n    stamp\n    move (-3) steps\n    turn right (45) degrees\nend\nclear graphic effects\n\nwhen I receive [main menu v]\nshow\n\n@Immobile Danger\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\ngo to [back v] layer\ngo [forward v] (2) layers\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (SCENE #))\nStamp Shadow\n\ndefine Stamp Shadow\nset [brightness v] effect to (-100)\nset [ghost v] effect to (85)\nchange y by (-10)\nchange x by (5)\nstamp\nchange y by (10)\nchange x by (-5)\nclear graphic effects\n\nwhen I receive [main menu v]\nshow\n\n@Moving Danger\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\ngo [forward v] (2) layers\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (SCENE #))\nforever\n    set y to ((3) * ([sin v] of ((timer) * (180)) ))\nend\n\n@Platform\n\ndefine Door at (x) (y) key (key name)\nshow\nswitch costume to (key name)\ngo to x: (x) y: (y)\nforever\n    wait until <touching (player v)?>\n    if <[collected v] contains (key name)?> then\n        start sound [Buzz Whir v]\n        repeat (48)\n            change y by (-4)\n        end\n        wait (1) seconds\n        start sound [Buzz Whir v]\n        repeat (48)\n            change y by (4)\n        end\n        start sound [Crunch v]\n    else\n        start sound [Low Squeak v]\n    end\n    wait until <not <touching (player v)?>>\nend\n\nwhen I receive [change scene v]\nhide\ngo to [back v] layer\nset size to (100) %\nif <(SCENE #) = [2]> then\n    Spawn [Key 1] at [-151] [-10] dir: [90] turn: []\nend\nif <(SCENE #) = [5]> then\n    Spawn [Parkour Platform] at [-114] [-19] dir: [90] turn: [2]\n    Spawn [Parkour Platform] at [-6] [58] dir: [90] turn: [-2.5]\n    Spawn [Parkour Platform] at [101] [-19] dir: [90] turn: [2]\nend\nif <(SCENE #) = [102]> then\n    Spawn [Square Platform] at [63] [-116] dir: [90] turn: [1]\nend\nif <(SCENE #) = [104]> then\n    Spawn [Implaing Platform] at [0] [0] dir: [90] turn: []\nend\n\nwhen I receive [tick - platforms v]\nTick (x position) (y position)\nset [last x v] to (x position)\nset [last y v] to (y position)\n\ndefine Tick (new x) (new y)\nif <(turn) > []> then\n    change y by (4)\n    if <touching (player v)?> then\n        Rotation Math CCW ((0) - (turn))\n    end\nelse\n    if <(new y) > (last y)> then\n        change y by (1)\n    else\n        set y to ((last y) + (1))\n    end\n    if <touching (player v)?> then\n        set [platform dx v] to ((new x) - (last x))\n        set [platform dy v] to ((new y) - (last y))\n    end\nend\ngo to x: (new x) y: (new y)\n\ndefine Animate Platform (scene)\nshow\nset rotation style [all around v]\nif <(turn) > []> then\n    forever\n        turn right (turn) degrees\n    end\nend\nforever\n    if <(scene) = [104]> then\n        forever\n            repeat (18)\n                change y by (-5)\n            end\n            wait (1) seconds\n            repeat (45)\n                change y by (2)\n            end\n            wait (0.5) seconds\n        end\n    end\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nhide\n\nwhen I receive [about to change scene v]\ndelete this clone\n\ndefine Spawn (type) at (x) (y) dir: (dir) turn: (degrees)\nset [turn v] to (degrees)\ngo to x: (x) y: (y)\npoint in direction (dir)\nswitch costume to (type)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nif < (costume [name v]) contains [Key]?> then\n    Door at (x position) (y position) key (costume [name v])\nend\nif < (costume [name v]) contains [Platform]?> then\n    Animate Platform (SCENE #)\nend\n\ndefine Rotation Math CCW (ccw)\nset [dx v] to (([x position v] of [player v]) - (x position))\nset [dy v] to (([y position v] of [player v]) - (y position))\nset [sin v] to ([sin v] of (ccw) )\nset [cos v] to ([cos v] of (ccw) )\nset [platform dx v] to ((((dx) * (cos)) - ((dy) * (sin))) - (dx))\nset [platform dy v] to ((((dx) * (sin)) + ((dy) * (cos))) - (dy))\n\n@Collectibles\n\nwhen I receive [change scene v]\nif <(SCENE #) = (my scene)> then\n    show\nelse\n    hide\nend\n\nwhen I start as a clone\nrepeat until <touching (player v)?>\n    change y by ((0.5) * ([sin v] of (frame) ))\n    change [frame v] by (5)\nend\nset [my scene v] to []\nif <(costume [name v]) = [Orb]> then\n    start sound [Orb v]\n    change [orbs v] by (1)\nelse\n    if <(costume [name v]) = [Lava Orb]> then\n        start sound [Lava Orb v]\n        change [orbs v] by (5)\n    else\n        if <(costume [name v]) = [Auto Win Orb]> then\n            start sound [Ding v]\n            set [orbs v] to [0]\n            set [auto win? v] to [1]\n            change [orbs v] by (24)\n        else\n            if <(costume [name v]) = [Checkpoint]> then\n                start sound [Ding v]\n                set [spawn scene v] to (SCENE #)\n                set [spawn x v] to (x position)\n                set [spawn y v] to (y position)\n            else\n                if <(costume [name v]) = [Key 1]> then\n                    start sound [Key v]\n                    add (costume [name v]) to [collected v]\n                else\n                    if <(costume [name v]) = [Life]> then\n                        start sound [Heart v]\n                        change [lives v] by (1)\n                    end\n                end\n            end\n        end\n    end\nend\nrepeat (20)\n    change y by (2)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [setup v]\ndelete all of [collected v]\nset [orbs v] to [0]\nset [auto win? v] to [0]\nset [frame v] to [0]\nhide\nPlace [Key 1] scene [0] xy [0] [-8] size [100]\nPlace [Auto Win Orb] scene [1] xy [180] [-30] size [100]\nPlace [Orb] scene [1] xy [70] [75] size [100]\nPlace [Orb] scene [1] xy [-36] [23] size [100]\nPlace [Orb] scene [101] xy [6] [14] size [100]\nPlace [Orb] scene [2] xy [-50] [80] size [100]\nPlace [Orb] scene [102] xy [-4] [14] size [100]\nPlace [Orb] scene [103] xy [33] [-151] size [100]\nPlace [Orb] scene [4] xy [0] [3] size [100]\nPlace [Orb] scene [104] xy [0] [3] size [100]\nPlace [Orb] scene [106] xy [-76] [40] size [100]\nPlace [Lava Orb] scene [5] xy [210] [57] size [100]\nPlace [Lava Orb] scene [105] xy [0] [-37] size [100]\nPlace [Lava Orb] scene [6] xy [148] [-22] size [200]\nPlace [Checkpoint] scene [2] xy [181] [-26] size [100]\nPlace [Checkpoint] scene [4] xy [3] [123] size [100]\nPlace [Checkpoint] scene [6] xy [11] [15] size [100]\nPlace [Life] scene [104] xy [-210] [-45] size [100]\nPlace [Life] scene [104] xy [210] [-45] size [100]\n\ndefine Place (costume name) scene (scene) xy (x) (y) size (size)\nset [my scene v] to (scene)\nswitch costume to (costume name)\ngo to x: (x) y: (y)\nset size to (size) %\ncreate clone of (_myself_ v)\nset [my scene v] to []\n\nwhen I receive [reset game v]\ndelete this clone\n\n@Number Counter\n\nwhen I receive [start game v]\nsetup [2] size: [130] x: [-190] y: [150]\n\ndefine Change Costume To (costume)\nif <not <(costume) = (costume [name v])>> then\n    switch costume to (costume)\n    set size to ((size) + (20)) %\nend\n\nwhen I start as a clone\nshow\nforever\n    go to [front v] layer\n    go to x: (((digits) * (15)) - (200)) y: (150)\n    if <(length of (ORBS)) < (digits)> then\n        hide\n    else\n        Change Costume To (letter (digits) of (ORBS))\n        show\n    end\n    change size by ((0.2) * ((130) - (size)))\n    if <touching (player v)?> then\n        set [ghost v] effect to (40)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\ndefine setup (digits) size: (size) x: (x) y: (y)\nshow\nset size to (size) %\nset [digits v] to [1]\nrepeat (digits)\n    create clone of (_myself_ v)\n    change [digits v] by (1)\nend\nswitch costume to (orbs v)\ngo to x: (x) y: (y)\n\nwhen I receive [start game v]\nforever\n    if <touching (player v)?> then\n        set [ghost v] effect to (40)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen I receive [start boss v]\nhide\ndelete this clone\n\nwhen I receive [game over v]\nhide\ndelete this clone\n\nwhen flag clicked\nhide\n\n@Lives\n\nwhen flag clicked\ngo to x: (195) y: (157)\nhide\n\nwhen I receive [start game v]\nshow\nset size to (100) %\ngo to x: (195) y: (157)\nforever\n    if <(LIVES) = [1]> then\n        switch costume to (1 v)\n    end\n    if <(LIVES) = [2]> then\n        switch costume to (2 v)\n    end\n    if <(LIVES) = [3]> then\n        switch costume to (3 v)\n    end\n    if <(LIVES) = [4]> then\n        switch costume to (4 v)\n    end\n    if <(LIVES) = [5]> then\n        switch costume to (5 v)\n    end\n    if <(LIVES) = [0]> then\n        switch costume to (0 v)\n    end\n    if <(LIVES) > [5]> then\n        set size to (150) %\n        switch costume to (infinite v)\n    end\nend\n\nwhen I receive [lose life v]\ngo to x: (x position) y: (y position)\nrepeat (10)\n    go to x: ((x position) + (pick random (5) to (-5))) y: ((y position) + (pick random (5) to (-5)))\nend\nif <not <(SCENE #) = [Boss]>> then\n    go to x: (195) y: (157)\nelse\n    go to x: (195) y: (-140)\nend\n\nwhen I receive [start boss v]\nforever\n    if <<(LIVES) > [3]> and <not <(LIVES) > [5]>>> then\n        go to x: (195) y: (-140)\n    else\n        go to x: (195) y: (-157)\n    end\nend\n\nwhen I receive [game over v]\nhide\n\n@Enemy\n\nwhen flag clicked\nset rotation style [left-right v]\nhide\n\nwhen I receive [change scene v]\nif <(SCENE #) = [0]> then\n    Spawn [Red Spike] at [84] [-62] dir: [90] size: [150]\n    Spawn [Red Spike] at [-84] [-62] dir: [-90] size: [150]\nend\nif <(SCENE #) = [2]> then\n    if <(DEATH?) = [1]> then\n        wait (0.5) seconds\n    end\n    Spawn [Red Speed] at [-80] [-62] dir: [90] size: [150]\nend\nif <(SCENE #) = [3]> then\n    wait (0) seconds\n    Spawn [Red] at [-165] [-62] dir: [90] size: [150]\n    if <([x position v] of [player v]) < [0]> then\n        Spawn [Red] at [215] [-62] dir: [-90] size: [150]\n    else\n        Spawn [Red] at [85] [-62] dir: [-90] size: [150]\n    end\nend\nif <(SCENE #) = [6]> then\n    Spawn [Red Spike] at [-45] [-86] dir: [-90] size: [150]\nend\n\nwhen I start as a clone\nshow\nset [speed y v] to [0]\nset [frame v] to [0]\nforever\n    switch costume to (join (type) [1])\n    if <(type) = [Red]> then\n        set rotation style [don't rotate v]\n        Move - Left and Right [2]\n        Move - Down\n        if <touching (platform v)?> then\n            Squish\n        end\n        change [frame v] by (0.33)\n        switch costume to ((1) + (([floor v] of (frame) ) mod (4)))\n        set rotation style [left-right v]\n        if <<(INVULNERABLE) = [0]> and <touching (player v)?>> then\n            Touching Player\n        end\n    end\n    if <(type) = [Red Speed]> then\n        set rotation style [don't rotate v]\n        Move - Left and Right [12]\n        Move - Down\n        if <touching (platform v)?> then\n            Squish\n        end\n        change [frame v] by (0.33)\n        switch costume to ((6) + (([floor v] of (frame) ) mod (4)))\n        set rotation style [left-right v]\n        if <<(INVULNERABLE) = [0]> and <touching (player v)?>> then\n            Touching Player\n        end\n    end\n    if <(type) = [Red Spike]> then\n        set rotation style [don't rotate v]\n        Move - Left and Right [3]\n        Move - Down\n        if <touching (platform v)?> then\n            Squish\n        end\n        change [frame v] by (0.33)\n        switch costume to ((10) + (([floor v] of (frame) ) mod (4)))\n        set rotation style [left-right v]\n        if <<(INVULNERABLE) = [0]> and <touching (player v)?>> then\n            broadcast (Lose Life v)\n        end\n    end\nend\n\nwhen I receive [about to change scene v]\ndelete this clone\n\ndefine Move - Down\nchange [speed y v] by (-1)\nchange y by (speed y)\nrepeat until <not <<touching (level v)?> or <touching (jump through platform v)?>>>\n    change y by (1)\n    set [speed y v] to [0]\nend\n\ndefine Move - Left and Right (speed)\nmove (speed) steps\nrepeat (4)\n    if <not <<touching (level v)?> or <touching (_edge_ v)?>>> then\n        if <not <<touching (platform v)?> or <touching (jump through platform v)?>>> then\n            stop [this script v]\n        end\n    end\n    change y by (1)\nend\nchange y by (-4)\nmove ((0) - (speed)) steps\nturn right (180) degrees\n\ndefine Spawn (type) at (x) (y) dir: (dir) size: (size)\nset size to ((size) * (([size v] of [player v]) / (100))) %\nset [type v] to (type)\ngo to x: (x) y: (y)\npoint in direction (dir)\ncreate clone of (_myself_ v)\n\ndefine Squish\nstart sound [Squish v]\nswitch costume to (red squish v)\nwait (0.3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\ndefine Touching Player\nif <([speed y v] of [player v]) < [-3]> then\n    broadcast (Player - Bounce v)\n    Squish\nelse\n    broadcast (Lose Life v)\nend\n\n@Boss\n\ndefine Glide (x1) (y1) (x2) (y2) (s)\ngo to x: (x1) y: (y1)\nrepeat until <<(round (x position)) = (x2)> and <(round (y position)) = (y2)>>\n    change x by (((x2) - (x position)) / (s))\n    change y by (((y2) - (y position)) / (s))\nend\n\nwhen I receive [start boss v]\nshow\nswitch costume to (vesuvius v)\ngo to x: (0) y: (-50)\nforever\n    go to [back v] layer\nend\n\nwhen I receive [hurt boss v]\nswitch costume to (damaged v)\nwait (1) seconds\nwait until <<(distance to [player v]) < [50]> and <<([speed y v] of [player v]) < [-3]> and <touching (player v)?>>>\nbroadcast (Player - Bounce v)\nswitch costume to (vesuvius v)\nwait (1) seconds\nGlide [0] [-50] [0] [50] [20]\nbroadcast (Round 2 v)\n\nwhen I receive [boss defeat v]\nswitch costume to (damaged v)\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen I receive [start game v]\nhide\n\nwhen flag clicked\nhide\n\n@Attacks\n\ndefine Attack Type: (type) (x) (y) (dir) (cy) (life)\ngo to x: (x) y: (y)\npoint in direction (dir)\nif <(type) = [Blob]> then\n    switch costume to (blob v)\n    set [cloney v] to (cy)\n    set [life v] to (life)\n    create clone of (_myself_ v)\nend\nif <(type) = [Effect]> then\n    switch costume to (effect v)\n    set [cloney v] to (cy)\n    set [life v] to (life)\n    create clone of (_myself_ v)\nend\nif <(type) = [Rock]> then\n    switch costume to (rock v)\n    set [cloney v] to (cy)\n    set [life v] to (life)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset size to (100) %\nset [ghost v] effect to (0)\nshow\nif <(costume [name v]) = [Blob]> then\n    set size to (150) %\n    go to [back v] layer\n    repeat until <touching (_edge_ v)?>\n        move (6) steps\n        change y by (cloneY)\n        change [cloney v] by (-1)\n        Attack Type: [Effect] (x position) (y position) (direction) (cloneY) (life)\n        switch costume to (blob v)\n        Damage\n    end\n    delete this clone\nend\nif <(costume [name v]) = [Effect]> then\n    set size to (150) %\n    go to [back v] layer\n    repeat (life)\n        change size by ((0) - ((50) / (life)))\n        change [ghost v] effect by ((100) / (life))\n    end\n    delete this clone\nend\nif <(costume [name v]) = [Rock]> then\n    set size to (100) %\n    go to [back v] layer\n    set [t v] to (pick random (-3) to (3))\n    repeat until <touching (_edge_ v)?>\n        turn right (t) degrees\n        change y by (cloneY)\n        change [cloney v] by (-0.5)\n        Attack Type: [Effect] (x position) (y position) [] (cloneY) (life)\n        switch costume to (rock v)\n        Damage\n    end\n    delete this clone\nend\n\ndefine Damage\nif <<(LIVES) < [1]> and <(INVULNERABLE) = [0]>> then\n    broadcast (Lose Life v)\n    stop [other scripts in sprite v]\nelse\n    if <touching (player v)?> then\n        change [lives v] by (-1)\n        delete this clone\n    end\nend\n\nwhen I receive [start boss v]\nset [ghost v] effect to (100)\nwait (1) seconds\nrepeat (2)\n    Attack Type: [Blob] [0] [0] [60] [13] [15]\n    Attack Type: [Blob] [0] [0] [45] [9] [15]\n    Attack Type: [Blob] [0] [0] [-45] [9] [15]\n    Attack Type: [Blob] [0] [0] [-60] [13] [15]\n    wait (1.6) seconds\n    Attack Type: [Blob] [0] [0] [15] [9] [15]\n    Attack Type: [Blob] [0] [0] [0] [9] [15]\n    Attack Type: [Blob] [0] [0] [-15] [9] [15]\n    wait (1.6) seconds\n    repeat (10)\n        Attack Type: [Rock] (pick random (-235) to (235)) [160] [] [] [4]\n        wait (0.3) seconds\n    end\n    wait (1) seconds\nend\nbroadcast (Hurt Boss v)\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen I receive [round 2 v]\nwait (1) seconds\nrepeat (10)\n    Attack Type: [Blob] [0] [0] ((([x position v] of [player v]) / ([abs v] of ([x position v] of [player v]) )) * (30)) (([abs v] of ([x position v] of [player v]) ) / (10)) [15]\n    Attack Type: [Rock] ([x position v] of [player v]) [160] [] [] [5]\n    wait (0.7) seconds\nend\nwait (1.6) seconds\nrepeat (10)\n    Attack Type: [Rock] (pick random (-235) to (235)) [160] [] [] [5]\n    wait (0.3) seconds\nend\nwait (1) seconds\nbroadcast (Boss Defeat v)\n\nwhen I receive [stop project v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [boss defeat v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@Joystick\n\nwhen I receive [start game v]\ngo to [front v] layer\nset size to (80) %\nset [ghost v] effect to (80)\nset [range v] to ((size) / (2.5))\nshow\nif <(MOBILE?) = [0]> then\n    hide\nend\nforever\n    go to x: (-190) y: (-129)\n    switch costume to (base v)\n    repeat until <not <mouse down?>>\n        Keyboard Controls\n    end\n    repeat until <mouse down?>\n        Keyboard Controls\n    end\n    if <(distance to [mouse-pointer v]) < (size)> then\n        Stick Activated\n    end\nend\n\ndefine Keyboard Controls\nset [stick x v] to <<key (right arrow v) pressed?> or <key (d v) pressed?>>\nchange [stick x v] by ((0) - <<key (left arrow v) pressed?> or <key (a v) pressed?>>)\nset [stick y v] to <<key (up arrow v) pressed?> or <key (w v) pressed?>>\nchange [stick y v] by ((0) - <<key (down arrow v) pressed?> or <key (s v) pressed?>>)\nif <key (space v) pressed?> then\n    change [stick button v] by (1)\nelse\n    set [stick button v] to [0]\nend\n\ndefine Stick Activated\ngo to (mouse-pointer v)\nswitch costume to (ready v)\ncreate clone of (_myself_ v)\nswitch costume to (stick v)\ncreate clone of (_myself_ v)\nswitch costume to (base active v)\nset [stick button v] to []\nrepeat until <(distance to [mouse-pointer v]) > ((size) * (1.5))>\n    Detect Stick Movement\n    Detect Stick Button\nend\nbroadcast (Deactivate Stick v)\n\ndefine Detect Stick Movement\nset [stick x v] to (((mouse x) - (x position)) / (range))\nset [stick y v] to (((mouse y) - (y position)) / (range))\nif <([abs v] of (STICK X) ) > [1]> then\n    set [stick x v] to ((STICK X) / ([abs v] of (STICK X) ))\nend\nif <([abs v] of (STICK Y) ) > [1]> then\n    set [stick y v] to ((STICK Y) / ([abs v] of (STICK Y) ))\nend\n\ndefine Detect Stick Button\nif <mouse down?> then\n    if <(STICK BUTTON) > []> then\n        change [stick button v] by (1)\n    end\nelse\n    set [stick button v] to [0]\nend\n\nwhen I receive [deactivate stick v]\ndelete this clone\n\nwhen I start as a clone\nif <(costume [name v]) = [Stick]> then\n    go [forward v] (1) layers\n    set [ghost v] effect to (0)\n    forever\n        go to (joystick v)\n        change x by ((STICK X) * (range))\n        change y by ((STICK Y) * (range))\n    end\nend\ngo to x: (190) y: (-129)\nwait until <not <mouse down?>>\nswitch costume to (base active v)\nforever\n    if <mouse down?> then\n        set [ghost v] effect to (25)\n    else\n        set [ghost v] effect to (75)\n    end\nend\n\nwhen flag clicked\nhide\n\n@Text\n\nwhen I receive [read text v]\nif <(BASE SPEAKER) = [Player]> then\n    if <(pick random (1) to (100)) = [1]> then\n        Read Text [Vesuvius... He's coming]\n    else\n        Read Text [Huh? Where am I?]\n        Read Text [I need to escape this ominous volcanic island!]\n    end\nelse\n    Read Text [YOU THOUGHT YOU COULD ESCAPE?!?]\n    Read Text [WELL THINK AGAIN!!!]\nend\n\ndefine Read Text (text)\nset [letter text v] to [1]\nset [read text v] to []\nrepeat (length of (text))\n    set [read text v] to (join (read text) (letter (letter text) of (text)))\n    say (read text)\n    wait (0.05) seconds\n    change [letter text v] by (1)\n    if <(BASE SPEAKER) = [Player]> then\n        start sound [Boop v]\n    else\n        start sound [Boop2 v]\n    end\nend\nsay (read text) for (0.5) seconds\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\nRead Text []\n\nwhen I receive [start game v]\nset [base speaker v] to [Player]\nforever\n    go to (BASE SPEAKER)\nend\n\n@Splash Screen\n\nwhen I receive [game over v]\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nswitch costume to (game over v)\ngo to [front v] layer\nshow\nbroadcast (Main Menu v)\n\nwhen I receive [start game v]\nswitch costume to (hide v)\nhide\n\nwhen I receive [collected! v]\nbroadcast (Update Record v)\n\nwhen [timer v] > (timer)\nshow\nif <not <(costume [name v]) = [Main Menu]>> then\n    broadcast (Stop Project v)\nelse\n    stop [this script v]\nend\n\nwhen flag clicked\nforever\n    set [timer v] to (timer)\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (main menu v)\nhide\n\nwhen I receive [stop project v]\nswitch costume to (main menu v)\nshow\ngo to [front v] layer\ngo to x: (0) y: (1000)\nrepeat until <(round (y position)) = [0]>\n    go to [front v] layer\n    change y by (((0) - (y position)) / (4))\nend\n\nwhen I receive [you win! v]\nswitch costume to (you win! v)\nshow\ngo to x: (0) y: (1000)\ngo to [front v] layer\nrepeat until <(round (y position)) = [0]>\n    go to [front v] layer\n    change y by (((0) - (y position)) / (5))\nend\nstop [all v]\n\nwhen I receive [boss defeat v]\nwait (2) seconds\nbroadcast (You Win! v)\n\nwhen I receive [main menu v]\ngo to [front v] layer\nset [ghost v] effect to (0)\nshow\n\n@Main Menu\n\nwhen I receive [main menu v]\nwait (0.1) seconds\nif <(type) = [Options]> then\n    if <(LIVES) > [0]> then\n        go to x: (0) y: (-138)\n    else\n        go to x: (0) y: (-35)\n    end\nelse\n    if <(LIVES) > [0]> then\n        set [type v] to [Play]\n        go to x: (0) y: (-75)\n    else\n        set [type v] to [Retry]\n        go to x: (0) y: (28)\n        delete this clone\n    end\nend\nAnimate Button\n\nwhen this sprite clicked\nif <(type) = [Options]> then\n    play sound [Finger Snap v] until done\n    set size to (100) %\n    wait (0) seconds\n    hide\n    broadcast (Options v)\nelse\n    if <<(type) = [Play]> or <(type) = [Retry]>> then\n        play sound [Finger Snap v] until done\n        set size to (100) %\n        wait (0) seconds\n        hide\n        if <<(type) = [Play]> or <(type) = [Retry]>> then\n            set [scene # v] to [1]\n        end\n        broadcast (Start Game v)\n    end\nend\n\ndefine Animate Button\nswitch costume to (join (type) [ Button])\ngo to [front v] layer\nshow\nset size to (10) %\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((110) - (size)) / (3))\n        set [brightness v] effect to (5)\n        point in direction ((90) + ([sin v] of ((timer) * (1000)) ))\n    else\n        point in direction (90)\n        set [brightness v] effect to (0)\n        change size by (((90) - (size)) / (3))\n    end\nend\n\nwhen I start as a clone\nclear graphic effects\npoint in direction (90)\nforever\n    if <(type) = [Options]> then\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [back options v]\nshow\n\nwhen I receive [start game v]\nif <(type) = [Options]> then\n    hide\nend\n\nwhen [timer v] > ([timer v] of [splash screen v])\nhide\n\nwhen flag clicked\nhide\nset [type v] to [Options]\ncreate clone of (_myself_ v)\ngo to x: (0) y: (-75)\nset [lives v] to [1]\nset [type v] to [Play]\n\nwhen I receive [main menu v]\nwait (0.1) seconds\nif <(type) = [Options]> then\n    if <(LIVES) > [0]> then\n        go to x: (0) y: (-138)\n    else\n        go to x: (0) y: (-35)\n    end\nelse\n    if <(LIVES) > [0]> then\n        set [type v] to [Play]\n        go to x: (0) y: (-75)\n    else\n        set [type v] to [Retry]\n        go to x: (0) y: (28)\n        delete this clone\n    end\nend\nAnimate Button\n\n@☁ World Record\n\nwhen flag clicked\n☁ Decode Username\n\ndefine ☁ Encode Username\nset [i v] to [1]\nset [☁ world record holder v] to []\nrepeat (length of (username))\n    if <[characters v] contains (letter (i) of (username))?> then\n        set [☁ world record holder v] to (join (☁ WORLD RECORD HOLDER) (item (item # of (letter (i) of (username)) in [characters v]) of [encoded v]))\n        change [i v] by (1)\n    else\n        change [i v] by (1)\n    end\nend\n\ndefine ☁ Decode Username\nset [i v] to [1]\nset [world record holder v] to []\nrepeat ((length of (☁ WORLD RECORD HOLDER)) / (2))\n    set [world record holder v] to (join (WORLD RECORD HOLDER) (item (item # of (join (letter (i) of (☁ WORLD RECORD HOLDER)) (letter ((i) + (1)) of (☁ WORLD RECORD HOLDER))) in [encoded v]) of [characters v]))\n    change [i v] by (2)\nend\n\nwhen I receive [update record v]\nset [☁ world record v] to (☁ WORLD RECORD)\nif <(AUTO WIN?) = [0]> then\n    if <(TIMER) < (☁ WORLD RECORD)> then\n        set [☁ world record v] to (TIMER)\n        ☁ Encode Username\n        ☁ Decode Username\n    end\nend\n\nwhen flag clicked\ndelete all of [encoded v]\nadd [00] to [encoded v]\nadd [01] to [encoded v]\nadd [02] to [encoded v]\nadd [03] to [encoded v]\nadd [04] to [encoded v]\nadd [05] to [encoded v]\nadd [06] to [encoded v]\nadd [07] to [encoded v]\nadd [08] to [encoded v]\nadd [09] to [encoded v]\nadd [10] to [encoded v]\nadd [11] to [encoded v]\nadd [12] to [encoded v]\nadd [13] to [encoded v]\nadd [14] to [encoded v]\nadd [15] to [encoded v]\nadd [16] to [encoded v]\nadd [17] to [encoded v]\nadd [18] to [encoded v]\nadd [19] to [encoded v]\nadd [20] to [encoded v]\nadd [21] to [encoded v]\nadd [22] to [encoded v]\nadd [23] to [encoded v]\nadd [24] to [encoded v]\nadd [25] to [encoded v]\nadd [26] to [encoded v]\nadd [27] to [encoded v]\nadd [28] to [encoded v]\nadd [29] to [encoded v]\nadd [30] to [encoded v]\nadd [31] to [encoded v]\nadd [32] to [encoded v]\nadd [33] to [encoded v]\nadd [34] to [encoded v]\nadd [35] to [encoded v]\nadd [36] to [encoded v]\nadd [37] to [encoded v]\nadd [38] to [encoded v]\nadd [39] to [encoded v]\nadd [40] to [encoded v]\nadd [41] to [encoded v]\ndelete all of [characters v]\nadd [A] to [characters v]\nadd [B] to [characters v]\nadd [C] to [characters v]\nadd [D] to [characters v]\nadd [E] to [characters v]\nadd [F] to [characters v]\nadd [G] to [characters v]\nadd [H] to [characters v]\nadd [I] to [characters v]\nadd [J] to [characters v]\nadd [K] to [characters v]\nadd [L] to [characters v]\nadd [M] to [characters v]\nadd [N] to [characters v]\nadd [O] to [characters v]\nadd [P] to [characters v]\nadd [Q] to [characters v]\nadd [R] to [characters v]\nadd [S] to [characters v]\nadd [T] to [characters v]\nadd [U] to [characters v]\nadd [V] to [characters v]\nadd [W] to [characters v]\nadd [X] to [characters v]\nadd [Y] to [characters v]\nadd [Z] to [characters v]\nadd [0] to [characters v]\nadd [1] to [characters v]\nadd [2] to [characters v]\nadd [3] to [characters v]\nadd [4] to [characters v]\nadd [5] to [characters v]\nadd [6] to [characters v]\nadd [7] to [characters v]\nadd [8] to [characters v]\nadd [9] to [characters v]\nadd [-] to [characters v]\nadd [_] to [characters v]\nadd [.] to [characters v]\nadd [?] to [characters v]\nadd [!] to [characters v]\nadd ['] to [characters v]\n\n@Display\n\nwhen flag clicked\nsetup [6]\n\ndefine setup (digits)\nset size to (100) %\nhide\ngo to x: (0) y: (100)\nset [digit v] to [1]\nset [display v] to [timer]\nrepeat (digits)\n    create clone of (_myself_ v)\n    change x by ([floor v] of ((size) / (8)) )\n    change [digit v] by (1)\nend\ngo to x: (-100) y: (100)\nset [digit v] to [1]\nset [display v] to [record]\nrepeat (44)\n    create clone of (_myself_ v)\n    change x by ([floor v] of ((size) / (8)) )\n    change [digit v] by (1)\nend\n\ndefine Change Costume To (costume)\nif <not <(costume) = (costume [name v])>> then\n    switch costume to (costume)\n    set size to ((size) + (5)) %\nend\n\ndefine display (text) (y)\nif <(display) = [timer]> then\n    Change Costume To (letter (digit) of (text))\nelse\n    switch costume to (letter (digit) of (text))\nend\nchange size by ((0.2) * ((100) - (size)))\nset x to ((((digit) - (0.5)) - ((length of (text)) / (2))) * ([floor v] of ((size) / (8)) ))\nset y to (y)\n\nwhen I receive [start game v]\nforever\n    if <not <(display) = [timer]>> then\n        set size to (80) %\n        display (join (join (join [RECORD IS ] (☁ WORLD RECORD)) [ BY ]) (WORLD RECORD HOLDER)) [-160]\n    end\nend\n\nwhen I receive [start game v]\nshow\n\nwhen I start as a clone\nhide\ndisplay [] [-160]\nforever\n    go to [front v] layer\n    if <(display) = [timer]> then\n        display (TIMER) [100]\n    end\n    if <<touching (player v)?> or <touching (mouse-pointer v)?>> then\n        set [ghost v] effect to (40)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen I receive [game over v]\nhide\n\nwhen I receive [start boss v]\nhide\n\n@Options\n\nwhen I receive [options v]\ngo to [front v] layer\nshow\n\nwhen I receive [back options v]\nhide\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\n@Mobile\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nswitch costume to (0 v)\nforever\n    set [mobile? v] to (costume [name v])\nend\n\nwhen I receive [options v]\nwait (0) seconds\ngo to [front v] layer\nshow\n\nwhen I receive [back options v]\nhide\n\nwhen this sprite clicked\nnext costume\n\n@Back Button\n\nwhen flag clicked\ngo to x: (162) y: (-152)\nset [brightness v] effect to (0)\nhide\nforever\n    wait (0) seconds\n    next costume\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (35)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [options v]\nwait (0) seconds\ngo to [front v] layer\nshow\n\nwhen this sprite clicked\nhide\nstart sound [Finger Snap v]\nbroadcast (Back Options v)\n\nwhen I receive [game over v]\ngo to [front v] layer\n\n@Music\n\nwhen I receive [start game v]\nset volume to (50) %\nforever\n    play sound [Inferno v] until done\nend\n\nwhen I receive [mute v]\nset [volume v] to [Mute]\nset volume to (0) %\n\nwhen I receive [unmute v]\nset [volume v] to [Unmute]\nset volume to (100) %\n\nwhen I receive [tick - music v]\nshow\ngo to x: (-216) y: (-155)\nforever\n    if <(costume [number v]) = [1]> then\n        broadcast (Unmute v)\n    end\n    if <(costume [number v]) = [2]> then\n        broadcast (Mute v)\n    end\nend\n\nwhen [m v] key pressed\nnext costume\nwait until <not <key (m v) pressed?>>\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [start game v]\nset [volume v] to [Unmute]\nswitch costume to (volume)\nwait (0.0000001) seconds\ngo to [front v] layer\nshow\n\nwhen this sprite clicked\nnext costume\n\nwhen I receive [stop project v]\nhide\n\nwhen I receive [intro v]\nhide\n\n@Smoke Clouds\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (pick random (60) to (80))\nset size to (pick random (80) to (100)) %\nset y to (pick random (60) to (90))\nset [speed v] to (pick random (0.5) to (1))\nset x to (-250)\nrepeat until <(x position) > [250]>\n    go to [front v] layer\n    move (speed) steps\nend\ndelete this clone\n\nwhen I receive [start game v]\nwait (0.1) seconds\nhide\nforever\n    wait (pick random (10) to (15)) seconds\n    switch costume to (pick random (1) to (2))\n    create clone of (_myself_ v)\nend\n\nwhen I receive [start game v]\ndelete this clone\n\nwhen I receive [about to change scene v]\ndelete this clone\n\nwhen I receive [you win! v]\ndelete this clone\n\nwhen I receive [game over v]\ndelete this clone\n\n@Intro\n\nwhen I start as a clone\nif <(Clone ID) = [Shutter]> then\n    show\n    go to x: (0) y: (0)\n    go to [back v] layer\n    go [forward v] (67) layers\n    switch costume to (// blank v)\n    set size to (0) %\n    switch costume to (shutter v)\n    wait (1) seconds\n    repeat (100)\n        switch costume to (// blank v)\n        change size by (((2000) - (size)) / (50))\n        switch costume to (shutter v)\n    end\n    broadcast (Main Menu v)\n    delete this clone\nend\n\ndefine Bounce Size (size)\nset [bounce size v] to [0]\nrepeat until <([abs v] of (((0.85) * (BOUNCE SIZE)) + (((size) - (size)) / (9))) ) < [0.05]>\n    set [bounce size v] to (((0.85) * (BOUNCE SIZE)) + (((size) - (size)) / (9)))\n    change size by (BOUNCE SIZE)\n    go to [front v] layer\nend\n\ndefine Shake (rep)\nset [d v] to [30]\nset [i v] to (pick random (0) to (100))\nset size to (200) %\nrepeat (rep)\n    set [camera // direction v] to ((([cos v] of ((I) * (40)) ) * (D)) + (90))\n    set [camera // x v] to ((([cos v] of (((I) - (5)) * (40)) ) * (D)) + (0))\n    set [camera // y v] to ((([cos v] of (((I) - (3)) * (40)) ) * (D)) + (0))\n    repeat (10)\n        Shake [10]\n    end\n    change size by (10)\n    change [i v] by (1)\n    set [d v] to ((D) / (1.2))\nend\npoint in direction (90)\n\ndefine Clone (id)\nset [clone id v] to (id)\ncreate clone of (_myself_ v)\n\ndefine Position\nset [personal // costume v] to (costume [name v])\nswitch costume to (// position v)\nset x to (((((CAMERA // X) + (Personal // X)) * (CAMERA // Z)) * ([cos v] of (CAMERA // DIRECTION) )) + ((((CAMERA // Y) + (Personal // Y)) * (CAMERA // Z)) * ([sin v] of (CAMERA // DIRECTION) )))\nset y to (((((CAMERA // X) + (Personal // X)) * (CAMERA // Z)) * ([sin v] of (CAMERA // DIRECTION) )) - ((((CAMERA // Y) + (Personal // Y)) * (CAMERA // Z)) * ([cos v] of (CAMERA // DIRECTION) )))\npoint in direction ((Personal // Direction) - (CAMERA // DIRECTION))\nif <(Personal // Z) > [99]> then\n    switch costume to (// blank v)\nelse\n    switch costume to (// screen v)\nend\nset size to ((CAMERA // Z) * (Personal // Z)) %\nswitch costume to (Personal // Costume)\n\nwhen I start as a clone\nforever\n    if <not <<<<(Clone ID) = [Bar]> or <(Clone ID) = [Text]>> or <(Clone ID) = [Shutter]>> or <<(Clone ID) = [LS]> or <(Clone ID) = [LE]>>>> then\n        Position\n    end\nend\n\nwhen I start as a clone\nif < (Clone ID) contains [// Chevron]?> then\n    switch costume to (Clone ID)\n    go [forward v] (69) layers\n    set [personal // direction v] to (Intro // Direction)\n    set [personal // y v] to (Intro // Y)\n    set [personal // z v] to (Intro // Z)\n    wait (0) seconds\n    show\n    if <(Personal // Direction) = [-90]> then\n        set [personal // x v] to ((0) - (Intro // X))\n        repeat until <(Personal // X) > [1000]>\n            change [personal // x v] by (Public // Variable 1)\n        end\n    else\n        set [personal // x v] to (Intro // X)\n        repeat until <[-1000] > (Personal // X)>\n            change [personal // x v] by ((0) - (Public // Variable 1))\n        end\n    end\n    delete this clone\nend\n\ndefine Set up Chevrons :  Brightness (brightness) X (x) ID (id)\nset [intro // x v] to (x)\nset [intro // y v] to [0]\nset [intro // z v] to [100]\nset [public // variable 1 v] to [10]\nset [brightness v] effect to (brightness)\nset [intro // direction v] to [90]\nClone (id)\nset [brightness v] effect to (brightness)\nset [intro // direction v] to [-90]\nClone (id)\nset [brightness v] effect to (0)\n\ndefine Clone Chevrons (amount)\nset [public // variable 2 v] to (amount)\nif <<(amount) > [0]> and <((amount) / (400)) = (round ((amount) / (400)))>> then\n    repeat ((amount) / (400))\n        Set up Chevrons :  Brightness [100] X (Public // Variable 2) ID [// Chevron Mosaic]\n        change [public // variable 2 v] by (-75)\n        Set up Chevrons :  Brightness [0] X (Public // Variable 2) ID [// Chevron Mosaic]\n        change [public // variable 2 v] by (-75)\n        Set up Chevrons :  Brightness [-40] X (Public // Variable 2) ID [// Chevron Mosaic Lined]\n        change [public // variable 2 v] by (-75)\n        Set up Chevrons :  Brightness [0] X (Public // Variable 2) ID [// Chevron Mosaic]\n        change [public // variable 2 v] by (-75)\n        Set up Chevrons :  Brightness [100] X (Public // Variable 2) ID [// Chevron Mosaic]\n        change [public // variable 2 v] by (-75)\n        Set up Chevrons :  Brightness [0] X (Public // Variable 2) ID [// Chevron Mosaic]\n        change [public // variable 2 v] by (-75)\n        Set up Chevrons :  Brightness [-40] X (Public // Variable 2) ID [// Chevron Mosaic Lined]\n        change [public // variable 2 v] by (-75)\n        Set up Chevrons :  Brightness [0] X (Public // Variable 2) ID [// Chevron Mosaic]\n        change [public // variable 2 v] by (-75)\n    end\nend\n\nwhen I start as a clone\nif < (Clone ID) contains [Bar]?> then\n    go to x: (0) y: (0)\n    switch costume to (bars v)\n    show\n    point in direction (90)\n    set size to (100) %\n    repeat (180)\n        switch costume to (// blank v)\n        show\n        clear graphic effects\n        go to [front v] layer\n        switch costume to (bars v)\n    end\n    delete this clone\nend\n\nwhen I receive [intro v]\nwait (1) seconds\nset [camera // x v] to [0]\nset [camera // z v] to [0]\n\nwhen I receive [intro v]\nstart sound [Ruth B - Dandelions v]\nClone [Text]\nwait (3) seconds\nset [camera // direction v] to [0]\nset [camera // x v] to [0]\nset [camera // y v] to [0]\nset [camera // z v] to [1]\nset [clone id v] to []\nset [intro // direction v] to [90]\nset [intro // x v] to [0]\nset [intro // y v] to [0]\nset [intro // z v] to [100]\nset [personal // costume v] to []\nset [personal // direction v] to [90]\nset [personal // x v] to [0]\nset [personal // y v] to [0]\nset [personal // z v] to [100]\nClone [BG]\nClone [Bar]\nClone Chevrons [1200]\nwait (4.5) seconds\nClone [Shutter]\n\nwhen I start as a clone\nif <(Clone ID) = [Text]> then\n    go to x: (0) y: (0)\n    set size to (150) %\n    switch costume to (text v)\n    show\n    go to [front v] layer\n    go [backward v] (1) layers\n    Bounce Size [100]\nend\n\nwhen I start as a clone\nif <(Clone ID) = [Text]> then\n    wait (2) seconds\n    forever\n        go to [front v] layer\n        Position\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID) = [BG]> then\n    go to x: (0) y: (0)\n    set size to (150) %\n    switch costume to (bg v)\n    show\n    repeat (150)\n        go to [back v] layer\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone ID) = [Text]> then\n    set [camera // direction v] to [0]\n    wait (3) seconds\n    set [camera // direction v] to [0]\n    set [turn? v] to [1]\n    set [value v] to [1]\n    repeat (20)\n        change [camera // direction v] by (VALUE)\n        change [value v] by ((VALUE) / (5))\n    end\n    repeat (20)\n        change [camera // direction v] by (((0) - (CAMERA // DIRECTION)) / (4))\n    end\n    set [turn? v] to [0]\n    repeat (4)\n        set [camera // z v] to [2]\n        repeat (10)\n            change [camera // z v] by (((1) - (CAMERA // Z)) / (5))\n        end\n        wait (0.5) seconds\n    end\n    repeat (2)\n        set [camera // z v] to [2]\n        repeat (10)\n            change [camera // z v] by (((1) - (CAMERA // Z)) / (5))\n        end\n        LS [0] [0] [100] [90] [20]\n        LS [0] [0] [100] [-90] [20]\n        LE [150] [0]\n        LE [-150] [0]\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID) = [Text]> then\n    wait (5) seconds\n    LS [100] [0] [100] [90] [20]\n    LS [100] [100] [100] [90] [20]\n    LS [100] [-100] [100] [90] [20]\n    LE [200] [0]\n    repeat (20)\n        change [camera // x v] by (((-45) - (CAMERA // X)) / (5))\n    end\n    LS [-100] [0] [100] [90] [20]\n    LS [-100] [100] [100] [90] [20]\n    LS [-100] [-100] [100] [90] [20]\n    LE [-200] [0]\n    repeat (20)\n        change [camera // x v] by (((45) - (CAMERA // X)) / (10))\n    end\n    repeat (20)\n        change [camera // x v] by (((0) - (CAMERA // X)) / (5))\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID) = [LS]> then\n    show\n    switch costume to (stickshot1 v)\n    go to [front v] layer\n    go [backward v] (1) layers\n    repeat (18)\n        next costume\n    end\n    delete this clone\nend\n\ndefine LS (x) (y) (size) (dir) (colour)\nswitch costume to (// blank v)\nset [color v] effect to (colour)\ngo to x: (x) y: (y)\nset size to (size) %\npoint in direction (dir)\nClone [LS]\nset [color v] effect to (0)\ngo to x: (0) y: (0)\nset size to (100) %\npoint in direction (90)\nswitch costume to (text v)\n\nwhen I receive [intro v]\nwait (4.5) seconds\nLS [-50] [50] [100] [0] [190]\nLS [50] [50] [100] [0] [190]\nLS [0] [50] [100] [0] [210]\nLS [-50] [-50] [100] [180] [190]\nLS [50] [-50] [100] [180] [190]\nLS [0] [-5] [100] [180] [210]\nLE [150] [-150]\nLE [-150] [-150]\nLE [150] [150]\nLE [-150] [150]\n\nwhen I start as a clone\nif <(Clone ID) = [LE]> then\n    show\n    switch costume to (stickshot1 v)\n    go to [front v] layer\n    go [backward v] (1) layers\n    move (50) steps\n    repeat (18)\n        next costume\n    end\n    delete this clone\nend\n\ndefine LE Cloner (x) (y) (dir) (color)\nswitch costume to (// blank v)\nset size to (100) %\nset [color v] effect to (color)\ngo to x: (x) y: (y)\npoint in direction (dir)\nClone [LE]\nset [color v] effect to (0)\ngo to x: (0) y: (0)\nset size to (100) %\npoint in direction (90)\nswitch costume to (text v)\n\ndefine LE (x) (y)\nLE Cloner (x) (y) [0] [20]\nLE Cloner (x) (y) [180] [20]\nLE Cloner (x) (y) [45] [10]\nLE Cloner (x) (y) [-45] [10]\nLE Cloner (x) (y) [90] [20]\nLE Cloner (x) (y) [-90] [20]\nLE Cloner (x) (y) [135] [10]\nLE Cloner (x) (y) [-135] [10]\n\nwhen I receive [intro v]\nwait (3) seconds\nLE [100] [0]\nLE [-100] [0]\n\nwhen I receive [intro v]\nwait (3.5) seconds\nLE [0] [150]\nLE [0] [-150]\nLS [0] [0] [300] [-90] [20]\nLS [0] [0] [300] [90] [20]\n\nwhen I start as a clone\nif <(Clone ID) = [Text]> then\n    wait (8.7) seconds\n    go to x: (0) y: (0)\n    point in direction (90)\n    set [speed v] to [0]\n    set [speed 2 v] to [0]\n    repeat (30)\n        switch costume to (// blank v)\n        change [camera // y v] by (11)\n        change [camera // direction v] by (SPEED 2)\n        switch costume to (text v)\n        change [speed v] by ((-1) - ((CAMERA // Y) / (50)))\n        change [speed 2 v] by (0.1)\n    end\n    wait (1) seconds\n    delete this clone\nend\n\nwhen I receive [intro v]\nwait (6) seconds\nLE [0] [0]\nLE [150] [0]\nLE [-150] [0]\n\nwhen I receive [intro v]\nwait (7) seconds\nLE [150] [0]\nLE [-150] [0]\nLS [100] [0] [100] [90] [0]\nLS [100] [50] [100] [90] [20]\nLS [100] [-50] [100] [90] [20]\nLS [-100] [0] [100] [-90] [0]\nLS [-100] [50] [100] [-90] [20]\nLS [-100] [-50] [100] [-90] [20]\n\nwhen I start as a clone\nif < [LE LS] contains (Clone ID)?> then\n    forever\n        go to [front v] layer\n        go [backward v] (1) layers\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif < (Clone ID) contains [Bar]?> then\n    forever\n        go to [front v] layer\n    end\nend\n\n@Secret\n\nwhen I receive [start game v]\ngo to x: (0) y: (0)\ngo to [front v] layer\ngo [backward v] (1) layers\nshow\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (SCENE #))\n\nwhen I receive [you win! v]\nhide\n\nwhen flag clicked\nhide\n\n
STORYLINE:\nYou're trapped on this volcanic island and you find these orbs and collect them. In the orb number counter, when you get the max number of orbs, that means you collected all of the orbs and summoned something...\n––––––––––––––––––––––––––––––––––––––––\nINSTRUCTIONS:\n• Arrow Keys, WASD, or Joystick to run, jump (space can be used for jumping), & crouch\n• Wall Jump - by touching a wall and pressing 'up'\n• Jump Higher - by holding up for longer\n• Crouch - holding 'down'\n• Jump on enemies to defeat them\n• M - mute and unmute