Mini Block 3 | a platformer
@Stage\n\nwhen I receive [end of intro @jamnik-klembus v]\nswitch backdrop to ( v)\nforever\n    play sound [ParagonX9 - Chaoz Fantasy v] until done\nend\n\nwhen flag clicked\nswitch backdrop to (blank v)\n\n@Player\n\nwhen flag clicked\nhide\n\ndefine Run Game\nchange [speed y v] by (-1)\nif <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n    change [speed x v] by (-3)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [speed x v] by (3)\nend\nset [speed x v] to ((Speed X) * (.7))\nchange x by (Speed X)\nif <touching (ground v)?> then\n    change y by (1)\n    if <touching (ground v)?> then\n        change y by (1)\n        if <touching (ground v)?> then\n            change y by (1)\n            if <touching (ground v)?> then\n                change y by (1)\n                if <touching (ground v)?> then\n                    change y by (1)\n                    if <touching (ground v)?> then\n                        change y by (1)\n                        if <touching (ground v)?> then\n                            change y by (1)\n                            if <touching (ground v)?> then\n                                change y by (1)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nif <touching (ground v)?> then\n    change y by (-8)\n    repeat until <not <touching (ground v)?>>\n        change x by ((Speed X) * (-1))\n    end\n    if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n        set [speed y v] to [10]\n        if <(Speed X) < [0]> then\n            set [speed x v] to [16]\n        else\n            set [speed x v] to [-16]\n        end\n    else\n        set [speed x v] to [0]\n    end\nend\nchange y by (Speed Y)\nif <touching (ground v)?> then\n    repeat until <not <touching (ground v)?>>\n        change y by ((Speed Y) * (-1))\n    end\n    set [speed y v] to [0]\nend\nchange y by (-1)\nif <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <touching (ground v)?>> then\n    set [speed y v] to [14]\nend\nchange y by (1)\n\ndefine Next?\nif <(x position) < [-212]> then\n    set x to (-212)\nend\nif <(Level) = (Boss level)> then\n    if <<(x position) > [235]> and <(BOSS HP) = [0]>> then\n        Reset Player Position\n        change [level v] by (1)\n    end\nelse\n    if <(x position) > [235]> then\n        Reset Player Position\n        change [level v] by (1)\n    end\nend\nif <<(y position) < [-170]> or <<touching (spikes...  what else?!?! v)?> or <<touching (lava! v)?> or <touching (boss v)?>>>> then\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    if <<touching (boss v)?> and <(BOSS HP) = [0]>> then\n    Reset Player Position\nend\nif <touching (bouncy v)?> then\n    set [speed y v] to [20]\nend\n\ndefine Reset Player Position\nset [speed y v] to [0]\npoint in direction (90)\nclear graphic effects\ngo to x: (-200) y: (-10)\n\nwhen I receive [end of intro @jamnik-klembus v]\ngo to [front v] layer\nset [level v] to [1]\nshow\nset [speed y v] to [0]\nset [speed x v] to [0]\nset rotation style [left-right v]\nReset Player Position\nforever\n    Run Game\n    Next?\nend\n\nwhen I receive [end of intro @jamnik-klembus v]\nset [skip v] to [0]\nshow variable [time v]\nset [time v] to [0]\nWait until keys\nrepeat until <(Level) = [15]>\n    change [time v] by (.1)\n    wait (.08) seconds\n    if <(Skip) = [1]> then\n        hide variable [☁ highscore v]\n        hide variable [time v]\n        stop [this script v]\n    end\nend\nif <(Time) < (☁ Highscore)> then\n    set [☁ highscore v] to (Time)\n    set [☁ highscore v] to (join (letter (1) of (☁ Highscore)) (join (letter (2) of (☁ Highscore)) (join [.] (letter (4) of (☁ Highscore)))))\nend\nshow variable [☁ highscore v]\n\ndefine Wait until keys\nrepeat until <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>>>\n    if <(Skip) = [1]> then\n        hide variable [☁ highscore v]\n        hide variable [time v]\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide variable [☁ highscore v]\nhide variable [time v]\n\nwhen I receive [end of intro @jamnik-klembus v]\nset [skip v] to [0]\nforever\n    if <<key (s v) pressed?> and <<not <(Level) = (Boss level)>> and <not <(Level) = [15]>>>> then\n        set [skip v] to [1]\n        change [level v] by (1)\n        Reset Player Position\n        wait until <not <key (s v) pressed?>>\n    end\nend\n\n@Ground\n\nwhen I receive [end of intro @jamnik-klembus v]\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\n@Intro by @Jamnik-Klembus\n\nwhen flag clicked\ngo to [front v] layer\npoint in direction (90)\nclear graphic effects\nhide\nrepeat (1)\n    set [x v] to [-275]\n    repeat (7)\n        set [cloneid v] to [Lines]\n        change [x v] by (70)\n        wait (0.007) seconds\n        create clone of (_myself_ v)\n        change [color v] effect by (2)\n    end\nend\n\nwhen I start as a clone\nshow\nif <(CloneID) = [Lines]> then\n    set [pixelate v] effect to (200)\n    go to x: (X) y: (-1000)\n    switch costume to (lines v)\n    repeat until <(round (y position)) = [0]>\n        change y by (((0) - (round (y position))) / (5))\n    end\n    repeat (8)\n        repeat until <(round (y position)) = [50]>\n            change y by (((50) - (y position)) / (5))\n            change [color v] effect by (.5)\n            change [pixelate v] effect by (.5)\n        end\n        repeat until <(round (y position)) = [-50]>\n            change y by (((-50) - (y position)) / (5))\n            change [color v] effect by (.5)\n            change [pixelate v] effect by (.5)\n        end\n    end\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\nend\n\nwhen I start as a clone\nif <(CloneID) = [P]> then\n    switch costume to (pick random (3) to (8))\n    set size to (pick random (20) to (50)) %\n    set [ghost v] effect to (pick random (0) to (5))\n    set [brightness v] effect to (0)\n    point in direction (pick random (-180) to (180))\n    go to x: (0) y: (0)\n    set [x v] to (pick random (10) to (12))\n    set [i v] to (pick random (2.) to (9.))\n    go to [front v] layer\n    show\n    repeat until <touching (_edge_ v)?>\n        move (X) steps\n        change y by (I)\n        change [i v] by (-0.4)\n        set [x v] to ((X) * (.95))\n        change [ghost v] effect by (1)\n    end\n    delete this clone\nend\n\ndefine Paticles (?)\nset [cloneid v] to [P]\nrepeat (90)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\ngo to [front v] layer\nset [status v] to [Play]\nshow\nclear graphic effects\nswitch costume to (name v)\ngo to x: (-455) y: (-200)\nrepeat until <<(round (y position)) = [0]> and <(round (x position)) = [0]>>\n    set [bounce v] to (((Bounce) * (.8)) + (((0) - (y position)) / (5)))\n    change y by (Bounce)\n    change x by (((0) - (x position)) / (5))\n    go to [front v] layer\nend\nset rotation style [all around v]\ngo to [front v] layer\nPaticles [100]\nturn right (100) degrees\nwait (0) seconds\nwait until <(round (dir.)) = [90]>\ngo to [front v] layer\nPaticles [100]\nturn right (100) degrees\nwait (.9) seconds\nwait until <(round (dir.)) = [90]>\nset rotation style [don't rotate v]\nrepeat until <<(round (y position)) = [-200]> and <(round (x position)) = [455]>>\n    set [bounce v] to (((Bounce) * (.8)) + (((-200) - (y position)) / (5)))\n    change y by (Bounce)\n    change x by (((455) - (x position)) / (5))\n    go to [front v] layer\nend\nswitch costume to (new logo v)\nclear graphic effects\ngo to x: (-455) y: (-200)\nrepeat until <<(round (y position)) = [0]> and <(round (x position)) = [0]>>\n    set [bounce v] to (((Bounce) * (.8)) + (((0) - (y position)) / (5)))\n    change y by (Bounce)\n    change x by (((0) - (x position)) / (5))\n    go to [front v] layer\nend\nset [status v] to [Move]\nset rotation style [all around v]\ngo to [front v] layer\nturn right (100) degrees\nchange y by (-120)\nPaticles [100]\nwait (.9) seconds\nwait until <(round (dir.)) = [90]>\ngo to [front v] layer\nturn right (100) degrees\nchange y by (120)\nPaticles [100]\nwait (1) seconds\nwait until <(round (dir.)) = [90]>\nset rotation style [don't rotate v]\nset [status v] to [Stop]\nrepeat until <<(round (y position)) = [-200]> and <(round (x position)) = [298]>>\n    set [bounce v] to (((Bounce) * (.8)) + (((-200) - (y position)) / (5)))\n    change y by (Bounce)\n    change x by (((298) - (x position)) / (5))\n    go to [front v] layer\nend\nhide\nset [status v] to [Glide]\nset [cloneid v] to []\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\nset [status v] to [End]\nhide\n\nwhen flag clicked\nrepeat until <(Status) = [End]>\n    turn right (((90) - (direction)) / (10)) degrees\n    set [dir. v] to (direction)\n    go to [front v] layer\n    if <<not <(round (y position)) = [0]>> and <(Status) = [Move]>> then\n        set [bounce v] to (((Bounce) * (.8)) + (((0) - (y position)) / (5)))\n        change y by (Bounce)\n        go to [front v] layer\n    end\nend\n\nwhen I start as a clone\nif <(CloneID) = [Glide]> then\n    set rotation style [all around v]\n    show\n    switch costume to (glide v)\n    clear graphic effects\n    go to x: (-465) y: (345)\n    point in direction (-90)\n    repeat until <<(round (y position)) = [0]> and <<(round (x position)) = [0]> and <(round (direction)) = [90]>>>\n        go to [front v] layer\n        change x by (((0) - (x position)) / (5))\n        change y by (((0) - (y position)) / (5))\n        turn right (((90) - (direction)) / (7)) degrees\n    end\n    set [cloneid v] to [Glide 2]\n    create clone of (_myself_ v)\n    repeat (10)\n        change y by (3)\n    end\n    wait (.8) seconds\n    broadcast (End of intro @Jamnik-Klembus v)\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\nend\n\nwhen flag clicked\nstart sound [Julian Calor - Monster \(feat v]\nwait until <(Status) = [Glide]>\nset [cloneid v] to [Glide]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(CloneID) = [Glide 2]> then\n    set rotation style [all around v]\n    show\n    switch costume to (glide2 v)\n    clear graphic effects\n    set [ghost v] effect to (100)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    go to x: (0) y: (0)\n    wait (.8) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\nend\n\nwhen I receive [end of intro @jamnik-klembus v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@Words\n\nwhen I receive [end of intro @jamnik-klembus v]\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\nwhen I receive [end of intro @jamnik-klembus v]\nshow\nforever\n    repeat until <(round (y position)) = [0]>\n        change y by (((0) - (y position)) / (10))\n    end\n    repeat until <(round (y position)) = [20]>\n        change y by (((20) - (y position)) / (10))\n    end\nend\n\n@Spikes...  WHAT ELSE?!?!\n\nwhen I receive [end of intro @jamnik-klembus v]\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\n@Lava!\n\nwhen I receive [end of intro @jamnik-klembus v]\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [end of intro @jamnik-klembus v]\nshow\nforever\n    go to [back v] layer\n    repeat until <(round (y position)) = [0]>\n        change y by (((0) - (y position)) / (10))\n    end\n    repeat until <(round (y position)) = [-20]>\n        change y by (((-20) - (y position)) / (10))\n    end\nend\n\n@Boss\n\nwhen I receive [reset boss v]\nset x to (185)\nset [random x v] to (pick random (-213) to (0))\n\nwhen I receive [end of intro @jamnik-klembus v]\nwait (1) seconds\nwait until <<(BOSS HP) = [0]> or <(BOSS HP) < [0]>>\nhide variable [boss hp v]\nswitch costume to (boss2 v)\nrepeat (50)\n    stop [other scripts in sprite v]\n    change [ghost v] effect by (2)\nend\nhide\n\nwhen I receive [end of intro @jamnik-klembus v]\nforever\n    if <touching (ball v)?> then\n        change [boss hp v] by (-1)\n        wait until <not <touching (ball v)?>>\n    end\nend\n\nwhen I receive [end of intro @jamnik-klembus v]\nhide\nset [level v] to [1]\nset [boss hp v] to [10]\nwait until <(Level) = (Boss level)>\nset x to (213)\nshow\nswitch costume to (boss v)\nsay [HAHAHA!!! TRY TO BEAT ME!!!] for (2) seconds\nshow variable [boss hp v]\nforever\n    repeat until <(round (x position)) = [213]>\n        change x by (((213) - (x position)) / (15))\n    end\n    repeat until <(round (x position)) = (random X)>\n        change x by (((random X) - (x position)) / (10))\n    end\n    set [random x v] to (pick random (-160) to (0))\nend\n\n@Ball\n\nwhen I receive [end of intro @jamnik-klembus v]\nhide\nwait until <(Level) = (Boss level)>\nforever\n    go to (player v)\n    wait until <key (space v) pressed?>\n    show\n    go to (player v)\n    point towards (mouse-pointer v)\n    repeat until <<touching (ground v)?> or <<touching (_edge_ v)?> or <<touching (boss v)?> and <not <(BOSS HP) = [0]>>>>>\n        move (10) steps\n    end\n    hide\n    wait until <not <key (space v) pressed?>>\nend\n\nwhen I receive [end of intro @jamnik-klembus v]\nhide\nwait until <(Level) = ((Boss level) + (1))>\nhide\nstop [other scripts in sprite v]\n\n@Bouncy\n\nwhen I receive [end of intro @jamnik-klembus v]\nshow\nforever\n    go to [back v] layer\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@tb\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    reset timer\nend\n\nwhen [timer v] > (0)\nhide\nbroadcast (End of intro @Jamnik-Klembus v)\n\nwhen I receive [end of intro @jamnik-klembus v]\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    reset timer\nend\n\n
Mini Block 3!!!\nYess, you can't stop this project B)\n\nALL LEVELS ARE POSSIBLE!\n\nS - skip level\n\nNa 50 serc i gwiazdek więcej poziomów!\n\nNa 200 serc = MINI BLOCK 4