Adventure #games #all #platformer

Instructions: This is my first platformer!\nWASD or Arrows to move\nAvoid Spikes

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [level 13 spikes v]\nswitch backdrop to (backdrop3 v)\n\nwhen I receive [cave time yay v]\nswitch backdrop to (cave v)\n\nwhen I receive [won v]\nswitch backdrop to (backdrop1 v)\n\nwhen flag clicked\nforever\n    play sound [Kaled2 v] until done\nend\n\nwhen flag clicked\nclear graphic effects\n\n@dude \n\nwhen flag clicked\nforever\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>> and <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) + (15)) > (x position)> and <mouse down?>>>> then\n        switch costume to (up right v)\n    else\n        if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>> and <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) - (15)) < (x position)> and <mouse down?>>>> then\n            switch costume to (up left v)\n        else\n            if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>> then\n                switch costume to (up v)\n            else\n                if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) - (20)) > (x position)> and <mouse down?>>> then\n                    switch costume to (right v)\n                else\n                    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) + (20)) < (x position)> and <mouse down?>>> then\n                        switch costume to (left v)\n                    else\n                        switch costume to (center v)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [play game v]\nset size to (45) %\nset [level v] to [0]\nchange [☁ players v] by (1)\nshow\ngo to x: (-190) y: (20)\ngo to [front v] layer\nswitch backdrop to (1 v)\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        point in direction (90)\n        change [xv v] by (1)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change x by ((Xv) * (-1))\n                            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                switch costume to (up v)\n                                set [yv v] to [10]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <touching (level v)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching (level v)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [yv v] to [15]\n        end\n    end\nend\n\nswitch costume to (right v)\n\nswitch costume to (left v)\n\nswitch costume to (up v)\n\nwhen flag clicked\nforever\n    if <<touching (tramp v)?> or <<touching (tramp2 v)?> or <touching (tramp3 v)?>>> then\n        set [yv v] to [21]\n    end\n    if <not <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>>>> then\n        switch costume to (center v)\n    end\n    if <(x position) > [239]> then\n        broadcast (next level! v)\n    end\nend\n\nwhen flag clicked\nhide\n\nbroadcast (Play Game v)\n\nwhen I receive [next level! v]\ngo to x: (-190) y: (20)\n\nforever\n\nwhen flag clicked\nforever\n    if <touching (ded v)?> then\n        go to x: (-190) y: (20)\n        broadcast (ded v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        broadcast (outside cloud v)\n    end\n    if <(level) = [2]> then\n        broadcast (outside cloud v)\n    end\n    if <(level) = [3]> then\n        broadcast (outside cloud v)\n    end\n    if <(level) = [4]> then\n        broadcast (cave time yay v)\n    end\n    if <(level) = [5]> then\n        broadcast (cave time yay v)\n    end\n    if <(level) = [6]> then\n        broadcast (cave time yay v)\n    end\n    if <(level) = [7]> then\n        broadcast (cave time yay v)\n    end\n    if <(level) = [8]> then\n        broadcast (outside cloud v)\n        broadcast (won v)\n    end\n    if <(level) = [8]> then\n        broadcast (outside cloud v)\n    end\n    if <(level) = [9]> then\n        broadcast (outside cloud v)\n        broadcast (won v)\n    end\nend\n\nbroadcast (won v)\n\nwhen flag clicked\nforever\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\nend\n\nswitch costume to (up v)\n\nwhen I receive [restart v]\ngo to x: (-190) y: (20)\n\nshow\n\nchange [yv v] by (21)\n\nchange [color v] effect by (25)\n\nwhen I receive [cave time yay v]\nset [ghost v] effect to (75)\n\nwhen I receive [outside cloud v]\nclear graphic effects\n\nset [yv v] to [21]\n\nwhen flag clicked\nforever\n    if <<<<touching (spikes level 2  v)?> or <<touching (spikes level 3 v)?> or <touching (spikes level 4 v)?>>> or <<<touching (spikes level 5 v)?> or <<touching (spikes level 6 v)?> or <touching (spikes level 7 v)?>>> or <touching (spikes level 8 v)?>>> or <<touching (spikes level 9 v)?> or <<touching (spikes level10 v)?> or <<touching (spikes level 11 v)?> or <<touching (spikes level 12 v)?> or >>>>> then\n        go to x: (-190) y: (20)\n        broadcast (ded v)\n    end\nend\n\nwhen I receive [clear v]\nhide\n\nwhen I receive [ded v]\nplay sound [Crunch v] until done\n\nwhen flag clicked\n\nwhen I receive [level 13 spikes v]\nset [ghost v] effect to (70)\n\nwhen I receive [won v]\nset [ghost v] effect to (0)\n\nwhen flag clicked\nclear graphic effects\n\nwhen flag clicked\nclear graphic effects\n\nwhen I receive [won v]\nclear graphic effects\n\nwhen flag clicked\nset size to (95) %\n\n@tramp\n\nwhen flag clicked\nhide\nswitch costume to (costume2 v)\nhide\ngo to x: (0) y: (0)\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    if <(level) = [4]> then\n        Boing time.   show\n    end\nend\n\ndefine Boing time.   show\ngo to [front v] layer\nshow\nforever\n    if <touching (dude  v)?> then\n        start sound [Big Boing v]\n        repeat until <(costume [number v]) = [5]>\n            next costume\n        end\n        repeat until <(costume [number v]) = [1]>\n            switch costume to ((costume [number v]) - (1))\n        end\n        wait until <not <touching (dude  v)?>>\n    end\n    switch costume to (costume2 v)\nend\n\nif <(level) = [5]> then\nif <(level) = [6]> then\nif <(level) = [7]> then\n\nwhen I receive [tramp time v]\ngo to x: (-8) y: (-90)\nBoing time.   show\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        hide\n    end\n    if <(level) = [2]> then\n        hide\n    end\n    if <(level) = [3]> then\n        hide\n    end\n    if <(level) = [6]> then\n        hide\n    end\n    if <(level) = [8]> then\n        hide\n    end\n    if <(level) = [7]> then\n        hide\n    end\n    if <(level) = [6]> then\n        hide\n    end\nend\n\nwhen I receive [tramp time 2 v]\ngo to x: (34) y: (-90)\nBoing time.   show\n\nif <(level) = [5]> then\n\nhide\n\nwhen I receive [tramp 3.      <3> v]\ngo to x: (0) y: (-90)\nBoing time.   show\n\ngo to x: (-8) y: (-90)\nBoing time.   show\n\nwhen flag clicked\nforever\n    if <(level) = [7]> then\n        hide\n    end\n    if <(level) = [6]> then\n        hide\n    end\n    if <(level) = [8]> then\n        hide\n    end\nend\n\nwhen flag clicked\nif <(level) = [6]> then\n    hide\nend\n\nwhen I receive [level 6 spikes v]\nhide\n\nwhen I receive [won v]\nhide\n\nwhen I receive [clear v]\nhide\n\nwhen I receive [outro v]\nhide\n\nwhen I receive [outro v]\nhide\n\nwhen I receive [level 8 spikes v]\nhide\n\nwhen flag clicked\nclear graphic effects\n\nwhen I receive [won v]\nclear graphic effects\n\n@@clouds\n\nwhen flag clicked\ndelete this clone\n\nwhen I start as a clone\nset size to (pick random (40) to (80)) %\nset [ghost v] effect to (pick random (40) to (80))\nswitch costume to (pick random (1) to (3))\nshow\nset y to (196)\nrepeat until <(y position) < [-179]>\n    go to [back v] layer\n    change y by (-4)\nend\ndelete this clone\n\ndefine Clone\ngo to x: (pick random (-240) to (240)) y: (180)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nforever\n    hide\n    Clone\n    wait (.3) seconds\nend\n\nif <touching (level v)?> then\n    delete this clone\nend\n\nwhen I start as a clone\n\nforever\nend\n\nwhen I receive [cave time yay v]\n\nhide\ndelete this clone\n\nwhen I receive [outside cloud v]\n\nwhen I receive [outside cloud v]\n\nwhen I receive [level 13 spikes v]\nhide\nset [ghost v] effect to (100)\n\nwhen I receive [won v]\nset [ghost v] effect to (0)\n\nwhen flag clicked\nclear graphic effects\n\nwhen I receive [won v]\nclear graphic effects\n\n@Level\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    if <(costume [number v]) = [1]> then\n        set [level v] to [1]\n        broadcast (outside cloud v)\n    end\n    if <(costume [number v]) = [2]> then\n        set [level v] to [2]\n        broadcast (outside cloud v)\n        broadcast (level2 spikes v)\n    end\n    if <(costume [number v]) = [3]> then\n        set [level v] to [3]\n        broadcast (outside cloud v)\n        broadcast (level 3 spikes v)\n    end\n    if <(costume [number v]) = [4]> then\n        set [level v] to [4]\n        broadcast (cave time yay v)\n        broadcast (tramp time v)\n        broadcast (level4 spikes v)\n    end\n    if <(costume [number v]) = [5]> then\n        set [level v] to [5]\n        broadcast (cave time yay v)\n        broadcast (Tramp time 2 v)\n        broadcast (Level 5 spikes v)\n    end\n    if <(costume [number v]) = [6]> then\n        set [level v] to [6]\n        broadcast (cave time yay v)\n        broadcast (level 6 spikes v)\n    end\n    if <(costume [number v]) = [7]> then\n        set [level v] to [7]\n        broadcast (cave time yay v)\n        broadcast (Tramp 3.      <3> v)\n        broadcast (level 7 spikes v)\n    end\n    if <(costume [number v]) = [8]> then\n        set [level v] to [8]\n        broadcast (outside cloud v)\n        broadcast (level 8 spikes v)\n    end\n    if <(costume [number v]) = [9]> then\n        set [level v] to [9]\n        broadcast (outside cloud v)\n        broadcast (level 9 spikes v)\n    end\n    if <(costume [number v]) = [10]> then\n        set [level v] to [10]\n        broadcast (outside cloud v)\n        broadcast (Level 10 spikes v)\n    end\n    if <(costume [number v]) = [11]> then\n        set [level v] to [11]\n        broadcast (outside cloud v)\n        broadcast (Level 11 spikes v)\n    end\n    if <(costume [number v]) = [12]> then\n        set [level v] to [12]\n        broadcast (outside cloud v)\n        broadcast (Level 12 spikes v)\n    end\n    if <(costume [number v]) = [13]> then\n        set [level v] to [13]\n        broadcast (outside cloud v)\n        broadcast (level 13 spikes v)\n    end\nend\n\nbroadcast (won v)\n\nif <(costume [number v]) = [8]> then\n    broadcast (move out v)\nend\n\nwhen flag clicked\ngo to x: (65) y: (27)\nswitch costume to (1 v)\nhide\n\nwhen I receive [play game v]\nset [level v] to [1]\nshow\n\nwhen I receive [next level! v]\nnext costume\n\nwhen I receive [next round v]\nnext costume\n\nchange [level v] by (1)\n\nwait (2) seconds\n\nwhen I receive [won v]\nset [ghost v] effect to (0)\n\nwhen I receive [level 13 spikes v]\nset [ghost v] effect to (70)\n\nwhen flag clicked\nclear graphic effects\n\nwhen I receive [won v]\nclear graphic effects\n\nif <(costume [number v]) = [14]> then\n    broadcast (GAME OVER v)\nend\n\n@Cave background\n\nwhen flag clicked\nhide\n\nwhen I receive [cave time yay v]\nshow\n\nwhen I receive [outside cloud v]\nhide\n\n\n\nwhen I receive [won v]\nwait (2) seconds\nhide\nbroadcast (outro v)\n\nwhen I receive [outro v]\nhide\n\n@Sprite2\n\nwhen I receive [play game v]\nshow\ngo to [front v] layer\ngo to x: (-180) y: (-141)\ngo to x: (-197) y: (141)\ngo to x: (-196) y: (79)\nforever\n    go to [front v] layer\n    go [forward v] (999999999) layers\n    repeat until <mouse down?>\n        if <touching (mouse-pointer v)?> then\n            change size by (((100) - (size)) / (4))\n        else\n            change size by (((50) - (size)) / (4))\n        end\n    end\nend\n\nwhen this sprite clicked\nbroadcast (next level! v)\n\nwhen flag clicked\nhide\nswitch costume to (ye v)\n\nrepeat until <mouse down?>\n    if <touching (mouse-pointer v)?> then\n        change size by (((100) - (size)) / (4))\n    else\n        change size by (((50) - (size)) / (4))\n    end\nend\n\n@restart\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\ngo to [front v] layer\nshow\ngo to x: (-150) y: (-141)\ngo to x: (-163) y: (140)\ngo to x: (-212) y: (108)\ngo to x: (-212) y: (54)\nforever\n    repeat until <mouse down?>\n        if <touching (mouse-pointer v)?> then\n            change size by (((100) - (size)) / (4))\n        else\n            change size by (((50) - (size)) / (4))\n        end\n    end\nend\n\nwhen this sprite clicked\nbroadcast (restart v)\n\n@Sprite1\n\nwhen flag clicked\nset [ghost v] effect to (99)\ngo to x: (0) y: (0)\n\n@title\n\nwhen flag clicked\nbroadcast (clear v)\nshow\ngo to x: (0) y: (0)\nforever\n    forever\n        set y to ((([sin v] of ((timer) * (100)) ) * (25)) + (50))\n        set x to ((([sin v] of ((timer) * (50)) ) * (25)) + (0))\n        point in direction ((([tan v] of ((timer) * (10)) ) * (50)) + (50))\n        forever\n            set y to ((([sin v] of ((timer) * (100)) ) * (5)) + (20))\n            point in direction ((([sin v] of ((timer) * (50)) ) * (5)) + (90))\n            set x to (20)\n            forever\n                set y to ((([sin v] of ((timer) * (100)) ) * (5)) + (0))\n                point in direction ((([sin v] of ((timer) * (200)) ) * (5)) + (90))\n                set x to (1)\n            end\n        end\n    end\nend\n\nwhen I receive [play game v]\nhide\nstop [other scripts in sprite v]\n\nwhen flag clicked\nshow\nforever\n    repeat until <mouse down?>\n        if <touching (mouse-pointer v)?> then\n            change size by (((125) - (size)) / (3))\n        else\n            change size by (((100) - (size)) / (3))\n        end\n    end\nend\n\n@play button/ play game @\n\nwhen this sprite clicked\nplay sound [pop v] until done\nbroadcast (Play Game v)\n\nwhen flag clicked\nshow\nforever\n    repeat until <mouse down?>\n        if <touching (mouse-pointer v)?> then\n            change size by (((75) - (size)) / (3))\n        else\n            change size by (((50) - (size)) / (3))\n        end\n    end\nend\n\nwhen I receive [play game v]\nhide\n\nwhen I receive [play game v]\nhide\nstop [other scripts in sprite v]\n\n@tramp2\n\nwhen flag clicked\nhide\nswitch costume to (costume2 v)\nhide\ngo to x: (0) y: (0)\n\ndefine Boing time.   show\ngo to [front v] layer\nshow\nforever\n    if <touching (dude  v)?> then\n        start sound [Big Boing v]\n        repeat until <(costume [number v]) = [5]>\n            next costume\n        end\n        repeat until <(costume [number v]) = [1]>\n            switch costume to ((costume [number v]) - (1))\n        end\n        wait until <not <touching (dude  v)?>>\n    end\n    switch costume to (costume2 v)\nend\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        hide\n    end\n    if <(level) = [2]> then\n        hide\n    end\n    if <(level) = [3]> then\n        hide\n    end\n    if <(level) = [6]> then\n        hide\n    end\n    if <(level) = [8]> then\n        hide\n    end\nend\n\nhide\n\nwhen I receive [tramp 3.      <3> v]\ngo to x: (-105) y: (-90)\nBoing time.   show\n\nwhen flag clicked\nforever\n    if <(level) = [7]> then\n        hide\n    end\nend\n\nwhen I receive [clear v]\nhide\n\nwhen I receive [level 8 spikes v]\nhide\n\n@tramp3\n\nwhen flag clicked\nhide\nswitch costume to (costume2 v)\nhide\ngo to x: (0) y: (0)\n\ndefine Boing time.   show\ngo to [front v] layer\nshow\nforever\n    if <touching (dude  v)?> then\n        start sound [Big Boing v]\n        repeat until <(costume [number v]) = [5]>\n            next costume\n        end\n        repeat until <(costume [number v]) = [1]>\n            switch costume to ((costume [number v]) - (1))\n        end\n        wait until <not <touching (dude  v)?>>\n    end\n    switch costume to (costume2 v)\nend\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        hide\n    end\n    if <(level) = [2]> then\n        hide\n    end\n    if <(level) = [3]> then\n        hide\n    end\n    if <(level) = [6]> then\n        hide\n    end\n    if <(level) = [8]> then\n        hide\n    end\nend\n\nwhen I receive [tramp 3.      <3> v]\ngo to x: (105) y: (-90)\nBoing time.   show\n\nwhen I receive [clear v]\nhide\n\nwhen I receive [level 8 spikes v]\nhide\n\n@follow thingy\n\nwhen flag clicked\nhide\n\nwhen I receive [cave time yay v]\nshow\nforever\n    go to (dude  v)\nend\n\nwhen I receive [outside cloud v]\nhide\n\nwait (0.05) seconds\n\nwhen I receive [clear v]\nhide\n\n@Spikes level 2 \n\nwhen flag clicked\nhide\n\nforever\n    if <(level) = [2]> then\n    else\n        hide\n    end\nend\n\nwhen I receive [level2 spikes v]\nshow\n\nwhen I receive [level 3 spikes v]\nhide\n\nwhen I receive [clear v]\nhide\n\n@Spikes level 3\n\nwhen flag clicked\nhide\n\nwhen I receive [level 3 spikes v]\nshow\n\nwhen I receive [level4 spikes v]\nhide\n\nwhen I receive [clear v]\nhide\n\n@Spikes level 4\n\nwhen flag clicked\nhide\n\nwhen I receive [level4 spikes v]\nshow\n\nwhen I receive [level 5 spikes v]\nhide\n\nwhen I receive [clear v]\nhide\n\n@Spikes level 5\n\nwhen flag clicked\n\nwhen I receive [level 5 spikes v]\nshow\n\nwhen I receive [level 6 spikes v]\nhide\n\nwhen I receive [clear v]\nhide\n\n@Spikes level 6\n\nwhen flag clicked\nhide\n\nwhen I receive [level 6 spikes v]\nshow\n\nwhen I receive [level 7 spikes v]\nhide\n\nwhen I receive [clear v]\nhide\n\n@Spikes level 7\n\nwhen flag clicked\nhide\n\nwhen I receive [level 7 spikes v]\nshow\n\nwhen I receive [won v]\nhide\n\nwhen I receive [clear v]\nhide\n\nwhen I receive [level 8 spikes v]\nhide\n\n@nailthumb\n\nwhen flag clicked\nset [ghost v] effect to (0)\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n@Spikes level 8\n\nwhen flag clicked\nhide\n\nwhen I receive [level 8 spikes v]\nshow\n\nwhen I receive [level 9 spikes v]\nhide\n\nwhen I receive [clear v]\nhide\n\n@Spikes level 9\n\nwhen flag clicked\nhide\n\nwhen I receive [level 9 spikes v]\nshow\n\nwhen I receive [level 10 spikes v]\nhide\n\nwhen I receive [clear v]\nhide\n\n@Spikes level10\n\nwhen flag clicked\nhide\n\nwhen I receive [level 9 spikes v]\nhide\n\nwhen I receive [level 10 spikes v]\nshow\n\nwhen I receive [clear v]\nhide\n\nwhen I receive [level 11 spikes v]\nhide\n\n@Spikes level 11\n\nwhen flag clicked\nhide\n\nwhen I receive [level 9 spikes v]\nhide\n\nwhen I receive [level 11 spikes v]\nshow\n\nwhen I receive [clear v]\nhide\n\nwhen I receive [level 12 spikes v]\nhide\n\n@Spikes level 12\n\nwhen flag clicked\nhide\n\nwhen I receive [level 9 spikes v]\nhide\n\nwhen I receive [level 12 spikes v]\nshow\n\nwhen I receive [clear v]\nhide\n\nwhen I receive [level 13 spikes v]\nhide\n\n