Cube Adventure || Scrolling Platformer
@Stage\n\nwhen I receive [level v]\nstop all sounds\nforever\n    if <(Page) = [2]> then\n        play sound [Piano v] until done\n    end\nend\n\nwhen I receive [level 2 v]\nstop all sounds\nforever\n    if <(Page) = [3]> then\n        play sound [TheFatRat - Prelude \(Jackpot EP Track 3\) v] until done\n    end\nend\n\nwhen I receive [level 3 v]\nstop all sounds\nforever\n    if <(Page) = [4]> then\n        play sound [Vexento - Pixel Party v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Page) = [1]> then\n        stop all sounds\n    end\nend\n\nwhen flag clicked\nforever\n    reset timer\nend\n\nwhen flag clicked\nbroadcast (GO v)\n\n@Player\n\nwhen I receive [platformer v]\nif <(cl) = [0]> then\n    Platformer\n    create clone of (_myself_ v)\n    broadcast (Lvl v)\nend\n\ndefine Platformer\nchange x by (Xspeed)\nif <touching color (#4ec254)?> then\n    repeat (8)\n        if <touching color (#4ec254)?> then\n            change y by (1)\n        end\n    end\n    if <touching color (#4ec254)?> then\n        change y by (-8)\n        repeat until <not <touching color (#4ec254)?>>\n            change x by ((0) - ((Xspeed) / ([abs v] of (Xspeed) )))\n        end\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > (y position)> and <mouse down?>>>> then\n            set [xspeed v] to ((15) * ((0) - ((Xspeed) / ([abs v] of (Xspeed) ))))\n            set [yspeed v] to [12]\n        else\n            set [xspeed v] to [0]\n        end\n    end\nend\nchange [xspeed v] by ((2) * (<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> - <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>>))\nchange [xspeed v] by (<(Xspeed) < [0]> - <(Xspeed) > [0]>)\nchange [xspeed v] by (<(Xspeed) < [-10]> - <(Xspeed) > [10]>)\nchange y by (Yspeed)\nif <touching color (#4ec254)?> then\n    repeat until <not <touching color (#4ec254)?>>\n        change y by ((0) - ((Yspeed) / ([abs v] of (Yspeed) )))\n    end\n    if <<(Yspeed) < [0]> and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > (y position)> and <mouse down?>>>>> then\n        set [yspeed v] to [14]\n    else\n        set [yspeed v] to [0]\n    end\nend\nif <touching color (#9e4ec2)?> then\n    set [xspeed v] to [0]\n    set [yspeed v] to [0]\n    broadcast (Next Level v)\nend\nif <<<<touching color (#ff5300)?> or <touching color (#525252)?>> or <touching color (#838383)?>> or <touching color (#0e0e0e)?>> then\n    set [xspeed v] to [0]\n    set [yspeed v] to [0]\n    set [scrollx v] to [-600]\n    set y to (0)\nend\nchange [yspeed v] by (-1)\nset x to (0)\n\nwhen I start as a clone\nset [cl v] to [1]\nset [trail v] to (ScrollX)\nswitch costume to (join [costume] (Player))\nset [ghost v] effect to (30)\nrepeat (10)\n    change [ghost v] effect by (7)\n    change size by (-5)\n    set x to ((ScrollX) - (Trail))\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    if <(Page) = [1]> then\n        hide\n    end\nend\n\nwhen I receive [play v]\nset rotation style [don't rotate v]\nforever\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        point in direction (90)\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n        point in direction (-90)\n    end\n    if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > (y position)> and <mouse down?>>>> then\n        point in direction (0)\n    end\nend\n\nwhen I receive [play v]\nforever\n    change [scrollx v] by ((Xspeed) - ((Xspeed) * (2)))\nend\n\nwhen I receive [play v]\nset [cl v] to [0]\nset [scrollx v] to [-600]\nset [xspeed v] to [0]\nset [yspeed v] to [0]\ngo to x: (0) y: (0)\nshow\nforever\n    broadcast (Platformer v)\nend\n\nwhen flag clicked\nforever\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        switch costume to (join [destra] (Player))\n    else\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n            switch costume to (join [sinistra] (Player))\n        else\n            switch costume to (join [] (Player))\n        end\n    end\nend\n\nwhen flag clicked\nset [scrollx v] to [-600]\n\nwhen flag clicked\nforever\n    set x to (0)\nend\n\n@Level\n\ndefine Crea il percorso (pezzo di percorso)\nset [clone v] to ((pezzo di percorso) + (1))\nswitch costume to (pezzo di percorso)\ngo to [back v] layer\nforever\n    if <not <[-3557] > (ScrollX)>> then\n        forever\n            if <(Page) = [2]> then\n                set x to ((ScrollX) + ((480) * (pezzo di percorso)))\n                if <<(ScrollX) > (join [-] ((480) * ((pezzo di percorso) + (1))))> and <(ScrollX) < (join [-] ((480) * (1)))>> then\n                    show\n                else\n                    hide\n                end\n            else\n                delete this clone\n            end\n        end\n    else\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [1]> then\n    Crea il percorso [1]\nelse\n    if <(Clone) = [2]> then\n        Crea il percorso [2]\n    else\n        if <(Clone) = [3]> then\n            Crea il percorso [3]\n        else\n            if <(Clone) = [4]> then\n                Crea il percorso [4]\n            else\n                if <(Clone) = [5]> then\n                    Crea il percorso [5]\n                else\n                    if <(Clone) = [6]> then\n                        Crea il percorso [6]\n                    else\n                        if <(Clone) = [7]> then\n                            Crea il percorso [7]\n                        else\n                            if <(Clone) = [8]> then\n                                set [clone v] to ((9) + (1))\n                                switch costume to (8 v)\n                                go to [back v] layer\n                                forever\n                                    if <not <[-3559] > (ScrollX)>> then\n                                        set x to ((ScrollX) + ((480) * (8)))\n                                        if <<(Page) = [2]> and <<(ScrollX) > [-4320]> and <(ScrollX) < [-3360]>>> then\n                                            show\n                                        else\n                                            hide\n                                        end\n                                    else\n                                        delete this clone\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [level v]\nwait until <[-3557] > (ScrollX)>\nbroadcast (Fine livello v)\n\nwhen I receive [level v]\nset [clone v] to [1]\nrepeat (8)\n    create clone of (_myself_ v)\n    wait (0.05) seconds\nend\n\n@Level2\n\ndefine Crea il percorso (pezzo di percorso)\nset [clone v] to ((pezzo di percorso) + (1))\nswitch costume to (pezzo di percorso)\ngo to [back v] layer\nforever\n    if <not <[-4039] > (ScrollX)>> then\n        forever\n            if <(Page) = [3]> then\n                set x to ((ScrollX) + ((480) * (pezzo di percorso)))\n                if <<(ScrollX) > (join [-] ((480) * ((pezzo di percorso) + (1))))> and <(ScrollX) < (join [-] ((480) * ((pezzo di percorso) - (1))))>> then\n                    show\n                else\n                    hide\n                end\n            else\n                delete this clone\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [1]> then\n    Crea il percorso [1]\nelse\n    if <(Clone) = [2]> then\n        Crea il percorso [2]\n    else\n        if <(Clone) = [3]> then\n            Crea il percorso [3]\n        else\n            if <(Clone) = [4]> then\n                Crea il percorso [4]\n            else\n                if <(Clone) = [5]> then\n                    Crea il percorso [5]\n                else\n                    if <(Clone) = [6]> then\n                        Crea il percorso [6]\n                    else\n                        if <(Clone) = [7]> then\n                            Crea il percorso [7]\n                        else\n                            if <(Clone) = [8]> then\n                                Crea il percorso [8]\n                            else\n                                if <(Clone) = [9]> then\n                                    Crea il percorso [9]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [level 2 v]\nwait until <[-4039] > (ScrollX)>\nbroadcast (Fine livello 2 v)\n\nwhen I receive [level 2 v]\nset [clone v] to [1]\nrepeat (9)\n    create clone of (_myself_ v)\n    wait (0.2) seconds\nend\n\n@Level3\n\ndefine Crea il percorso (pezzo di percorso)\nset [clone v] to ((pezzo di percorso) + (1))\nswitch costume to (pezzo di percorso)\ngo to [back v] layer\nforever\n    if <not <[-4517] > (ScrollX)>> then\n        forever\n            if <(Page) = [4]> then\n                set x to ((ScrollX) + ((480) * (pezzo di percorso)))\n                if <<(ScrollX) > (join [-] ((480) * ((pezzo di percorso) + (1))))> and <(ScrollX) < (join [-] ((480) * ((pezzo di percorso) - (1))))>> then\n                    show\n                else\n                    hide\n                end\n            else\n                delete this clone\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [1]> then\n    Crea il percorso [1]\nelse\n    if <(Clone) = [2]> then\n        Crea il percorso [2]\n    else\n        if <(Clone) = [3]> then\n            Crea il percorso [3]\n        else\n            if <(Clone) = [4]> then\n                Crea il percorso [4]\n            else\n                if <(Clone) = [5]> then\n                    Crea il percorso [5]\n                else\n                    if <(Clone) = [6]> then\n                        Crea il percorso [6]\n                    else\n                        if <(Clone) = [7]> then\n                            Crea il percorso [7]\n                        else\n                            if <(Clone) = [8]> then\n                                Crea il percorso [8]\n                            else\n                                if <(Clone) = [9]> then\n                                    Crea il percorso [9]\n                                else\n                                    if <(Clone) = [10]> then\n                                        Crea il percorso [10]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [level 3 v]\nwait until <[-4517] > (ScrollX)>\nbroadcast (Fine livello 3 v)\n\nwhen I receive [level 3 v]\nset [clone v] to [1]\nrepeat (10)\n    create clone of (_myself_ v)\n    wait (0.2) seconds\nend\n\n@Sprite1\n\nwhen flag clicked\nset [page v] to [1]\n\nwhen flag clicked\ngo to x: (0) y: (-50)\n\nwhen this sprite clicked\nbroadcast (Play v)\n\nwhen flag clicked\nforever\n    if <(Page) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (130) %\n    else\n        set size to (100) %\n    end\nend\n\nwhen this sprite clicked\nif <(Level) = [1]> then\n    broadcast (Level v)\n    set [page v] to [2]\nend\n\nwhen flag clicked\nset [level v] to [1]\n\nwhen this sprite clicked\nif <(Level) = [2]> then\n    broadcast (Level 2 v)\n    set [page v] to [3]\nend\n\nwhen this sprite clicked\nif <(Level) = [3]> then\n    broadcast (Level 3 v)\n    set [page v] to [4]\nend\n\n@Player HOME\n\nwhen flag clicked\nforever\n    if <(Page) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (6 v)\ngo to x: (-140) y: (85)\n\nwhen flag clicked\nforever\n    if <(Player) = [1]> then\n        switch costume to (6 v)\n    else\n        switch costume to (2 v)\n        if <(Player) = [2]> then\n            set [color v] effect to (0)\n        else\n            if <(Player) = [3]> then\n                set [color v] effect to (12)\n            else\n                if <(Player) = [4]> then\n                    set [color v] effect to (28)\n                else\n                    if <(Player) = [5]> then\n                        set [color v] effect to (65)\n                    else\n                        if <(Player) = [6]> then\n                            set [color v] effect to (80)\n                        else\n                            if <(Player) = [7]> then\n                                set [color v] effect to (135)\n                            else\n                                if <(Player) = [8]> then\n                                    set [color v] effect to (150)\n                                else\n                                    if <(Player) = [9]> then\n                                        set [color v] effect to (170)\n                                    else\n                                        if <(Player) = [10]> then\n                                            set [color v] effect to (180)\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nforever\n    if <(Page) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Sprite3\n\nwhen flag clicked\nforever\n    if <(Page) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\n@Sprite4\n\nwhen flag clicked\nforever\n    if <(Page) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\n@Sprite5\n\nwhen flag clicked\ngo to x: (-100) y: (85)\n\nwhen flag clicked\nforever\n    if <(Page) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nset [player v] to [1]\n\nwhen this sprite clicked\nif <(Player) < [10]> then\n    change [player v] by (1)\nelse\n    set [player v] to [1]\nend\n\n@Sprite7\n\nwhen flag clicked\ngo to x: (220) y: (85)\n\nwhen flag clicked\nforever\n    if <(Page) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <(Level) < [3]> then\n    change [level v] by (1)\nelse\n    set [level v] to [1]\nend\n\n@Sprite6\n\nwhen flag clicked\ngo to x: (-180) y: (85)\npoint in direction (-90)\n\nwhen flag clicked\nforever\n    if <(Page) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <(Player) > [1]> then\n    change [player v] by (-1)\nelse\n    set [player v] to [10]\nend\n\n@Sprite8\n\nwhen flag clicked\ngo to x: (60) y: (85)\npoint in direction (-90)\n\nwhen flag clicked\nforever\n    if <(Page) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <(Level) > [1]> then\n    change [level v] by (-1)\nelse\n    set [level v] to [3]\nend\n\n@Sprite9\n\nwhen flag clicked\nswitch costume to (trampolino basso v)\n\nwhen flag clicked\nforever\n    wait until <touching (player v)?>\n    set [yspeed v] to (Potenza trampolino)\n    wait (0.3) seconds\nend\n\nwhen flag clicked\nset y to (-60)\nforever\n    set x to ((ScrollX) + ((480) * (4.4)))\n    if <<(Page) = [2]> and <<(ScrollX) < [-1840]> and <(ScrollX) > [-2350]>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        switch costume to (trampolino medio v)\n        wait (0.08) seconds\n        switch costume to (trampolino alto v)\n        wait (0.08) seconds\n        switch costume to (trampolino medio v)\n        wait (0.08) seconds\n        switch costume to (trampolino basso v)\n        wait (0.4) seconds\n    end\nend\n\n@Sprite10\n\nwhen I receive [fine livello v]\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\nwait until <not <(Page) = [2]>>\nhide\n\nwhen flag clicked\nhide\n\n@Sprite11\n\nwhen flag clicked\nforever\n    if <<(Page) = [2]> and <<(ScrollX) < [-1592]> and <(ScrollX) > [-2155]>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    turn right (10) degrees\nend\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    set x to ((ScrollX) + ((480) * (3.9)))\nend\n\n@Sprite12\n\nwhen flag clicked\nswitch costume to (trampolino basso v)\n\nwhen flag clicked\nforever\n    wait until <touching (player v)?>\n    set [yspeed v] to (Potenza trampolino)\n    wait (0.3) seconds\nend\n\nwhen flag clicked\nset y to (-60)\nforever\n    set x to ((ScrollX) + ((480) * (1.7)))\n    if <<(Page) = [3]> and <(ScrollX) > [-1100]>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        switch costume to (trampolino medio v)\n        wait (0.08) seconds\n        switch costume to (trampolino alto v)\n        wait (0.08) seconds\n        switch costume to (trampolino medio v)\n        wait (0.08) seconds\n        switch costume to (trampolino basso v)\n        wait (0.4) seconds\n    end\nend\n\n@Sprite13\n\nwhen I receive [fine livello 2 v]\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\nwait until <not <(Page) = [3]>>\nhide\n\nwhen flag clicked\nhide\n\n@Sprite15\n\nwhen flag clicked\nswitch costume to (costume2 v)\n\nwhen flag clicked\nforever\n    wait until <touching (player v)?>\n    set [yspeed v] to (Potenza trampolino)\n    wait (0.3) seconds\nend\n\nwhen flag clicked\nset y to (-60)\nforever\n    set x to ((ScrollX) + ((480) * (4.55)))\n    if <<(Page) = [3]> and <<(ScrollX) < [-1935]> and <(ScrollX) > [-2500]>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (trampolino basso v)\nforever\n    if <touching (player v)?> then\n        switch costume to (trampolino medio v)\n        wait (0.08) seconds\n        switch costume to (trampolino alto v)\n        wait (0.08) seconds\n        switch costume to (trampolino medio v)\n        wait (0.08) seconds\n        switch costume to (trampolino basso v)\n        wait (0.4) seconds\n    end\nend\n\n@Sprite16\n\nwhen flag clicked\nforever\n    if <<(Page) = [3]> and <<(ScrollX) < [-1400]> and <(ScrollX) > [-1980]>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    turn right (10) degrees\nend\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    set x to ((ScrollX) + ((480) * (3.55)))\nend\n\n@Sprite17\n\nwhen flag clicked\nforever\n    if <<(Page) = [3]> and <<(ScrollX) < [-2648]> and <(ScrollX) > [-3210]>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    turn right (10) degrees\nend\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    set x to ((ScrollX) + ((480) * (6.1)))\nend\n\n@Sprite18\n\nwhen flag clicked\nforever\n    if <<(Page) = [3]> and <<(ScrollX) < [-3350]> and <(ScrollX) > [-3940]>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    turn right (10) degrees\nend\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    set x to ((ScrollX) + ((480) * (7.5)))\nend\n\n@Sprite14\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <not <<<(Page) = [1]> or <(Page) = [4]>> or <(Page) = [0]>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ngo to x: (170) y: (-135)\n\nwhen this sprite clicked\nif <(Level) = [1]> then\n    set [level v] to [2]\n    change [page v] by (1)\n    broadcast (Level 2 v)\n    broadcast (Play v)\nelse\n    if <(Level) = [2]> then\n        set [level v] to [3]\n        change [page v] by (1)\n        broadcast (Level 3 v)\n        broadcast (Play v)\n    end\nend\n\nwhen I receive [fine livello v]\nwait (0.1) seconds\ngo to [front v] layer\n\nwhen I receive [fine livello 2 v]\nwait (0.1) seconds\ngo to [front v] layer\n\n@Sprite19\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <not <<(Page) = [1]> or <(Page) = [0]>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ngo to x: (-170) y: (-135)\n\nwhen this sprite clicked\nset [page v] to [1]\n\nwhen I receive [fine livello v]\nwait (0.1) seconds\ngo to [front v] layer\n\nwhen I receive [fine livello 2 v]\nwait (0.1) seconds\ngo to [front v] layer\n\nwhen I receive [fine livello 3 v]\nwait (0.1) seconds\ngo to [front v] layer\n\n@Sprite21\n\nwhen I receive [fine livello 3 v]\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\nwait until <not <(Page) = [4]>>\nhide\n\nwhen flag clicked\nhide\n\n@Sprite20\n\nwhen flag clicked\nswitch costume to (costume2 v)\n\nwhen flag clicked\nforever\n    wait until <touching (player v)?>\n    set [yspeed v] to (Potenza trampolino)\n    wait (0.3) seconds\nend\n\nwhen flag clicked\nset y to (-58)\nforever\n    set x to ((ScrollX) + ((480) * (2.4)))\n    if <<(Page) = [4]> and <<(ScrollX) < [-900]> and <(ScrollX) > [-1400]>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (trampolino basso v)\nforever\n    if <touching (player v)?> then\n        switch costume to (trampolino medio v)\n        wait (0.08) seconds\n        switch costume to (trampolino alto v)\n        wait (0.08) seconds\n        switch costume to (trampolino medio v)\n        wait (0.08) seconds\n        switch costume to (trampolino basso v)\n        wait (0.4) seconds\n    end\nend\n\n@Sprite22\n\nwhen flag clicked\nswitch costume to (costume2 v)\n\nwhen flag clicked\nforever\n    wait until <touching (player v)?>\n    set [yspeed v] to (Potenza trampolino)\n    wait (0.3) seconds\nend\n\nwhen flag clicked\nset y to (-60)\nforever\n    set x to ((ScrollX) + ((480) * (3.85)))\n    if <<(Page) = [4]> and <<(ScrollX) < [-1600]> and <(ScrollX) > [-2100]>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (trampolino basso v)\nforever\n    if <touching (player v)?> then\n        switch costume to (trampolino medio v)\n        wait (0.08) seconds\n        switch costume to (trampolino alto v)\n        wait (0.08) seconds\n        switch costume to (trampolino medio v)\n        wait (0.08) seconds\n        switch costume to (trampolino basso v)\n        wait (0.4) seconds\n    end\nend\n\n@Sprite23\n\nwhen flag clicked\nswitch costume to (costume2 v)\n\nwhen flag clicked\nforever\n    wait until <touching (player v)?>\n    set [yspeed v] to (Potenza trampolino)\n    wait (0.3) seconds\nend\n\nwhen flag clicked\nset y to (-58)\nforever\n    set x to ((ScrollX) + ((480) * (4.92)))\n    if <<(Page) = [4]> and <<(ScrollX) < [-2100]> and <(ScrollX) > [-2600]>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (trampolino basso v)\nforever\n    if <touching (player v)?> then\n        switch costume to (trampolino medio v)\n        wait (0.08) seconds\n        switch costume to (trampolino alto v)\n        wait (0.08) seconds\n        switch costume to (trampolino medio v)\n        wait (0.08) seconds\n        switch costume to (trampolino basso v)\n        wait (0.4) seconds\n    end\nend\n\n@Sprite24\n\nwhen flag clicked\nswitch costume to (costume2 v)\n\nwhen flag clicked\nforever\n    wait until <touching (player v)?>\n    set [yspeed v] to (Potenza trampolino)\n    wait (0.3) seconds\nend\n\nwhen flag clicked\nset y to (-58)\nforever\n    set x to ((ScrollX) + ((480) * (5.2)))\n    if <<(Page) = [4]> and <<(ScrollX) < [-2270]> and <(ScrollX) > [-2770]>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (trampolino basso v)\nforever\n    if <touching (player v)?> then\n        switch costume to (trampolino medio v)\n        wait (0.08) seconds\n        switch costume to (trampolino alto v)\n        wait (0.08) seconds\n        switch costume to (trampolino medio v)\n        wait (0.08) seconds\n        switch costume to (trampolino basso v)\n        wait (0.4) seconds\n    end\nend\n\n@Sprite25\n\nwhen flag clicked\nswitch costume to (costume2 v)\n\nwhen flag clicked\nforever\n    wait until <touching (player v)?>\n    set [yspeed v] to (Potenza trampolino)\n    wait (0.3) seconds\nend\n\nwhen flag clicked\nset y to (-58)\nforever\n    set x to ((ScrollX) + ((480) * (5.5)))\n    if <<(Page) = [4]> and <<(ScrollX) < [-2350]> and <(ScrollX) > [-2850]>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (trampolino basso v)\nforever\n    if <touching (player v)?> then\n        switch costume to (trampolino medio v)\n        wait (0.08) seconds\n        switch costume to (trampolino alto v)\n        wait (0.08) seconds\n        switch costume to (trampolino medio v)\n        wait (0.08) seconds\n        switch costume to (trampolino basso v)\n        wait (0.4) seconds\n    end\nend\n\n@Sprite26\n\nwhen flag clicked\nforever\n    if <<(Page) = [4]> and <<(ScrollX) < [-1450]> and <(ScrollX) > [-2000]>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    turn right (10) degrees\nend\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    set x to ((ScrollX) + ((480) * (3.65)))\nend\n\n@Sprite27\n\nwhen flag clicked\nforever\n    if <<(Page) = [4]> and <<(ScrollX) < [-3657]> and <(ScrollX) > [-4200]>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    turn right (10) degrees\nend\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    set x to ((ScrollX) + ((480) * (8.25)))\nend\n\n@Player2\n\nwhen flag clicked\nforever\n    set y to ([y position v] of [player v])\n    set [ghost v] effect to (100)\nend\n\nwhen I receive [play v]\nforever\n    if <touching color (#4ec254)?> then\n        change [scrollx v] by (3)\n    end\nend\n\n@Player3\n\nwhen flag clicked\nforever\n    set y to ([y position v] of [player v])\n    set [ghost v] effect to (100)\nend\n\nwhen flag clicked\nforever\n    if <touching color (#4ec254)?> then\n        change [scrollx v] by (-3)\n    end\nend\n\n@Sprite28\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    switch costume to (costume1 v)\nend\n\nwhen [timer v] > (0)\nset [ghost v] effect to (0)\nswitch costume to (costume1 v)\nwait (3) seconds\nswitch costume to (costume12 v)\nwait (2) seconds\nswitch costume to (copertina v)\nstop [all v]\n\n@Sprite29\n\nwhen I receive [inizio v]\nhide\n\nwhen I receive [go v]\nset rotation style [all around v]\npoint in direction (90)\nset [page v] to [0]\nswitch costume to (senza titolo v)\nset size to (0) %\nshow\ngo to [front v] layer\nstart sound [A v]\nrepeat (10)\n    turn right (36) degrees\n    change size by (10)\n    wait (0.1) seconds\nend\nwait (0.5) seconds\nswitch costume to (senza titolo2 v)\nwait (5) seconds\nbroadcast (INIZIO v)\nset [page v] to [1]\n\n@Sprite30\n\nwhen flag clicked\ngo to [front v] layer\nshow\n\nwhen I receive [inizio v]\nhide\n\n
COMPUTER:\nArrows or WASD to move\n\nMOBILE:\nTap/hold to move towards your finger