Up In the Sky || A Scrolling Platformer #games #art #music #all

Instructions: A like, fave and follow would be much appreciated!\n\nNew Game! Sequel to this one and MUCH better\nhttps://scratch.mit.edu/projects/451170293/\n\nUp In the Sky || A Scrolling Platformer - Firedrake712\n-----------------------------------------------------------\nControls:\nUp arrow/W/space - Jump\nRight Arrow/D - Move Right\nLeft Arrow/A - Move Left\n\nNote:\nWhen the game lags, glitches could happen. 

@Stage\n\n@Boost\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(level) = [1]> then\n    switch costume to (level 1 1 v)\n    clone at x [480] y [0]\n    clone at x [480] y [0]\n    clone at x [480] y [0]\n    switch costume to (costume1 v)\nelse\n    if <(level) = [2]> then\n        switch costume to (level 2 1 v)\n        clone at x [480] y [0]\n        clone at x [480] y [0]\n        clone at x [480] y [0]\n        clone at x [480] y [0]\n        clone at x [480] y [0]\n        switch costume to (costume1 v)\n    else\n        if <(level) = [3]> then\n            switch costume to (level 3 1 v)\n            clone at x [480] y [0]\n            clone at x [480] y [0]\n            clone at x [480] y [0]\n            clone at x [480] y [0]\n            switch costume to (costume1 v)\n        else\n            if <(level) = [4]> then\n                switch costume to (level 4 1 v)\n                clone at x [480] y [0]\n                clone at x [480] y [0]\n                clone at x [480] y [0]\n                clone at x [480] y [0]\n                clone at x [480] y [0]\n                switch costume to (costume1 v)\n            else\n                if <(level) = [5]> then\n                    switch costume to (level 5 1 v)\n                    clone at x [480] y [0]\n                    clone at x [480] y [0]\n                    clone at x [480] y [0]\n                    clone at x [480] y [0]\n                    clone at x [480] y [0]\n                    switch costume to (costume1 v)\n                else\n                    switch costume to (end v)\n                end\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine clone at x (x) y (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\npoint in direction (90)\n\n@Text\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(level) = [1]> then\n    switch costume to (level 1 1 v)\n    clone at x [480] y [0]\n    clone at x [480] y [0]\n    clone at x [480] y [0]\n    switch costume to (costume1 v)\nelse\n    if <(level) = [2]> then\n        switch costume to (level 2 1 v)\n        clone at x [480] y [0]\n        clone at x [480] y [0]\n        clone at x [480] y [0]\n        clone at x [480] y [0]\n        clone at x [480] y [0]\n        switch costume to (costume1 v)\n    else\n        if <(level) = [3]> then\n            switch costume to (level 3 1 v)\n            clone at x [480] y [0]\n            clone at x [480] y [0]\n            clone at x [480] y [0]\n            clone at x [480] y [0]\n            switch costume to (costume1 v)\n        else\n            if <(level) = [4]> then\n                switch costume to (level 4 1 v)\n                clone at x [480] y [0]\n                clone at x [480] y [0]\n                clone at x [480] y [0]\n                clone at x [480] y [0]\n                clone at x [480] y [0]\n                switch costume to (costume1 v)\n            else\n                if <(level) = [5]> then\n                    switch costume to (level 5 1 v)\n                    clone at x [480] y [0]\n                    clone at x [480] y [0]\n                    clone at x [480] y [0]\n                    clone at x [480] y [0]\n                    clone at x [480] y [0]\n                    switch costume to (costume1 v)\n                else\n                    switch costume to (end v)\n                end\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine clone at x (x) y (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\npoint in direction (90)\n\n@Bouncy\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(level) = [1]> then\n    switch costume to (level 1 1 v)\n    clone at x [480] y [0]\n    clone at x [480] y [0]\n    clone at x [480] y [0]\n    switch costume to (costume1 v)\nelse\n    if <(level) = [2]> then\n        switch costume to (level 2 1 v)\n        clone at x [480] y [0]\n        clone at x [480] y [0]\n        clone at x [480] y [0]\n        clone at x [480] y [0]\n        clone at x [480] y [0]\n        switch costume to (costume1 v)\n    else\n        if <(level) = [3]> then\n            switch costume to (level 3 1 v)\n            clone at x [480] y [0]\n            clone at x [480] y [0]\n            clone at x [480] y [0]\n            clone at x [480] y [0]\n            switch costume to (costume1 v)\n        else\n            if <(level) = [4]> then\n                switch costume to (level 4 1 v)\n                clone at x [480] y [0]\n                clone at x [480] y [0]\n                clone at x [480] y [0]\n                clone at x [480] y [0]\n                clone at x [480] y [0]\n                switch costume to (costume1 v)\n            else\n                if <(level) = [5]> then\n                    switch costume to (level 5 1 v)\n                    clone at x [480] y [0]\n                    clone at x [480] y [0]\n                    clone at x [480] y [0]\n                    clone at x [480] y [0]\n                    clone at x [480] y [0]\n                    switch costume to (costume1 v)\n                else\n                    switch costume to (end v)\n                end\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine clone at x (x) y (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\npoint in direction (90)\n\n@Intro\n\nwhen I start as a clone\nif <(Clone ID) = [Hider 1]> then\n    wait until <(timer) > [8.5]>\n    go to [front v] layer\n    point in direction (105)\n    show\n    go to x: (300) y: (0)\n    set size to (100) %\n    switch costume to (hider 2 v)\n    clear graphic effects\n    repeat until <<(round (x position)) = [0]> and <(round (y position)) = [0]>>\n        change x by (((0) - (round (x position))) / (5))\n        change y by (((0) - (round (y position))) / (5))\n    end\n    go to x: (0) y: (0)\n    wait (1) seconds\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    delete this clone\nend\nif <(Clone ID) = [Hider 2]> then\n    wait until <(timer) > [8.5]>\n    go to [front v] layer\n    point in direction (105)\n    show\n    go to x: (-300) y: (0)\n    set size to (100) %\n    switch costume to (hider 1 v)\n    clear graphic effects\n    repeat until <<(round (x position)) = [0]> and <(round (y position)) = [0]>>\n        change x by (((0) - (round (x position))) / (5))\n        change y by (((0) - (round (y position))) / (5))\n    end\n    go to x: (0) y: (0)\n    wait (1) seconds\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    delete this clone\nend\n\ndefine Clone Particles\nset [clone id v] to [Particle]\nrepeat (75)\n    create clone of (_myself_ v)\n    turn right (15) degrees\nend\npoint in direction (90)\n\ndefine Clone Row of Boxes\nset [brightness v] effect to (10)\nrepeat (9)\n    create clone of (_myself_ v)\n    change [var 2 v] by (-1)\n    change [brightness v] effect by (-2)\nend\n\ndefine Bounce with (bounciness) , (speed) and (finishing size)\nset [var 1 v] to [0]\nrepeat until <<(finishing size) = (size)> and <(Var 1) = (size)>>\n    set [var 2 v] to (((Var 2) * ((bounciness) / (100))) + (((finishing size) - (size)) * ((speed) / (20))))\n    set [var 1 v] to (size)\n    change size by (Var 2)\nend\nset size to (finishing size) %\n\ndefine Smooth Glide x: (x) y: (y) speed: (speed) (ghost)\nrepeat until <<(round (x position)) = (round (x))> and <(round (y position)) = (round (y))>>\n    change x by (((round (x)) - (round (x position))) / (speed))\n    change y by (((round (y)) - (round (y position))) / (speed))\n    change [ghost v] effect by (ghost)\nend\ngo to x: (x) y: (y)\n\ndefine Type: System (text) (x) (y) (size) (color) (brightness) (speed)\nswitch costume to (master v)\nhide\ngo to x: (x) y: (y)\nset size to (size) %\nset [# v] to [1]\nset [color v] effect to (color)\nset [brightness v] effect to (brightness)\nset [length v] to (length of (text))\nrepeat (length of (text))\n    if <(letter (#) of (text)) > [ ]> then\n        switch costume to (letter (#) of (text))\n        create clone of (_myself_ v)\n        change x by ((size) * ((item (costume [number v]) of [character widths v]) / (90)))\n        change [# v] by (1)\n    else\n        switch costume to ( v)\n        create clone of (_myself_ v)\n        change x by ((size) * ((item (costume [number v]) of [character widths v]) / (90)))\n        change [# v] by (1)\n    end\n    wait (speed) seconds\nend\n\ndefine Setup Lists\ndelete all of [character widths v]\nadd [thing] to [character widths v]\nadd [29] to [character widths v]\nadd [24] to [character widths v]\nadd [28] to [character widths v]\nadd [27] to [character widths v]\nadd [24] to [character widths v]\nadd [24] to [character widths v]\nadd [28] to [character widths v]\nadd [28] to [character widths v]\nadd [7] to [character widths v]\nadd [21] to [character widths v]\nadd [22] to [character widths v]\nadd [22] to [character widths v]\nadd [34] to [character widths v]\nadd [27] to [character widths v]\nadd [34] to [character widths v]\nadd [22] to [character widths v]\nadd [34] to [character widths v]\nadd [21] to [character widths v]\nadd [23] to [character widths v]\nadd [27] to [character widths v]\nadd [27] to [character widths v]\nadd [29] to [character widths v]\nadd [38] to [character widths v]\nadd [26] to [character widths v]\nadd [27] to [character widths v]\nadd [27] to [character widths v]\nadd [11] to [character widths v]\nadd [20] to [character widths v]\nadd [21] to [character widths v]\nadd [25] to [character widths v]\nadd [21] to [character widths v]\nadd [20] to [character widths v]\nadd [21] to [character widths v]\nadd [20] to [character widths v]\nadd [20] to [character widths v]\nadd [20] to [character widths v]\nadd [14] to [character widths v]\nadd [25] to [character widths v]\nadd [15] to [character widths v]\nadd [10] to [character widths v]\nadd [24] to [character widths v]\nadd [24] to [character widths v]\nadd [20] to [character widths v]\nadd [24] to [character widths v]\nadd [22] to [character widths v]\nadd [16] to [character widths v]\nadd [24] to [character widths v]\nadd [22] to [character widths v]\nadd [10] to [character widths v]\nadd [14] to [character widths v]\nadd [18] to [character widths v]\nadd [9] to [character widths v]\nadd [33] to [character widths v]\nadd [22] to [character widths v]\nadd [24] to [character widths v]\nadd [24] to [character widths v]\nadd [24] to [character widths v]\nadd [15] to [character widths v]\nadd [19] to [character widths v]\nadd [16] to [character widths v]\nadd [22] to [character widths v]\nadd [22] to [character widths v]\nadd [30] to [character widths v]\nadd [20] to [character widths v]\nadd [23] to [character widths v]\nadd [20] to [character widths v]\n\ndefine Change Size By: (size)\nchange size by (size)\nchange x by ((0) - ((size) / (20)))\n\ndefine Find Size (text) (size)\nset [size v] to (size)\nset [width v] to [1]\nset [# v] to [1]\nrepeat (length of (text))\n    if <(letter (#) of (text)) > [ ]> then\n        switch costume to (letter (#) of (text))\n        change [width v] by ((Size) * ((item (costume [number v]) of [character widths v]) / (90)))\n        change [# v] by (1)\n    else\n        switch costume to ( v)\n        change [width v] by ((Size) * ((item (costume [number v]) of [character widths v]) / (90)))\n        change [# v] by (1)\n    end\nend\nif <(Width) > [400]> then\n    change [size v] by (-1)\nend\nif <(Width) < [390]> then\n    change [size v] by (1)\nend\nrepeat until <<<(Width) < [400]> and <(Width) > [389]>> or <(Size) > [300]>>\n    set [width v] to [0]\n    set [# v] to [1]\n    repeat (length of (text))\n        if <(letter (#) of (text)) > [ ]> then\n            switch costume to (letter (#) of (text))\n            change [width v] by ((Size) * ((item (costume [number v]) of [character widths v]) / (90)))\n            change [# v] by (1)\n        else\n            switch costume to ( v)\n            change [width v] by ((Size) * ((item (costume [number v]) of [character widths v]) / (90)))\n            change [# v] by (1)\n        end\n    end\n    if <(Width) > [400]> then\n        change [size v] by (-1)\n    end\n    if <(Width) < [390]> then\n        change [size v] by (1)\n    end\n    if <(Size) > [301]> then\n        set [size v] to [290]\n    end\nend\nset [x v] to ((0) - ((Width) / (2)))\n\ndefine Type (text) (x) (y) (size) (color) (brightness) (speed)\nif <(length of (text)) > [20]> then\n    Find Size [Username Too Long] (size)\n    Type: System [Username Too Long] (X) (y) (Size) (color) (brightness) (speed)\nelse\n    Find Size (text) (size)\n    Type: System (text) (X) (y) (Size) (color) (brightness) (speed)\nend\n\nwhen flag clicked\nset [username v] to [Firedrake712]\nclear graphic effects\nset [clone id v] to [Back 2]\ncreate clone of (_myself_ v)\nSetup Lists\nset [clone id v] to [Letter]\nType (Username) [0] [0] [0] [0] [100] [0]\nclear graphic effects\nreset timer\nstart sound [Kubbi - Cascade v]\nhide\npoint in direction (90)\nset [clone id v] to [Bar]\ngo to x: (-240) y: (300)\nswitch costume to (costume1 v)\nrepeat (2)\n    set [color v] effect to (0)\n    go to x: (-220) y: (300)\n    repeat (12)\n        create clone of (_myself_ v)\n        change x by (40)\n    end\n    wait (0.1) seconds\n    set [color v] effect to (10)\n    go to x: (220) y: (-300)\n    repeat (12)\n        create clone of (_myself_ v)\n        change x by (-40)\n    end\n    wait (0.1) seconds\nend\nset [clone id v] to [Logo]\ncreate clone of (_myself_ v)\nset [clone id v] to [Back]\ncreate clone of (_myself_ v)\nset [clone id v] to [Hider 1]\ncreate clone of (_myself_ v)\nset [clone id v] to [Hider 2]\ncreate clone of (_myself_ v)\nset [clone id v] to [2-1]\ngo to x: (-200) y: (0)\nset [var 1 v] to [0]\nrepeat (5)\n    create clone of (_myself_ v)\n    change x by (100)\n    change [var 1 v] by (1)\nend\nwait until <(timer) > [10]>\nbroadcast (Start Project v)\n\nwhen I start as a clone\nif <(Clone ID) = [Bar]> then\n    show\n    set size to (100) %\n    go to [front v] layer\n    switch costume to (bar v)\n    Smooth Glide x: (x position) y: [0] speed: [5] []\n    wait until <(timer) > [3.2]>\n    delete this clone\nend\nif <(Clone ID) = [Logo]> then\n    wait until <(timer) > [3.2]>\n    switch costume to (logo v)\n    show\n    go to x: (0) y: (360)\n    set [ghost v] effect to (100)\n    set size to (0) %\n    point in direction (-40)\n    Clone Particles\n    repeat (80)\n        change [ghost v] effect by (-10)\n        set [var 1 v] to (((Var 1) * (.7)) + (((0) - (y position)) / (5)))\n        change size by (((200) - (size)) / (5))\n        change y by (Var 1)\n        point in direction ((([tan v] of (Var 2) ) * (10)) + (90))\n        change [var 2 v] by (4)\n    end\n    repeat (20)\n        change y by (((50) - (x position)) / (5))\n        point in direction ((90) + ((6) * ([cos v] of ((timer) * (180)) )))\n        change size by (((25) - (size)) / (5))\n        change [ghost v] effect by (7)\n    end\n    delete this clone\nend\nif <(Clone ID) = [Back]> then\n    show\n    set size to (150) %\n    go to [back v] layer\n    switch costume to (landscape v)\n    go to x: (0) y: (0)\n    repeat (200)\n        set x to ((50) * ([cos v] of (((timer) - (1)) * (200)) ))\n    end\n    delete this clone\nend\nif <(Clone ID) = [Back 2]> then\n    show\n    set size to (150) %\n    go to [back v] layer\n    switch costume to (back2 v)\n    go to x: (0) y: (0)\n    repeat until <(timer) > [10]>\n        go to [back v] layer\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone ID) = [2-1]> then\n    wait until <(timer) > [6]>\n    switch costume to (2-1 v)\n    go to [front v] layer\n    wait ((Var 1) / (10)) seconds\n    show\n    point in direction (0)\n    set size to (10) %\n    set [ghost v] effect to (100)\n    set [var 1 v] to [2]\n    repeat (20)\n        change size by ((Var 1) * (4.9))\n        turn right ((Var 1) * (4.28)) degrees\n        change [ghost v] effect by ((Var 1) * (-5))\n        change [var 1 v] by (-0.1)\n    end\n    wait until <(timer) > [10]>\n    delete this clone\nend\nif <(Clone ID) = [Letter]> then\n    wait until <(timer) > [7]>\n    wait ((#) / (Length)) seconds\n    show\n    go to [front v] layer\n    set size to (Size) %\n    go to x: (x position) y: (-300)\n    Smooth Glide x: (x position) y: [0] speed: [5] [0]\n    wait (1) seconds\n    delete this clone\nend\n\n@Love fave\n\nwhen flag clicked\nset [costume v] to [0]\nhide\nforever\n    wait (pick random (30) to (40)) seconds\n    switch costume to (costume1 v)\n    go to x: (0) y: (50)\n    show\n    go to [front v] layer\n    start sound [pop v]\n    repeat (9)\n        change y by (-6)\n    end\n    repeat (5)\n        change y by (3)\n    end\n    repeat (5)\n        change y by (-1)\n    end\n    wait (2) seconds\n    repeat (15)\n        change y by (7)\n    end\n    hide\nend\n\n@backround\n\nwhen flag clicked\nhide\ngo to [back v] layer\nset [scrollx v] to [0]\ngo to x: (scrollx) y: (0)\nforever\n    change [scrollx v] by (-0.8)\n    go to x: (scrollx) y: (0)\n    if <(scrollx) < [-480]> then\n        set [scrollx v] to [480]\n    end\nend\n\nwhen I receive [start project v]\ngo to [back v] layer\nshow\n\n@Lag Control\n\n@Sprite2\n\nwhen I receive [start project v]\nwait (0.5) seconds\nshow\npoint in direction (90)\nswitch costume to (costume1 v)\nforever\n    go to [front v] layer\n    repeat (5)\n        turn right (3) degrees\n        wait (0.01) seconds\n    end\n    repeat (10)\n        turn left (3) degrees\n        wait (0.01) seconds\n    end\n    repeat (5)\n        turn right (3) degrees\n        wait (0.01) seconds\n    end\nend\n\nwhen flag clicked\nhide\ngo to x: (0) y: (11)\n\nwhen I receive [play game v]\nhide\nstop [other scripts in sprite v]\n\n@Play Game\n\nwhen flag clicked\nhide\ngo to x: (0) y: (-86)\ngo to [front v] layer\nswitch costume to (costume3 v)\n\nwhen I receive [start project v]\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume3 v)\n    end\nend\n\nwhen this sprite clicked\nstart sound [Connect v]\nbroadcast (play game v)\nhide\n\nwhen flag clicked\nset size to (100) %\nforever\n    change size by (4)\n    wait (0.05) seconds\n    change size by (4)\n    wait (0.05) seconds\n    change size by (4)\n    wait (0.05) seconds\n    change size by (4)\n    wait (0.2) seconds\n    change size by (-4)\n    wait (0.05) seconds\n    change size by (-4)\n    wait (0.05) seconds\n    change size by (-4)\n    wait (0.05) seconds\n    change size by (-4)\n    wait (0.05) seconds\nend\n\n@Music\n\nwhen I receive [start project v]\nforever\n    play sound [Exlo - Free v] until done\nend\n\n@portal\n\nwhen I receive [open portal v]\nswitch costume to (open v)\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\nif <<(costume [name v]) = [OPEN]> and <touching (player v)?>> then\n    set [exit v] to [win]\nend\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(level) = [1]> then\n    switch costume to (open v)\n    clone at x [1090] y [250]\nelse\n    if <(level) = [2]> then\n        switch costume to (open v)\n        clone at x [2000] y [130]\n    else\n        if <(level) = [3]> then\n            switch costume to (open v)\n            clone at x [1700] y [60]\n        else\n            if <(level) = [4]> then\n                switch costume to (open v)\n                clone at x [2000] y [80]\n            else\n                if <(level) = [5]> then\n                    switch costume to (open v)\n                    clone at x [2000] y [80]\n                else\n                    switch costume to (closd v)\n                end\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine clone at x (x) y (y)\nset [x v] to (x)\nset [y v] to (y)\n\n@Danger\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(level) = [1]> then\n    switch costume to (level 1 1 v)\n    clone at x [480] y [0]\n    clone at x [480] y [0]\n    clone at x [480] y [0]\n    switch costume to (costume1 v)\nelse\n    if <(level) = [2]> then\n        switch costume to (level 2 1 v)\n        clone at x [480] y [0]\n        clone at x [480] y [0]\n        clone at x [480] y [0]\n        clone at x [480] y [0]\n        clone at x [480] y [0]\n        switch costume to (costume1 v)\n    else\n        if <(level) = [3]> then\n            switch costume to (level 3 1 v)\n            clone at x [480] y [0]\n            clone at x [480] y [0]\n            clone at x [480] y [0]\n            clone at x [480] y [0]\n            switch costume to (costume1 v)\n        else\n            if <(level) = [4]> then\n                switch costume to (level 4 1 v)\n                clone at x [480] y [0]\n                clone at x [480] y [0]\n                clone at x [480] y [0]\n                clone at x [480] y [0]\n                clone at x [480] y [0]\n                switch costume to (costume1 v)\n            else\n                if <(level) = [5]> then\n                    switch costume to (level 5 1 v)\n                    clone at x [480] y [0]\n                    clone at x [480] y [0]\n                    clone at x [480] y [0]\n                    clone at x [480] y [0]\n                    clone at x [480] y [0]\n                    switch costume to (costume1 v)\n                else\n                    switch costume to (end v)\n                end\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine clone at x (x) y (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\npoint in direction (90)\n\n@player\n\nwhen flag clicked\nbroadcast (Green flag v) and wait\n\nwhen I receive [green flag v]\nhide\ngo to [back v] layer\n\nwhen I receive [play game v]\nset [level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Game On\n    repeat until <(exit) > []>\n        Tick\n        broadcast (Tick v)\n    end\n    if <(exit) = [win]> then\n        start sound [Magic Spell v]\n        game - win\n        broadcast (next level v) and wait\n    else\n        Game-die\n    end\nend\n\ndefine Game On\nset [x v] to [0]\nset [y v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset size to (60) %\nset [ghost v] effect to (0)\npoint in direction (90)\nswitch costume to (player v)\nshow\n\ndefine Tick\nif <<key (w v) pressed?> or <<key (space v) pressed?> or <key (up arrow v) pressed?>>> then\n    switch costume to (player6 v)\nend\nif <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n    switch costume to (player2 v)\n    change player x by [-8]\nend\nif <touching (bouncy v)?> then\n    if <(in air) < [4]> then\n        start sound [Boing v]\n        set [sy v] to [30]\n    end\nend\nif <touching (boost v)?> then\n    if <(in air) < [4]> then\n        start sound [High Whoosh v]\n        change player x by [40]\n    end\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    switch costume to (player v)\n    change player x by [8]\nend\nif <<key (down arrow v) pressed?> and <touching (boost v)?>> then\n    switch costume to (player v)\n    repeat until <not <<key (down arrow v) pressed?> and <touching (boost v)?>>>\n        change player x by [15]\n    end\nend\nif <<key (left arrow v) pressed?> and <key (up arrow v) pressed?>> then\n    switch costume to (player3 v)\nend\nif <<key (right arrow v) pressed?> and <key (up arrow v) pressed?>> then\n    switch costume to (player4 v)\nend\nif <<key (w v) pressed?> or <<key (space v) pressed?> or <key (up arrow v) pressed?>>> then\n    if <(in air) < [4]> then\n        set [sy v] to [20]\n    end\nend\nchange [sy v] by (-2)\nchange player y by (sy)\ntest-die\nset [scroll x v] to (x)\nif <(scroll x) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((y) - (scroll y)) / (10)))\nif <(scroll y) < [0]> then\n    set [scroll y v] to [0]\nend\nposition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\n\ndefine change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nposition\nrepeat until <not <touching (platforms v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    position\n    set [sy v] to [0]\nend\n\ndefine position\ngo to x: ((x) - (scroll x)) y: ((y) - (scroll y))\n\ndefine change player x by (sx)\nchange [x v] by (sx)\nposition\nif <touching (platforms v)?> then\n    repeat until <not <touching (platforms v)?>>\n        repeat (12)\n            change [y v] by (1)\n            position\n            if <not <touching (platforms v)?>> then\n                stop [this script v]\n            end\n        end\n        change [y v] by (-12)\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        position\n    end\nend\n\ndefine Game-die\nset [exit v] to []\nstart sound [Crunch v]\nrepeat (5)\n    hide\n    wait (0.1) seconds\n    show\n    wait (0.1) seconds\nend\nhide\nwait (.5) seconds\n\ndefine test-die\nif <touching (danger v)?> then\n    set [exit v] to [die]\nend\n\ndefine game - win\nrepeat (50)\n    point towards (portal v)\n    turn right (60) degrees\n    move ((distance to [portal v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nchange [level v] by (1)\nwait (1) seconds\n\nwhen I receive [start project v]\ngo to [front v] layer\n\nwhen flag clicked\nswitch costume to (player5 v)\nforever\n    if <not <<key (up arrow v) pressed?> or <<key (right arrow v) pressed?> or <<touching (portal v)?> or <key (left arrow v) pressed?>>>>> then\n        set size to (60) %\n        switch costume to (player5 v)\n    end\nend\n\n@Platforms\n\nwhen flag clicked\nhide\ngo to [front v] layer\n\nwhen I receive [intro done v]\nshow\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(level) = [1]> then\n    switch costume to (level 1 1 v)\n    clone at x [480] y [0]\n    clone at x [480] y [0]\n    clone at x [480] y [0]\n    switch costume to (costume1 v)\nelse\n    if <(level) = [2]> then\n        switch costume to (level 2 1 v)\n        clone at x [480] y [0]\n        clone at x [480] y [0]\n        clone at x [480] y [0]\n        clone at x [480] y [0]\n        clone at x [480] y [0]\n        switch costume to (costume1 v)\n    else\n        if <(level) = [3]> then\n            switch costume to (level 3 1 v)\n            clone at x [480] y [0]\n            clone at x [480] y [0]\n            clone at x [480] y [0]\n            clone at x [480] y [0]\n            switch costume to (costume1 v)\n        else\n            if <(level) = [4]> then\n                switch costume to (level 4 1 v)\n                clone at x [480] y [0]\n                clone at x [480] y [0]\n                clone at x [480] y [0]\n                clone at x [480] y [0]\n                clone at x [480] y [0]\n                switch costume to (costume1 v)\n            else\n                if <(level) = [5]> then\n                    switch costume to (level 4 5 v)\n                    clone at x [480] y [0]\n                    clone at x [480] y [0]\n                    clone at x [480] y [0]\n                    clone at x [480] y [0]\n                    clone at x [480] y [0]\n                    switch costume to (costume1 v)\n                else\n                    switch costume to (end v)\n                end\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine clone at x (x) y (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@backround2\n\nwhen flag clicked\nhide\ngo to [back v] layer\nset [scrollx2 v] to [480]\ngo to x: (scrollx2) y: (0)\nforever\n    change [scrollx2 v] by (-0.8)\n    go to x: (scrollx2) y: (0)\n    if <(scrollx2) < [-480]> then\n        set [scrollx2 v] to [480]\n    end\nend\n\nwhen I receive [start project v]\nshow\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\n@Thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\n    go to x: (0) y: (0)\nend\n\n@Blossoms\n\nwhen I start as a clone\nforever\n    go to x: (pick random (-250) to (250)) y: (177)\n    glide (pick random (4) to (10)) secs to x: (pick random (-250) to (250)) y: (-177)\n    if <(y position) = (pick random (-250) to (250))> then\n        hide\n    end\nend\n\nwhen I receive [start project v]\ngo to [back v] layer\ngo to x: (500) y: (500)\nforever\n    create clone of (_myself_ v)\n    wait (10) seconds\nend\n\nwhen flag clicked\nforever\n    if <key (p v) pressed?> then\n        forever\n            stop [other scripts in sprite v]\n        end\n    end\nend\n\n@clouds\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nforever\n    switch costume to (pick random (1) to (3))\n    set size to (80) %\n    go to (random position v)\n    set x to (-300)\n    repeat (620)\n        change x by (1)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nforever\n    show\n    set [ghost v] effect to (30)\nend\n\nwhen I start as a clone\ngo to [back v] layer\ngo [forward v] (3) layers\n\nwhen I receive [play game v]\nrepeat (10)\n    switch costume to (costume1 v)\nend\nforever\n    set size to (30) %\n    create clone of (_myself_ v)\n    wait (5) seconds\nend\n\n