Platformer
@Stage\n\nwhen [1 v] key pressed\nswitch backdrop to (startbild v)\n\nwhen I receive [start v]\nforever\n    if <(Level) = [3]> then\n        switch backdrop to (level 3 v)\n    else\n        if <(Level) = [4]> then\n            switch backdrop to (level 4 v)\n        else\n            if <(Level) = [6]> then\n                switch backdrop to (level 6 v)\n            else\n                if <(Level) = [7]> then\n                    switch backdrop to (level 7 v)\n                else\n                    if <(Level) = [8]> then\n                        switch backdrop to (level 8 v)\n                    else\n                        if <(Level) = [9]> then\n                            switch backdrop to (level 9 v)\n                        else\n                            if <(Level) = [11]> then\n                                switch backdrop to (level 11 v)\n                            else\n                                if <(Level) = [12]> then\n                                    switch backdrop to (level 12 v)\n                                else\n                                    if <(Level) = [14]> then\n                                        switch backdrop to (level 14 v)\n                                    else\n                                        if <(Level) = [15]> then\n                                            switch backdrop to (level 15 v)\n                                        else\n                                            if <(Level) = [17]> then\n                                                switch backdrop to (level 17 v)\n                                            else\n                                                if <(Level) = [19]> then\n                                                    switch backdrop to (level 19 v)\n                                                else\n                                                    if <(Level) = [20]> then\n                                                        switch backdrop to (level 20 v)\n                                                    else\n                                                        switch backdrop to (normal v)\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nswitch backdrop to (normal v)\n\n@Spieler\n\ndefine Laufsteuerung\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change x by (Lauftempo)\n    next costume\n    if <<<touching (boden v)?> or <touching (bewegungs boden v)?>> or <touching (bewegungs boden2 v)?>> then\n        change x by ((Lauftempo) * (-1))\n    end\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change x by ((Lauftempo) * (-1))\n    next costume\n    if <<<touching (boden v)?> or <touching (bewegungs boden v)?>> or <touching (bewegungs boden2 v)?>> then\n        change x by (Lauftempo)\n    end\nend\n\ndefine Simulation\nchange y by (Falltempo)\nif <<<touching (boden v)?> or <touching (bewegungs boden v)?>> or <touching (bewegungs boden2 v)?>> then\n    if <(Falltempo) < [0]> then\n        set [rückwärts v] to [1]\n    else\n        set [rückwärts v] to [-1]\n    end\n    repeat until <not <<<touching (boden v)?> or <touching (bewegungs boden v)?>> or <touching (bewegungs boden2 v)?>>>\n        change y by (Rückwärts)\n    end\n    set [falltempo v] to [-1]\nelse\n    change [falltempo v] by (Schwerkraft)\nend\n\ndefine Sprungsteuerung\nif <<key (space v) pressed?> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n    change y by (-1)\n    if <<<touching (boden v)?> or <touching (bewegungs boden v)?>> or <touching (bewegungs boden2 v)?>> then\n        set [falltempo v] to (Starttempo)\n        change [color v] effect by (10)\n        start sound [Jump v]\n    end\n    change y by (1)\nend\n\ndefine Fallen\nif <<<<<<(y position) < [-170]> or <touching (hindernis v)?>> or <touching (geschoss1 v)?>> or <touching (geschoss2 v)?>> or <touching (geschoss3 v)?>> or <touching (geschoss4 v)?>> then\n    go to x: (-210) y: (-20)\n    change [leben v] by (-1)\n    broadcast (Ded v)\n    start sound [louse v]\nend\n\ndefine Klon\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nrepeat (15)\n    change [ghost v] effect by (15)\n    change size by (-5)\nend\ndelete this clone\n\ndefine next level\nif <<touching (portal v)?> and <not <(Level) = [20]>>> then\n    broadcast (next level v)\n    wait (0.5) seconds\n    set x to (-240)\n    if <(Level) = [14]> then\n        set y to (-130)\n    end\nend\n\nwhen I receive [start v]\nset [color v] effect to (0)\nset size to (70) %\ngo to [front v] layer\nshow\npoint in direction (90)\nswitch costume to (rechts v)\ngo to x: (-210) y: (40)\nset [level v] to [1]\nset [starttempo v] to [12]\nset [schwerkraft v] to [-1]\nset [falltempo v] to [0]\nset [lauftempo v] to [5]\nset [leben v] to [3]\nforever\n    Laufsteuerung\n    Sprungsteuerung\n    Simulation\n    Fallen\n    Klon\n    next level\nend\n\nwhen flag clicked\nhide\nhide variable [leben v]\nhide variable [level v]\n\nif <<<touching (boden v)?> or <touching (bewegungs boden v)?>> or <touching (bewegungs boden2 v)?>> then\n    set [falltempo v] to (Starttempo)\n    change [color v] effect by (10)\n    start sound [Jump v]\nend\nchange y by (1)\n\nwhen [1 v] key pressed\npoint in direction (120)\ngo to x: (7) y: (-14)\nset size to (120) %\nshow\nhide variable [☁ best score v]\nhide variable [time v]\nhide variable [☁ working v]\nstop [all v]\n\nwhen flag clicked\nchange [☁ user v] by (1)\n\nwhen [y v] key pressed\nif <(username) = [LXXXL]> then\n    set [leben v] to [100]\nend\n\nwhen [x v] key pressed\nif <(username) = [LXXXL]> then\n    set [leben v] to [1]\nend\n\nwhen [c v] key pressed\nif <(username) = [LXXXL]> then\n    repeat until <not <key (c v) pressed?>>\n        go to (mouse-pointer v)\n    end\nend\n\nwhen [v v] key pressed\nif <(username) = [LXXXL]> then\n    wait (1) seconds\n    change [leben v] by (1)\nend\n\nwhen [b v] key pressed\nif <(username) = [LXXXL]> then\n    ask [Welches Level] and wait\n    go to x: (-219) y: (-50)\n    set [level v] to (answer)\nend\n\nwhen I receive [start v]\nif <(username) = [LXXXL]> then\n    ask [Möchtest du an diesem Projekt arbeiten? j/n] and wait\nend\nif <(answer) = [j]> then\n    set [☁ working v] to [1]\nend\nif <(answer) = [n]> then\n    set [☁ working v] to [0]\nend\n\n@Boden\n\nwhen [1 v] key pressed\nhide\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (level 1 v)\nhide\n\nwhen I receive [start v]\nshow\n\nwhen I receive [start v]\nforever\n    if <<(Leben) = [0]> or <(Leben) < [0]>> then\n        if <(Level) = [5]> then\n            switch costume to (level 4 v)\n            set [level v] to [4]\n            set [leben v] to [2]\n        end\n        if <(Level) = [6]> then\n            switch costume to (level 5 v)\n            set [level v] to [5]\n            set [leben v] to [2]\n        end\n        if <(Level) = [7]> then\n            switch costume to (level 6 v)\n            set [level v] to [6]\n            set [leben v] to [2]\n        end\n        if <(Level) = [8]> then\n            switch costume to (level 7 v)\n            set [level v] to [7]\n            set [leben v] to [2]\n        end\n        if <(Level) = [9]> then\n            switch costume to (level 8 v)\n            set [level v] to [8]\n            set [leben v] to [2]\n        end\n        if <(Level) = [10]> then\n            switch costume to (level 9 v)\n            set [level v] to [9]\n            set [leben v] to [2]\n        end\n        if <(Level) = [11]> then\n            switch costume to (level 10 v)\n            set [level v] to [10]\n            set [leben v] to [2]\n        end\n        if <(Level) = [12]> then\n            switch costume to (level 11 v)\n            set [level v] to [11]\n            set [leben v] to [2]\n        end\n        if <(Level) = [13]> then\n            switch costume to (level 12 v)\n            set [level v] to [12]\n            set [leben v] to [2]\n        end\n        if <(Level) = [14]> then\n            switch costume to (level 13 v)\n            set [level v] to [13]\n            set [leben v] to [2]\n        end\n        if <(Level) = [15]> then\n            switch costume to (level 14 v)\n            set [level v] to [14]\n            set [leben v] to [2]\n        end\n        if <(Level) = [16]> then\n            switch costume to (level 15 v)\n            set [level v] to [15]\n            set [leben v] to [2]\n        end\n        if <(Level) = [17]> then\n            switch costume to (level 16 v)\n            set [level v] to [16]\n            set [leben v] to [2]\n        end\n        if <(Level) = [18]> then\n            switch costume to (level 17 v)\n            set [level v] to [17]\n            set [leben v] to [2]\n        end\n        if <(Level) = [19]> then\n            switch costume to (level 18 v)\n            set [level v] to [18]\n            set [leben v] to [2]\n        end\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Level) = [1]> then\n        switch costume to (level 1 v)\n    end\n    if <(Level) = [2]> then\n        switch costume to (level 2 v)\n    end\n    if <(Level) = [3]> then\n        switch costume to (level 3 v)\n    end\n    if <(Level) = [4]> then\n        switch costume to (level 4 v)\n    end\n    if <(Level) = [5]> then\n        switch costume to (level 5 v)\n    end\n    if <(Level) = [6]> then\n        switch costume to (level 6 v)\n    end\n    if <(Level) = [7]> then\n        switch costume to (level 7 v)\n    end\n    if <(Level) = [8]> then\n        switch costume to (level 8 v)\n    end\n    if <(Level) = [9]> then\n        switch costume to (level 9 v)\n    end\n    if <(Level) = [10]> then\n        switch costume to (level 10 v)\n    end\n    if <(Level) = [11]> then\n        switch costume to (level 11 v)\n    end\n    if <(Level) = [12]> then\n        switch costume to (level 12 v)\n    end\n    if <(Level) = [13]> then\n        switch costume to (level 13 v)\n    end\n    if <(Level) = [14]> then\n        switch costume to (level 14 v)\n    end\n    if <(Level) = [15]> then\n        switch costume to (level 15 v)\n    end\n    if <(Level) = [16]> then\n        switch costume to (level 16 v)\n    end\n    if <(Level) = [17]> then\n        switch costume to (level 17 v)\n    end\n    if <(Level) = [18]> then\n        switch costume to (level 18 v)\n    end\n    if <(Level) = [19]> then\n        switch costume to (level 19 v)\n    end\n    if <(Level) = [20]> then\n        switch costume to (level 20 v)\n    end\nend\n\n@Hindernis\n\nwhen [1 v] key pressed\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nhide\ngo to [back v] layer\ngo [forward v] (1) layers\nforever\n    if <(Level) = [7]> then\n        show\n        switch costume to (7 v)\n    else\n        if <(Level) = [8]> then\n            show\n            switch costume to (8 v)\n        else\n            if <(Level) = [9]> then\n                show\n                switch costume to (9 v)\n            else\n                if <(Level) = [10]> then\n                    show\n                    switch costume to (10 v)\n                else\n                    if <(Level) = [11]> then\n                        show\n                        switch costume to (11 v)\n                    else\n                        if <(Level) = [12]> then\n                            show\n                            switch costume to (12 v)\n                        else\n                            if <(Level) = [14]> then\n                                show\n                                switch costume to (14 v)\n                            else\n                                if <(Level) = [15]> then\n                                    show\n                                    switch costume to (15 v)\n                                else\n                                    if <(Level) = [19]> then\n                                        show\n                                        switch costume to (19 v)\n                                    else\n                                        hide\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\n@Portal\n\nwhen [1 v] key pressed\nhide\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nshow\n\n@Play\n\nwhen [1 v] key pressed\nhide\n\nwhen this sprite clicked\nif <(☁ working) = [1]> then\n    if <not <(username) = [LXXXL]>> then\n        go to x: (0) y: (0)\n        switch costume to (working v)\n        go to [front v] layer\n        stop [all v]\n    end\n    show variable [☁ working v]\nend\nset [time v] to [0]\npoint in direction (90)\nbroadcast (start v)\nhide\nswitch backdrop to (normal v)\nrepeat until <(Level) = [20]>\n    wait (0.1) seconds\n    change [time v] by (0.1)\nend\nif <not <(username) = [LXXXL]>> then\n    if <(time) < (☁ best score)> then\n        set [☁ best score v] to (time)\n    end\nend\nshow variable [time v]\nshow variable [☁ best score v]\n\nwhen flag clicked\nhide variable [☁ working v]\nhide variable [☁ best score v]\nhide variable [time v]\nset [time v] to [0]\ngo to x: (0) y: (-100)\npoint in direction (90)\nset size to (100) %\nswitch costume to (kostüm1 v)\nshow\n\nwhen I receive [anleitung v]\nset size to (80) %\ngo to x: (0) y: (-90)\n\nwhen flag clicked\nrepeat until <(Level) = [2]>\n    if <touching (mouse-pointer v)?> then\n        repeat until <[120] < (size)>\n            change size by (10)\n        end\n    else\n        repeat until <[100] > (size)>\n            change size by (-11)\n        end\n    end\nend\n\n@Anleitung\n\nwhen flag clicked\nrepeat until <mouse down?>\n    if <touching (mouse-pointer v)?> then\n        repeat until <[120] < (size)>\n            change size by (10)\n        end\n    else\n        repeat until <[100] > (size)>\n            change size by (-11)\n        end\n    end\nend\nset size to (100) %\n\nwhen [1 v] key pressed\nhide\n\nwhen this sprite clicked\nswitch costume to (2 v)\nbroadcast (Anleitung v)\n\nwhen flag clicked\ngo to x: (0) y: (4)\nset [level v] to [0]\nswitch costume to (1 v)\nshow\n\nwhen I receive [start v]\nhide\n\n@Name\n\nwhen [1 v] key pressed\nhide\n\nwhen flag clicked\nshow\n\nwhen I receive [anleitung v]\nhide\n\nwhen I receive [start v]\nhide\n\n@Leben anzeige\n\nwhen [1 v] key pressed\nhide\n\nwhen flag clicked\nhide\ngo to x: (188) y: (163)\n\nwhen I receive [start v]\nshow\nforever\n    set [pixelate v] effect to (0)\n    go to [front v] layer\n    if <(Leben) = [3]> then\n        switch costume to (3 leben v)\n    end\n    if <(Leben) = [2]> then\n        switch costume to (2 leben v)\n    end\n    if <(Leben) = [1]> then\n        switch costume to (1 leben v)\n    end\n    if <(Leben) = [0]> then\n        switch costume to (0 leben v)\n    end\n    if <[3] < (Leben)> then\n        set [pixelate v] effect to (40)\n    end\nend\n\n@tot\n\nwhen [1 v] key pressed\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [ded v]\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nrepeat (5)\n    change [ghost v] effect by (-15)\nend\nwait (0.1) seconds\nrepeat (5)\n    change [ghost v] effect by (15)\nend\nhide\n\n@Bewegungs Boden\n\nwhen [1 v] key pressed\nhide\n\nwhen I receive [start v]\nforever\n    go to [front v] layer\n    if <(Level) = [16]> then\n        go to x: (-85) y: (-100)\n        show\n        repeat (50)\n            change y by (2)\n        end\n        repeat (50)\n            change y by (-2)\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    if <not <(Level) = [16]>> then\n        hide\n    end\nend\n\nset [leben v] to [1]\n\n@Licht\n\nwhen [1 v] key pressed\npoint in direction (120)\ngo to x: (7) y: (-14)\nset size to (120) %\nshow\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\ngo to [back v] layer\nforever\n    go to (spieler v)\nend\n\n@Bewegungs Boden2\n\nwhen [1 v] key pressed\nhide\n\nwhen I receive [start v]\nforever\n    go to [front v] layer\n    if <(Level) = [16]> then\n        go to x: (130) y: (60)\n        show\n        repeat (50)\n            change x by (-2)\n        end\n        repeat (50)\n            change x by (2)\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    if <not <(Level) = [16]>> then\n        hide\n    end\nend\n\n@Bewegungs Boden halterung\n\nwhen [1 v] key pressed\nhide\n\nwhen I receive [start v]\nforever\n    if <(Level) = [16]> then\n        go to [back v] layer\n        go to x: (130) y: (60)\n        show\n        go to [back v] layer\n        repeat (50)\n            go to [back v] layer\n            change x by (-2)\n            go to [back v] layer\n        end\n        go to [back v] layer\n        repeat (50)\n            change x by (2)\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    if <not <(Level) = [16]>> then\n        hide\n    end\nend\n\n@Bewegungs Boden halterung2\n\nwhen [1 v] key pressed\nhide\n\nwhen I receive [start v]\nforever\n    if <(Level) = [16]> then\n        go to [back v] layer\n        go to x: (-85) y: (-100)\n        show\n        repeat until <not <(Level) = [16]>>\n            go to [back v] layer\n            repeat (50)\n                change y by (2)\n                go to [back v] layer\n            end\n            repeat (50)\n                go to [back v] layer\n                change y by (-2)\n            end\n            go to [back v] layer\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    if <not <(Level) = [16]>> then\n        hide\n    end\nend\n\n@Level\n\nwhen [1 v] key pressed\nhide\n\nwhen flag clicked\ngo to x: (-195) y: (163)\nhide\n\nwhen I receive [start v]\nshow\ngo to [front v] layer\nforever\n    go to [front v] layer\n    if <(Level) = [1]> then\n        switch costume to (level 1 v)\n    end\n    if <(Level) = [2]> then\n        switch costume to (level 2 v)\n    end\n    if <(Level) = [3]> then\n        switch costume to (level 3 v)\n    end\n    if <(Level) = [4]> then\n        switch costume to (level 4 v)\n    end\n    if <(Level) = [5]> then\n        switch costume to (level 5 v)\n    end\n    if <(Level) = [6]> then\n        switch costume to (level 6 v)\n    end\n    if <(Level) = [7]> then\n        switch costume to (level 7 v)\n    end\n    if <(Level) = [8]> then\n        switch costume to (level 8 v)\n    end\n    if <(Level) = [9]> then\n        switch costume to (level 9 v)\n    end\n    if <(Level) = [10]> then\n        switch costume to (level 10 v)\n    end\n    if <(Level) = [11]> then\n        switch costume to (level 11 v)\n    end\n    if <(Level) = [12]> then\n        switch costume to (level 12 v)\n    end\n    if <(Level) = [13]> then\n        switch costume to (level 13 v)\n    end\n    if <(Level) = [14]> then\n        switch costume to (level 14 v)\n    end\n    if <(Level) = [15]> then\n        switch costume to (level 15 v)\n    end\n    if <(Level) = [16]> then\n        switch costume to (level 16 v)\n    end\n    if <(Level) = [17]> then\n        switch costume to (level 17 v)\n    end\n    if <(Level) = [18]> then\n        switch costume to (level 18 v)\n    end\n    if <(Level) = [19]> then\n        switch costume to (level 19 v)\n    end\n    if <(Level) = [20]> then\n        switch costume to (level 20 v)\n    end\nend\n\nwhen I receive [start v]\nif <(username) = [LXXXL]> then\n    show variable [☁ working v]\n    wait (1) seconds\n    say [Für Info Levelanzeige Berühren] for (3) seconds\n    forever\n        if <touching (mouse-pointer v)?> then\n            say [y=100Leben                  x=1Leben                         c=gehe zu Mauszeiger                      1=zurücksetzen auf Startbild                                         v=+1Leben                                                       b=level wählen] for (0.1) seconds\n        end\n    end\nend\n\n@leben\n\nwhen [1 v] key pressed\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nwait until <(Level) = [11]>\ngo to x: (8) y: (163)\nshow\n\nwhen I receive [start v]\nforever\n    if <not <(Level) = [11]>> then\n        hide\n    end\n    if <<touching (spieler v)?> and <not <(Leben) = [3]>>> then\n        change [leben v] by (1)\n        hide\n    end\nend\n\n@Figur1\n\nwhen [1 v] key pressed\nhide\n\nwhen flag clicked\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [next level v]\nshow\nstart sound [Coin2 v]\nrepeat (12)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\nend\nwait (0.1) seconds\nbroadcast (next level 2 v)\nchange [level v] by (1)\nwait (0.1) seconds\nrepeat (12)\n    go to [front v] layer\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@geschoss1\n\nwhen [1 v] key pressed\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    if <(Level) = [18]> then\n        point in direction (90)\n        go to x: (78) y: (-104)\n        create clone of (_myself_ v)\n        wait (2) seconds\n    end\nend\n\nwhen I start as a clone\nshow\nrepeat until <touching (_edge_ v)?>\n    change y by (10)\n    if <not <(Level) = [18]>> then\n        delete this clone\n    end\nend\ndelete this clone\n\n@geschoss2\n\nwhen [1 v] key pressed\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    if <(Level) = [18]> then\n        point in direction (90)\n        go to x: (-134) y: (-104)\n        create clone of (_myself_ v)\n        wait (2) seconds\n    end\nend\n\nwhen I start as a clone\nshow\nrepeat until <touching (_edge_ v)?>\n    change y by (10)\n    if <not <(Level) = [18]>> then\n        delete this clone\n    end\nend\ndelete this clone\n\n@geschoss4\n\nwhen [1 v] key pressed\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    if <(Level) = [18]> then\n        go to x: (200) y: (-30)\n        create clone of (_myself_ v)\n        wait (2) seconds\n    end\nend\n\nwhen I start as a clone\nshow\nrepeat until <touching (_edge_ v)?>\n    change x by (-10)\n    if <not <(Level) = [18]>> then\n        delete this clone\n    end\nend\ndelete this clone\n\n
\nUse arrow keys or WASD to control