Pies Hejko - Platformer  [Demo]

Instructions: Pies Hejko Platformer [Demo]\n\n\n

@Stage\n\nwhen flag clicked\nswitch backdrop to (sky v)\n\nwhen flag clicked\nforever\n    if <<<<(Scene #) = [12]> or <<<(Scene #) = [101]> or <(Scene #) = [102]>> or <<<<(Scene #) = [103]> or <(Scene #) = [104]>> or <<(Scene #) = [108]> or <(Scene #) = [109]>>> or <<<(Scene #) = [110]> or <(Scene #) = [111]>> or <<(Scene #) = [112]> or <(Scene #) = [113]>>>>>> or <(Scene #) = [13]>> or <<<<(Scene #) = [1]> or <(Scene #) = [2]>> or <<(Scene #) = [3]> or <(Scene #) = [4]>>> or <<<(Scene #) = [8]> or <(Scene #) = [9]>> or <<(Scene #) = [10]> or <(Scene #) = [11]>>>>> then\n        switch backdrop to (sky v)\n        stop all sounds\n        repeat until <not <<<<<(Scene #) = [1]> or <<(Scene #) = [2]> or <(Scene #) = [3]>>> or <<<(Scene #) = [4]> or <(Scene #) = [8]>> or <(Scene #) = [9]>>> or <<(Scene #) = [10]> or <(Scene #) = [11]>>> or <<<(Scene #) = [12]> or <<<(Scene #) = [101]> or <(Scene #) = [102]>> or <<<<(Scene #) = [103]> or <(Scene #) = [104]>> or <<(Scene #) = [108]> or <(Scene #) = [109]>>> or <<<(Scene #) = [110]> or <(Scene #) = [111]>> or <<(Scene #) = [112]> or <(Scene #) = [113]>>>>>> or <(Scene #) = [13]>>>>\n            play sound [Video Game 1 v] until done\n        end\n    end\nend\n\n\n\nwhen flag clicked\nforever\n    if <<<(Scene #) = [5]> or <<(Scene #) = [6]> or <(Scene #) = [7]>>> or <<<(Scene #) = [105]> or <(Scene #) = [106]>> or <(Scene #) = [107]>>> then\n        switch backdrop to (cave v)\n        stop all sounds\n        repeat until <not <<<(Scene #) = [5]> or <<(Scene #) = [6]> or <(Scene #) = [7]>>> or <<<(Scene #) = [105]> or <(Scene #) = [106]>> or <(Scene #) = [107]>>>>\n            play sound [Dance Snare Beat v] until done\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<(Scene #) = [14]> or <<(Scene #) = [15]> or <(Scene #) = [16]>>> or <<(Scene #) = [17]> or >> then\n        switch backdrop to (forest v)\n        stop all sounds\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<(Scene #) = [20]> or <<(Scene #) = [21]> or <(Scene #) = [22]>>> or <<(Scene #) = [23]> or <<<(Scene #) = [24]> or <(Scene #) = [25]>> or <(Scene #) = [26]>>>> then\n        switch backdrop to (desert v)\n        stop all sounds\n        repeat until <not <<<(Scene #) = [20]> or <<(Scene #) = [21]> or <(Scene #) = [22]>>> or <<(Scene #) = [23]> or <<<(Scene #) = [24]> or <(Scene #) = [25]>> or <(Scene #) = [26]>>>>>\n            play sound [Dance Sitar v] until done\n        end\n    end\nend\n\nrepeat until <not <(Scene #) = [13]>>\n    play sound [Video Game 1 v] until done\nend\n\nwhen flag clicked\nforever\n    if <<<(Scene #) = [114]> or <<(Scene #) = [115]> or <(Scene #) = [116]>>> or <<(Scene #) = [117]> or <<(Scene #) = [118]> or <(Scene #) = [119]>>>> then\n        switch backdrop to (sky v)\n    end\n    if <(Scene #) = [13]> then\n        switch backdrop to (sky2 v)\n    end\nend\n\nwhen flag clicked\n\n    switch backdrop to (sky v)\n    stop all sounds\n    repeat until \n        play sound [Video Game 1 v] until done\n    end\nend\n\nwhen I receive [lose life v]\n\nstart sound [Laugh3 v]\n\nwait (0.9) seconds\n\nwhen flag clicked\nforever\n    if <(Scene #) = [19]> then\n        switch backdrop to (forest2 v)\n        stop all sounds\n    end\nend\n\n@Hejko\n\nwhen flag clicked\nbroadcast (Main Menu v)\n\ndefine Move - in steps (steps)\nchange [falling v] by (1)\nrepeat (steps)\n    set [last value v] to (x position)\n    change x by ((speed x) / (steps))\n    Check Touching Solid\n    if <(touching) > [0]> then\n        Collide X - Slope or Wall?\n    end\n    set [last value v] to (y position)\n    change y by ((speed y) / (steps))\n    Check Touching Solid\n    if <(touching) > [0]> then\n        Collide Y - Celling or Floor\n    end\nend\n\ndefine Check Touching Solid\nif <<touching (level v)?> or <touching (platform v)?>> then\n    set [touching v] to [1]\nelse\n    set [touching v] to [0]\nend\n\nwhen I receive [tick - player v]\nMoved By Moving Platform\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 <key (up arrow v) pressed?> 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 (Graviity)\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\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 (<key (right arrow v) pressed?> - <key (left arrow v) pressed?>)\nif <(KEY X) = [0]> then\n    if <<(falling) > [2]> and <(wall slide) < [1]>> then\n        set [speed x v] to ((speed x) * (0.98))\n        stop [this script v]\n    end\n    if <([abs v] of (speed x) ) < [1]> then\n        set [frame v] to [0]\n        set [speed x v] to [0]\n    else\n        change [frame v] by (0.5)\n    end\nelse\n    change [speed x v] by ((KEY X) * (ACCELERATION))\n    point in direction ((KEY X) * (90))\n    change [frame v] by (1)\nend\nset [speed x v] to ((speed x) * (RESISTANCE))\n\ndefine Reset and Begin Level\nset [stop music v] to [0]\nset [invulnerable v] to [0]\nset [scene # v] to [1]\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]\npoint in direction (90)\nBegin Scene # (SPAWN SCENE) go to x, y: (SPAWN X) (SPAWN Y)\n\nwhen I receive [game loop v]\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 - Last v)\nend\n\nwhen I receive [tick - last v]\nif <(x position) > [235]> then\n    Begin Scene # ((Scene #) + (1)) go to x, y: [-235] []\nend\nif <(x position) < [-235]> then\n    Begin Scene # ((Scene #) + (-1)) go to x, y: [235] []\nend\nif <(y position) > [180]> then\n    Begin Scene # ((Scene #) + (100)) go to x, y: [] [-160]\nend\nif <(y position) = [-178]> then\n    Begin Scene # ((Scene #) + (-100)) go to x, y: [] [180]\nend\nif <<touching (danger 2 v)?> or <touching (danger v)?>> then\n    broadcast (Lose Life v)\nend\n\ndefine Begin Scene # (scene #) go to x, y: (x) (y)\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 directions [0]\nelse\n    Fix collision in directions [90]\nend\nSet Costume\nbroadcast (Game Loop v)\n\ndefine Fix collision in directions (dir)\nset [temp v] to (direction)\nset [distance v] to [1]\npoint in direction (dir)\nrepeat (128)\n    Check 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\n\ndefine Collide X - Slope or Wall?\nCheck Can Wall Slide\nchange y by (1)\nCheck Touching Solid\nif <(touching) > [0]> then\n    change y by (1)\n    Check 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.8))\nend\nset [speed x v] to ((speed x) * (0.95))\nSlip\n\ndefine Collide Y - Celling 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 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 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\nwhen I receive [tick - first v]\nswitch costume to (hitbox v)\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 (hangon01 v)\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 (run_j2 v)\n    end\n    stop [this script v]\nend\nif <(frame) > [0]> then\n    switch costume to ((1) + ([floor v] of ((frame) mod (5)) ))\nelse\n    switch costume to (stand v)\nend\nif <(wall slide) > [0]> then\n    switch costume to (hangon01 v)\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 (run_j2 v)\n    end\n    stop [this script v]\nend\nif <(frame) > [0]> then\n    switch costume to ((1) + ([floor v] of ((frame) mod (5)) ))\nelse\n    switch costume to (stand v)\nend\n\ndefine Check Can Wall Slide\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 Touching Solid\nset [wall slide v] to (touching)\nswitch costume to (hitbox v2 v)\nset rotation style [don't rotate v]\n\nwhen I receive [lose life v]\nset [invulnerable v] to [1]\nstop [other scripts in sprite v]\nwait (0.76) seconds\nstart sound [Laugh3 v]\nswitch costume to (lose v)\nglide (1.5) secs to x: (x position) y: (180)\nrepeat (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 Touching Solid\nif <(touching) > [0]> then\n    Find Closest Space to (x position) (y position) max [16]\n    if <(touching) > [0]> then\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 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]\npoint in direction (90)\ngo to [front v] layer\nset rotation style [left-right v]\nset [graviity v] to [-1.5]\nset [jump force v] to [15]\nset [jump duration v] to [6]\nset [acceleration v] to [2]\nset [resistance v] to [0.8]\nbroadcast (Reset Game v) and wait\nbroadcast (Setup v) and wait\nset [lives v] to [5]\nset [spawn scene v] to [1]\nset [spawn x v] to [-50]\nset [spawn y v] to [20]\nReset and Begin Level\n\nwhen flag clicked\nhide variable [bones v]\nhide variable [lives v]\nhide variable [scene # v]\n\nwhen I receive [start game v]\nshow variable [bones v]\nshow variable [lives v]\nshow variable [scene # v]\n\nwhen I receive [player - bounce v]\nset [speed y v] to [10]\n\nstop all sounds\n\n@Level\n\nwhen flag clicked\nset [scene # v] to [0]\nswitch costume to (0 v)\ngo to x: (0) y: (0)\ngo to [back v] layer\n\nwhen I receive [change scene v]\nswitch costume to (join [Scene] (Scene #))\n\n@Danger\n\nwhen flag clicked\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 #))\n\n@Danger 2\n\nwhen flag clicked\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 #))\nif <(Scene #) = [3]> then\n    forever\n        set y to ((5) * ([sin v] of ((timer) * (180)) ))\n    end\nend\nif <(Scene #) = [4]> then\n    forever\n        set y to ((5) * ([sin v] of ((timer) * (180)) ))\n    end\nend\nif <(Scene #) = [107]> then\n    forever\n        set y to ((5) * ([sin v] of ((timer) * (180)) ))\n    end\nend\nif <(Scene #) = [23]> then\n    forever\n        set y to ((5) * ([sin v] of ((timer) * (180)) ))\n    end\nend\n\n@Platform\n\ndefine Animated Platform\npoint in direction (90)\ngo to x: (-150) y: (83)\nforever\n    glide (2) secs to x: (-151) y: (-73)\n    wait (1) seconds\n    glide (2) secs to x: (-151) y: (83)\n    wait (1) seconds\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 <(new y) > (last y)> then\n    change y by (1)\nelse\n    set y to ((last y) + (1))\nend\nif <touching (hejko v)?> then\n    set [platform dx v] to ((new x) - (last x))\n    set [platform dy v] to ((new y) - (last y))\nend\ngo to x: (new x) y: (new y)\n\ndefine Animate 2\nswitch costume to (costume2 v)\ngo to x: (-105) y: (-5)\nforever\n    glide (2) secs to x: (-105) y: (150)\n    wait (1) seconds\n    glide (2) secs to x: (-105) y: (-5)\n    wait (1) seconds\nend\n\nwhen I receive [change scene v]\nswitch costume to (costume1 v)\ngo to [back v] layer\nhide\nforever\n    if <(Scene #) = [102]> then\n        Door at [-58] [-114] key [Key 1]\n    end\n    if <(Scene #) = [1]> then\n        show\n        Animated Platform\n    end\n    if <(Scene #) = [3]> then\n        show\n        Animate 2\n    end\nend\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 (hejko v)?>\n    if <[collected v] contains (key name)?> then\n        start sound [Buzz Whir v]\n        repeat (24)\n            change y by (4)\n        end\n        wait (1) seconds\n        start sound [Buzz Whir v]\n        repeat (24)\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 (hejko v)?>>\nend\n\ndefine Animated 3\n\nif <(Scene #) = [24]> then\n    show\n    Animated 3\nend\n\n@Collectable\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 (hejko 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]) = [bone]> or <(costume [number v]) = [Apple]>> then\n    start sound [Chomp v]\n    change [bones v] by (1)\nelse\n    if <(costume [name v]) = [Green Flag]> then\n        start sound [Collect v]\n        set [spawn scene v] to (Scene #)\n        set [spawn x v] to ([x position v] of [hejko v])\n        set [spawn y v] to ([y position v] of [hejko v])\n    else\n        start sound [Collect v]\n        add (costume [name v]) to [collected v]\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 [frame v] to [0]\nset [bones v] to [0]\nhide\nPlace [bone] scene [1] xy [63] [-26]\nPlace [bone] scene [1] xy [190] [7]\nPlace [bone] scene [2] xy [-20] [48]\nPlace [bone] scene [101] xy [-115] [88]\nPlace [Key 1] scene [102] xy [216] [-83]\nPlace [golden bone] scene [101] xy [25] [-122]\nPlace [Green Flag] scene [3] xy [57] [69]\nPlace [Green Flag] scene [8] xy [-70] [-10]\nPlace [bone] scene [3] xy [195] [90]\nPlace [bone] scene [4] xy [-72] [25]\nPlace [bone] scene [4] xy [195] [30]\nPlace [bone] scene [5] xy [27] [-30]\nPlace [bone] scene [6] xy [55] [55]\nPlace [bone] scene [8] xy [100] [77]\nPlace [bone] scene [9] xy [100] [77]\nPlace [bone] scene [10] xy [-130] [-20]\nPlace [bone] scene [10] xy [-130] [40]\nPlace [bone] scene [10] xy [-65] [-20]\nPlace [bone] scene [10] xy [-65] [40]\nPlace [bone] scene [11] xy [-7] [15]\nPlace [bone] scene [11] xy [101] [85]\nPlace [bone] scene [11] xy [-39] [160]\nPlace [bone] scene [12] xy [-135] [-25]\nPlace [bone] scene [102] xy [-145] [-10]\nPlace [bone] scene [103] xy [-187] [-75]\nPlace [bone] scene [104] xy [-153] [-35]\nPlace [bone] scene [104] xy [162] [-55]\nPlace [bone] scene [105] xy [25] [0]\nPlace [bone] scene [106] xy [20] [80]\nPlace [bone] scene [108] xy [0] [0]\nPlace [bone] scene [109] xy [97] [-90]\nPlace [bone] scene [109] xy [-148] [15]\nPlace [Green Flag] scene [13] xy [33] [-20]\n\ndefine Place (costume name) scene (scene) xy (x) (y)\nset [my scene v] to (scene)\nswitch costume to (costume name)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\nset [my scene v] to []\n\nwhen I receive [reset game v]\ndelete this clone\n\n@Splash Screen\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (main menu v)\ngo to [front v] layer\nshow\n\nwhen I receive [game over v]\nstart sound [Lose v]\ngo to x: (0) y: (0)\nswitch costume to (game over v)\ngo to [front v] layer\nshow\nbroadcast (Main Menu v)\n\nwhen I receive [start game v]\nhide\n\n@Main Menu\n\nwhen I receive [main menu v]\nwait (0.1) seconds\ngo to [front v] layer\nshow\nset size to (10) %\ngo to x: (0) y: (-90)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by ((0.2) * ((110) - (size)))\n    else\n        change size by ((0.2) * ((100) - (size)))\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <(Scene #) = [0]> then\n        play sound [Dance Celebrate v] until done\n    end\nend\n\nwhen this sprite clicked\nstop all sounds\nhide\nbroadcast (Start Game v)\n\n@Enemy\n\nwhen flag clicked\nset rotation style [left-right v]\nhide\n\nwhen I receive [change scene v]\nif <(Scene #) = [1]> then\n    if <([x position v] of [hejko v]) < [50]> then\n        Spawn [Red] at [190] [-80] dir [-90]\n    else\n        Spawn [Red] at [66] [-80] dir [-90]\n    end\n    if <([x position v] of [hejko v]) < [50]> then\n        Spawn [Red] at [185] [0] dir [-90]\n    else\n        Spawn [Red] at [145] [0] dir [-90]\n    end\nend\nif <(Scene #) = [2]> then\n    Spawn [Red] at [15] [-80] dir [-90]\nend\nif <(Scene #) = [4]> then\n    Spawn [Red] at [-33] [43] dir [-90]\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 (red1 v)\n    set rotation style [don't rotate v]\n    Move - Down\n    Move - Left or Right\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 (hejko v)?>> then\n        Touching Player\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)?>>\n    change y by (1)\n    set [speed y v] to [0]\nend\n\ndefine Move - Left or Right\nmove (2) steps\nrepeat (4)\n    if <not <<touching (level v)?> or <touching (_edge_ v)?>>> then\n        if <<not <touching (safe zones v)?>> or <touching (platform v)?>> then\n            stop [this script v]\n        end\n    end\n    change y by (1)\nend\nchange y by (-4)\nmove (-2) steps\nturn right (180) degrees\n\ndefine Touching Player\nif <([speed y v] of [hejko v]) < [-3]> then\n    broadcast (Player - Bounce v)\n    start sound [Pop v]\n    switch costume to (red squish v)\n    wait (0.3) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\nbroadcast (Lose Life v)\n\ndefine Spawn (type) at (x) (y) dir (dir)\ngo to x: (x) y: (y)\npoint in direction (dir)\ncreate clone of (_myself_ v)\n\n@Safe Zones\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\nset [ghost v] effect to (100)\n\nwhen I receive [change scene v]\nswitch costume to (scene1 v)\nswitch costume to (join [Scene] (Scene #))\nforever\n    if <(Scene #) = [1]> then\n        switch costume to (scene1 v)\n        switch costume to (join [Scene] (Scene #))\n    end\n    if <(Scene #) = [2]> then\n        switch costume to (scene2 v)\n        switch costume to (join [Scene] (Scene #))\n    end\n    if <(Scene #) = [4]> then\n        switch costume to (scene4 v)\n        switch costume to (join [Scene] (Scene #))\n    end\nend\n\nset [ghost v] effect to (0)\n\n@Music\n\nwhen I receive [lose life v]\nstop all sounds\nwait (0.9) seconds\n\n@miniaturka\n\ngo to [front v] layer\n\nshow\n\nwhen flag clicked\nhide\n\n