Tilt - A Platformer v2.2c
@Stage\n\nwhen flag clicked\nset [level\(nc\) v] to [1]\nswitch backdrop to (costume1 v)\nshow\n\nwhen I receive [message1 v]\nchange [level\(nc\) v] by (1)\nnext backdrop\n\n@Sprite1\n\ndefine tilt\nif <key (right arrow v) pressed?> then\n    change [rollx v] by (0.5)\n    turn right (rollx) degrees\nend\nif <key (left arrow v) pressed?> then\n    change [rollx v] by (-0.5)\n    turn right (rollx) degrees\nend\n\nwhen flag clicked\nset [tabp v] to [0]\nset [jumpcount v] to [0]\nset [achtoggle v] to [0]\nshow list [achievements v]\ngo to x: (-200) y: (-55)\nforever\n    tick\n    tilt\nend\n\nwhen flag clicked\nforever\n    if <key (o v) pressed?> then\n        change [achtoggle v] by (1)\n        wait (0.8) seconds\n    end\nend\n\ndefine tick\nchange [yv v] by (-0.5)\npoint in direction (90)\nif <key (right arrow v) pressed?> then\n    change [xv v] by (0.7)\nend\nif <key (left arrow v) pressed?> then\n    change [xv v] by (-0.7)\nend\nset [rollx v] to ((rollx) * (0.92))\nset [xv v] to ((Xv) * (0.9))\nchange x by (Xv)\nif <touching color (#000000)?> then\n    change y by (1)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change x by ((Xv) * (-1))\n                        change x by (-1)\n                        change y by (-5)\n                        if <touching (none v)?> then\n                            change x by (Change)\n                        end\n                        change x by (1)\n                        if <key (up arrow v) pressed?> then\n                            if <(Xv) > [0]> then\n                                set [xv v] to [-8]\n                            else\n                                set [xv v] to [8]\n                            end\n                            set [yv v] to [10]\n                            change [jumpcount v] by (1)\n                        else\n                            set [xv v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange y by (Yv)\nif <touching color (#000000)?> then\n    change y by ((Yv) * (-1))\n    set [yv v] to [0]\nend\nchange y by (-1)\nif <touching (none v)?> then\n    change x by (Change)\nend\nif <touching color (#000000)?> then\n    if <key (up arrow v) pressed?> then\n        set [yv v] to [10]\n        change [jumpcount v] by (1)\n    end\nend\nchange y by (1)\nif <(x position) > [237.55]> then\n    go to x: (-200) y: (-55)\n    broadcast (message1 v)\nend\nif <touching color (#ff0000)?> then\n    go to x: (-200) y: (-55)\nend\nif <touching color (#ffff00)?> then\n    set [tabp v] to [1]\n    set [yv v] to [15]\nend\nif <key (r v) pressed?> then\n    go to x: (-200) y: (-55)\nend\n\nwhen flag clicked\ndelete (all) of [achievements v]\nadd [Get to Level 5] to [achievements v]\nadd [Jump 50 Times] to [achievements v]\nadd [Get to Level 10] to [achievements v]\nadd [Jump 100 Times] to [achievements v]\nadd [Get to Level 20] to [achievements v]\nadd [Play for 5 minutes] to [achievements v]\nadd [Touch a Bounce Pad] to [achievements v]\nadd [Finish the Game] to [achievements v]\nforever\n    if <((achToggle) mod (2)) = [1]> then\n        hide list [achievements v]\n    else\n        show list [achievements v]\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nclear graphic effects\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\nwait (2) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen flag clicked\nforever\n    play sound [691269_The-Inner-Child-Walk.mp3 v] until done\nend\n\n@Sprite3\n\nwhen flag clicked\ngo to [front v] layer\nset size to (70) %\ngo to x: (150) y: (140)\nhide\nwait (0.2) seconds\nforever\n    if <(jumpCount) > [49]> then\n        switch costume to (costume1 v)\n        show\n        wait (2) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n        clear graphic effects\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nwait (0.2) seconds\nforever\n    if <(jumpCount) > [99]> then\n        switch costume to (costume3 v)\n        show\n        wait (2) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n        clear graphic effects\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nwait (0.2) seconds\nforever\n    if <(level\(NC\)) = [10]> then\n        switch costume to (costume2 v)\n        show\n        wait (2) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n        clear graphic effects\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nwait (0.2) seconds\nforever\n    if <(backdrop [name v]) = [end]> then\n        switch costume to (costume7 v)\n        show\n        wait (2) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n        clear graphic effects\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nwait (0.2) seconds\nforever\n    if <(level\(NC\)) = [20]> then\n        switch costume to (costume4 v)\n        show\n        wait (2) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n        clear graphic effects\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nwait (300) seconds\nswitch costume to (costume5 v)\nshow\nwait (2) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nclear graphic effects\nstop [this script v]\n\nwhen flag clicked\nwait (0.2) seconds\nforever\n    if <(TABP) = [1]> then\n        switch costume to (costume6 v)\n        show\n        wait (2) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n        clear graphic effects\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nwait (0.2) seconds\nforever\n    if <(level\(NC\)) = [5]> then\n        switch costume to (costume8 v)\n        show\n        wait (2) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n        clear graphic effects\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nwait (0.2) seconds\nforever\n    if <(level\(NC\)) = [30]> then\n        switch costume to (costume9 v)\n        show\n        wait (2) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n        clear graphic effects\n        stop [this script v]\n    end\nend\n\n