cube explorer || A platformer
@Stage\n\nwhen I receive [startproject v]\nswitch backdrop to (backdrop1 v)\nforever\n    if <(level) = [9]> then\n        switch backdrop to (backdrop3 v)\n    else\n        switch backdrop to (backdrop1 v)\n    end\nend\n\n@player\n\nwhen flag clicked\nforever\n    if <<key (up arrow v) pressed?> and <not <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>>>> then\n        switch costume to (costume3 v)\n    end\n    if <not <key (up arrow v) pressed?>> then\n        switch costume to (costume1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<key (up arrow v) pressed?> and <<key (right arrow v) pressed?> or <key (left arrow v) pressed?>>> and <touching (ground v)?>> then\n        switch costume to (costume3 v)\n    end\nend\n\nwhen I receive [startproject v]\nwait (0.5) seconds\nforever\n    play sound [Music v] until done\nend\n\nwhen I receive [startproject v]\nset rotation style [left-right v]\nswitch costume to (costume1 v)\nbroadcast (check v)\npoint in direction (90)\nshow\ngo to x: (-217) y: (-20)\nset [x v] to [0]\nset [y v] to [0]\nforever\n    change [y v] by (-1)\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        point in direction (90)\n        change [x v] by (0.6)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        point in direction (-90)\n        change [x v] by (-0.6)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n            set [y v] to [10]\n            if <(x) > [0]> then\n                set [x v] to [-4]\n            else\n                set [x v] to [4]\n            end\n        else\n            set [x v] to [0]\n        end\n    end\n    change y by (y)\n    if <touching (ground v)?> then\n        change y by ((y) - ((y) * (2)))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<key (up arrow v) pressed?> and <touching (ground v)?>> then\n        set [y v] to [16]\n    end\n    change y by (1)\n    if <(x position) > [222]> then\n        set [x v] to [0]\n        set [y v] to [0]\n        broadcast (@cheekyscuola's Transition v)\n        broadcast (check v)\n        change [level v] by (1)\n        go to x: (-217) y: (-20)\n    end\n    if <<<touching (enemy v)?> or <touching (spikes v)?>> or <(y position) < [-163]>> then\n        set rotation style [all around v]\n        repeat (12)\n            change [ghost v] effect by (3)\n            turn right (12) degrees\n            change y by (12)\n        end\n        set rotation style [left-right v]\n        broadcast (check v)\n        point in direction (90)\n        set [ghost v] effect to (0)\n        go to x: (-217) y: (-20)\n    end\n    if <<touching (ladder v)?> and <key (up arrow v) pressed?>> then\n        set [y v] to [6]\n    end\n    if <touching (sprite3 v)?> then\n        set [y v] to [19]\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (costume2 v)\nrepeat (3)\n    change [ghost v] effect by (7)\n    change size by (-7)\nend\ndelete this clone\n\nwhen I receive [check v]\ngo to x: (-217) y: (-20)\npoint in direction (90)\n\n@ground\n\nwhen flag clicked\nhide\n\nwhen I receive [startproject v]\nshow\nset [level v] to [1]\nforever\n    switch costume to (level)\nend\n\n@enemy\n\nwhen I receive [check v]\nif <(level) = [1]> then\n    go to x: (25) y: (-70)\n    show\nend\nif <(level) = [2]> then\n    hide\nend\nif <(level) = [3]> then\n    hide\nend\nif <(level) = [4]> then\n    go to x: (40) y: (-75)\n    show\nend\nif <(level) = [5]> then\n    hide\nend\nif <(level) = [11]> then\n    go to x: (100) y: (-70)\n    show\nend\nif <(level) = [12]> then\n    hide\nend\n\nwhen flag clicked\nhide\nset rotation style [left-right v]\nforever\n    point in direction (-90)\n    repeat (30)\n        change x by (-4)\n    end\n    point in direction (90)\n    repeat (30)\n        change x by (4)\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 (pick random (40) to (70)) %\n    go to [back v] layer\n    set [ghost v] effect to (pick random (5) to (20))\n    if <(pick random (1) to (2)) = [1]> then\n        show\n        go to x: (-200) y: (pick random (20) to (180))\n        repeat (220)\n            change x by (2)\n        end\n        hide\n        wait (pick random (1) to (5)) seconds\n    end\n    if <(pick random (1) to (2)) = [2]> then\n        show\n        go to x: (220) y: (pick random (20) to (180))\n        repeat (110)\n            change x by (-4)\n        end\n        hide\n        wait (pick random (1) to (5)) seconds\n    end\nend\n\nwhen [timer v] > (Timer)\nhide\n\nwhen I receive [startproject v]\nrepeat (5)\n    create clone of (_myself_ v)\n    wait (1) seconds\nend\n\nwhen I start as a clone\nforever\n    if <(level) = [9]> then\n        hide\n    end\nend\n\n@ladder\n\nwhen flag clicked\nhide\n\nwhen I receive [startproject v]\nshow\ngo to [back v] layer\nforever\n    switch costume to (level)\nend\n\n@spikes\n\nwhen flag clicked\nhide\n\nwhen I receive [startproject v]\nshow\nforever\n    switch costume to (level)\nend\n\n@Sprite2\n\nwhen flag clicked\ngo to [front v] layer\n\nwhen flag clicked\nhide\n\nwhen I receive [startproject v]\nshow\nforever\n    if <key (o v) pressed?> then\n        hide\n    end\nend\n\nwhen I receive [startproject v]\nforever\n    switch costume to (level)\nend\n\n@Transition by @cheekyscuola \n\nwhen flag clicked\nhide\n\nwhen I receive [@cheekyscuola's transition v]\nswitch costume to (pick random (1) to (3))\ngo [forward v] (999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999) layers\nshow\nrepeat (20)\n    change y by (((0) - (y position)) / (4))\nend\nwait (0.2) seconds\nrepeat (20)\n    change y by (((345) - (y position)) / (4))\nend\nhide\n\n@logo\n\ndefine Add particle: X (x) Y (y) Direction (direction) Speed (vel) Times (repeat) with ARGB & Pen size (a) (r) (g) (b) (psize)\nadd (x) to [particles v]\nadd (y) to [particles v]\nadd (direction) to [particles v]\nadd (vel) to [particles v]\nadd (repeat) to [particles v]\nadd ((([floor v] of (a) ) * (16777216)) + ((([floor v] of (r) ) * (65536)) + ((([floor v] of (g) ) * (256)) + ([floor v] of (b) )))) to [particles v]\nadd (psize) to [particles v]\n\ndefine Particle Effect\nif <(length of [particles v]) > [100000]> then\n    delete (all) of [particles v]\nend\nerase all\nset [counter v] to [-1]\nrepeat ((length of [particles v]) / (7))\n    change [counter v] by (1)\n    replace item (((Counter) * (7)) + (5)) of [particles v] with ((item (((Counter) * (7)) + (5)) of [particles v]) - (1))\n    if <(item (((Counter) * (7)) + (5)) of [particles v]) < [1]> then\n        repeat (7)\n            delete (((Counter) * (7)) + (1)) of [particles v]\n        end\n    end\n    replace item (((Counter) * (7)) + (1)) of [particles v] with ((item (((Counter) * (7)) + (1)) of [particles v]) + (([sin v] of (item (((Counter) * (7)) + (3)) of [particles v]) ) * (item (((Counter) * (7)) + (4)) of [particles v])))\n    replace item (((Counter) * (7)) + (2)) of [particles v] with ((item (((Counter) * (7)) + (2)) of [particles v]) + (([cos v] of (item (((Counter) * (7)) + (3)) of [particles v]) ) * (item (((Counter) * (7)) + (4)) of [particles v])))\n    if <<([abs v] of (item (((Counter) * (7)) + (1)) of [particles v]) ) > [250]> or <([abs v] of (item (((Counter) * (7)) + (2)) of [particles v]) ) > [185]>> then\n        repeat (7)\n            delete (((Counter) * (7)) + (1)) of [particles v]\n        end\n    end\n    go to x: (item (((Counter) * (7)) + (1)) of [particles v]) y: (item (((Counter) * (7)) + (2)) of [particles v])\n    set pen color to (item (((Counter) * (7)) + (6)) of [particles v])\n    set pen size to (item (((Counter) * (7)) + (7)) of [particles v])\n    pen down\n    pen up\nend\n\nwhen flag clicked\nswitch backdrop to (backdrop2 v)\nintro\nbroadcast (startProject v)\n\ndefine intro\ngo to x: (0) y: (0)\nset size to (50) %\nclear graphic effects\nswitch costume to (download \(4\) v)\nshow\nset [my variable v] to [0]\ncreate clone of (_myself_ v)\ndelete all of [particles v]\nrepeat (90)\n    Add particle: X (x position) Y (y position) Direction (pick random (1) to (360)) Speed (pick random (3) to (5)) Times (pick random (40) to (50)) with ARGB & Pen size (pick random (200) to (250)) (pick random (100) to (200)) (pick random (100) to (200)) (pick random (100) to (200)) (10)\n    Add particle: X (x position) Y (y position) Direction (pick random (1) to (360)) Speed (pick random (5) to (2)) Times (pick random (40) to (50)) with ARGB & Pen size (pick random (200) to (250)) (pick random (100) to (200)) (pick random (100) to (200)) (pick random (100) to (200)) (10)\n    Particle Effect\n    point in direction ((([tan v] of ((timer) * (60)) ) * (100)) + (90))\n    go to x: (([sin v] of ((timer) * (225)) ) * (50)) y: (([sin v] of ((timer) * (120)) ) * (50))\n    set size to ((50) + (([sin v] of ((timer) * (225)) ) * (10))) %\nend\nrepeat (90)\n    Add particle: X (x position) Y (y position) Direction (pick random (1) to (360)) Speed (pick random (3) to (5)) Times (pick random (40) to (50)) with ARGB & Pen size (pick random (200) to (250)) (pick random (100) to (200)) (pick random (100) to (200)) (pick random (100) to (200)) (10)\n    Add particle: X (x position) Y (y position) Direction (pick random (1) to (360)) Speed (pick random (5) to (2)) Times (pick random (40) to (50)) with ARGB & Pen size (pick random (200) to (250)) (pick random (100) to (200)) (pick random (100) to (200)) (pick random (100) to (200)) (10)\n    Particle Effect\n    point in direction ((([tan v] of ((timer) * (60)) ) * (-100)) + (90))\n    go to x: (([sin v] of ((timer) * (225)) ) * (50)) y: (([sin v] of ((timer) * (120)) ) * (50))\nend\nhide\n\nwhen I start as a clone\nif <(my variable) = [0]> then\n    change [my variable v] by (1)\n    create clone of (_myself_ v)\n    point in direction (90)\n    switch costume to (download \(4\)2 v)\n    go to x: (0) y: (0)\n    clear graphic effects\n    set size to (100) %\nelse\n    hide\n    switch costume to (download \(4\) v)\n    set size to (1) %\n    set pen color to (#ffffff)\n    set pen size to (5)\n    set [my variable v] to [1]\n    go to x: (-84) y: (-123)\n    pen down\n    repeat (5)\n        change [my variable v] by (2)\n        glide (([sqrt v] of ((((item (my variable) of [directions v]) - (x position)) * ((item (my variable) of [directions v]) - (x position))) + (((item ((my variable) + (1)) of [directions v]) - (y position)) * ((item ((my variable) + (1)) of [directions v]) - (y position)))) ) / (200)) secs to x: (item (my variable) of [directions v]) y: (item ((my variable) + (1)) of [directions v])\n    end\n    pen up\n    go to x: (-51) y: (-133)\n    pen down\n    repeat (23)\n        change [my variable v] by (2)\n        glide (([sqrt v] of ((((item (my variable) of [directions v]) - (x position)) * ((item (my variable) of [directions v]) - (x position))) + (((item ((my variable) + (1)) of [directions v]) - (y position)) * ((item ((my variable) + (1)) of [directions v]) - (y position)))) ) / (200)) secs to x: (item (my variable) of [directions v]) y: (item ((my variable) + (1)) of [directions v])\n    end\n    pen up\n    go to x: (-5) y: (-156)\n    pen down\n    glide (([sqrt v] of ((((15) - (x position)) * ((15) - (x position))) + (((-156) - (y position)) * ((-156) - (y position)))) ) / (80)) secs to x: (14) y: (-156)\n    pen up\n    go to x: (37) y: (-125)\n    pen down\n    repeat (10)\n        change [my variable v] by (2)\n        glide (([sqrt v] of ((((item (my variable) of [directions v]) - (x position)) * ((item (my variable) of [directions v]) - (x position))) + (((item ((my variable) + (1)) of [directions v]) - (y position)) * ((item ((my variable) + (1)) of [directions v]) - (y position)))) ) / (200)) secs to x: (item (my variable) of [directions v]) y: (item ((my variable) + (1)) of [directions v])\n    end\n    pen up\n    go to x: (44) y: (-121)\n    pen down\n    glide (([sqrt v] of ((((47) - (x position)) * ((47) - (x position))) + (((-121) - (y position)) * ((-121) - (y position)))) ) / (80)) secs to x: (47) y: (-121)\n    glide (([sqrt v] of ((((47) - (x position)) * ((47) - (x position))) + (((-145) - (y position)) * ((-145) - (y position)))) ) / (80)) secs to x: (47) y: (-145)\n    pen up\n    go to x: (57) y: (-135)\n    pen down\n    repeat (16)\n        change [my variable v] by (2)\n        glide (([sqrt v] of ((((item (my variable) of [directions v]) - (x position)) * ((item (my variable) of [directions v]) - (x position))) + (((item ((my variable) + (1)) of [directions v]) - (y position)) * ((item ((my variable) + (1)) of [directions v]) - (y position)))) ) / (200)) secs to x: (item (my variable) of [directions v]) y: (item ((my variable) + (1)) of [directions v])\n    end\n    pen up\n    go to x: (75) y: (-143)\n    pen down\n    repeat (10)\n        change [my variable v] by (2)\n        glide (([sqrt v] of ((((item (my variable) of [directions v]) - (x position)) * ((item (my variable) of [directions v]) - (x position))) + (((item ((my variable) + (1)) of [directions v]) - (y position)) * ((item ((my variable) + (1)) of [directions v]) - (y position)))) ) / (200)) secs to x: (item (my variable) of [directions v]) y: (item ((my variable) + (1)) of [directions v])\n    end\n    pen up\nend\n\nwhen I receive [startproject v]\nswitch backdrop to (backdrop1 v)\nreset timer\nerase all\ndelete this clone\n\nwhen flag clicked\nplay sound [FR Xenogenesis v] until done\n\n@Sprite3\n\nwhen I receive [startproject v]\nshow\ngo to [back v] layer\nforever\n    if <(level) = [6]> then\n        go to x: (-137) y: (-36)\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [startproject v]\nforever\n    if <touching (player v)?> then\n        switch costume to (costume6 v)\n        repeat (3)\n            next costume\n        end\n        switch costume to (costume3 v)\n        repeat (3)\n            switch costume to ((costume [number v]) - (1))\n        end\n    end\nend\n\n@text\n\nwhen flag clicked\nhide\nforever\n    switch costume to (level)\nend\n\nwhen I receive [startproject v]\nshow\nforever\n    if <touching (player v)?> then\n        set [ghost v] effect to (70)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen flag clicked\nforever\n    set y to ((124) + (([sin v] of (((timer) - (3)) * (200)) ) * (9)))\nend\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [startproject v]\nshow\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        broadcast (@cheekyscuola's Transition v)\n        broadcast (check v)\n        change [level v] by (1)\n        wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n    end\nend\n\nwhen I receive [startproject v]\nforever\n    set y to ((-138) + (([sin v] of (((timer) - (3)) * (200)) ) * (9)))\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (10)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\n@Sprite4\n\nwhen flag clicked\nhide\n\nwhen I receive [startproject v]\nshow\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        broadcast (check v)\n        wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n    end\nend\n\nwhen I receive [startproject v]\nforever\n    set y to ((-138) + (([sin v] of (((timer) - (3)) * (200)) ) * (9)))\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (10)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\n@Sprite5\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\n
---------------------------intructions-----------------------------------\n-arrow keys to move\n-press the skip button to skip\n-the restart button to restart\n-have fun\n----------------------------------------------------------------------------\nyou are a cube who has been given a mission to find the golden temple but there are many enemys who have tryed to stop you with traps and gaurds can you escape?