Blockz 3D Platformer (99.99% Pen)

Instructions:          ---------------[Blockz 3D Platformer]--------------         \nA fun 3D platformer that requires skill and patience     \n\n-Please scroll down to read info/controls\n\n-STOP ADVERTISING OR YOU WILL BE REPORTED\n\n-FEATURED????? TYSM! I never thought this would blow up! I got a new racing game in the works so be sure to check it out when it comes out\n\n-FOR EVERYBODY WONDERING YES I DID USE  @ggenije's TUTORIAL BUT I STILL CODED IT ALL AND MADE ALL OF THE LEVELS - ALSO HE MADE A TUTORIAL FOR A REASON\n\n-Turbowarp link - https://turbowarp.org/961182247?hqpen&fps=250\n\n- 40+ hours of coding please consider liking, favoriting and following\n\n-Controls\n\n-WASD to move\n-Arrow keys or mouse to move camera\n-Press the spacebar to jump\n-Press T to show time\n-Press R to respawn\n\n-Notes\n-Post your time in the comments\n-If any bugs are found please tell me\n\n-Credit to @ggenije for the tutorial\n\n-Tags\n\n\n#Games #Fun #All #Animation #Platformer #3D #Games #Fun #All #Animation #Platformer #3D #Games #Fun #All #Animation #Platformer #3D #Games #Fun #All #Animation #Platformer #3D #Games #Fun #All #Animation #Platformer #3D #Games #Fun #All #Animation #Platformer #3D #Games #Fun #All #Animation #Platformer #3D #Games #Fun #All #Animation #Platformer #3D #Games #Fun #All #Animation #Platformer #3D #Games #Fun #All #Animation #Platformer #3D #Games #Fun #All #Animation #Platformer #3D #Games #Fun #All #Animation #Platformer #3D #Games #Fun #All #Animation #Platformer #3D 

@Stage\n\nwhen flag clicked\nforever\n    play sound (pick random (1) to (2)) until done\nend\n\n@blank\n\n@Game loop\n\nwhen flag clicked\nbroadcast (init v) and wait\nset [oldtime v] to (timer)\nforever\n    Game loop\nend\n\ndefine Game loop\nset [deltatime v] to ((timer) - (oldTime))\nset [oldtime v] to (timer)\nbroadcast (update v)\nerase all\nbroadcast (draw v)\n\nwhen flag clicked\nforever\n    broadcast (forever v)\nend\n\n@Draw\n\ndefine Set Point 1 (x) (y) (z)\nset [x1 v] to (x)\nset [y1 v] to (y)\nset [z1 v] to (z)\n\ndefine Set Point 2 (x) (y) (z)\nset [x2 v] to (x)\nset [y2 v] to (y)\nset [z2 v] to (z)\n\ndefine Init trigonometry\nset [sinx v] to ([sin v] of (CameraRotX) )\nset [cosx v] to ([cos v] of (CameraRotX) )\nset [siny v] to ([sin v] of (CameraRotY) )\nset [cosy v] to ([cos v] of (CameraRotY) )\n\ndefine Z clipping\nif <<(z1) < (NearZ)> or <(z2) < (NearZ)>> then\n    set [p v] to (((NearZ) - (z1)) / ((z2) - (z1)))\n    if <(z1) < (NearZ)> then\n        Set Point 1 ((x1) + (((x2) - (x1)) * (p))) ((y1) + (((y2) - (y1)) * (p))) (NearZ)\n    else\n        Set Point 2 ((x1) + (((x2) - (x1)) * (p))) ((y1) + (((y2) - (y1)) * (p))) (NearZ)\n    end\nend\n\ndefine Draw 3D line - p1 (x1) (y1) (z1) p2 (x2) (y2) (z2) size (size)\nSet Point 1 ((x1) - (CameraX)) ((y1) - (CameraY)) ((z1) - (CameraZ))\nSet Point 2 ((x2) - (CameraX)) ((y2) - (CameraY)) ((z2) - (CameraZ))\nSet Point 1 (((z1) * (sinY)) + ((x1) * (cosY))) (y1) (((z1) * (cosY)) - ((x1) * (sinY)))\nSet Point 2 (((z2) * (sinY)) + ((x2) * (cosY))) (y2) (((z2) * (cosY)) - ((x2) * (sinY)))\nSet Point 1 (x1) (((y1) * (cosX)) - ((z1) * (sinX))) (((y1) * (sinX)) + ((z1) * (cosX)))\nSet Point 2 (x2) (((y2) * (cosX)) - ((z2) * (sinX))) (((y2) * (sinX)) + ((z2) * (cosX)))\nif <<(z1) > (NearZ)> or <(z2) > (NearZ)>> then\n    Z clipping\n    set pen size to (((size) / (((z1) + (z2)) / (2))) * (FL))\n    go to x: (((x1) / (z1)) * (FL)) y: (((y1) / (z1)) * (FL))\n    pen down\n    go to x: (((x2) / (z2)) * (FL)) y: (((y2) / (z2)) * (FL))\n    pen up\nend\n\ndefine Init\nset [nearz v] to [0.3]\nset [fl v] to [300]\n\ndefine Draw\nInit trigonometry\nswitch costume to (small v)\nset size to ((1) / (0)) %\nswitch costume to (big v)\nBlock Order\nDraw All Blocks\n\nwhen I receive [draw v]\nDraw\n\nwhen I receive [init v]\nInit\n\ndefine Draw Block at (x) (y) (z) size (sizex) (sizey) (sizez)\nDraw 3D line - p1 ((x) + ()) ((y) + ()) ((z) + ()) p2 ((x) + (sizex)) ((y) + ()) ((z) + ()) size (PEN SIZE)\nDraw 3D line - p1 ((x) + (sizex)) ((y) + ()) ((z) + ()) p2 ((x) + (sizex)) ((y) + (sizey)) ((z) + ()) size (PEN SIZE)\nDraw 3D line - p1 ((x) + (sizex)) ((y) + (sizey)) ((z) + ()) p2 ((x) + ()) ((y) + (sizey)) ((z) + ()) size (PEN SIZE)\nDraw 3D line - p1 ((x) + ()) ((y) + (sizey)) ((z) + ()) p2 ((x) + ()) ((y) + ()) ((z) + ()) size (PEN SIZE)\nDraw 3D line - p1 ((x) + ()) ((y) + ()) ((z) + (sizez)) p2 ((x) + (sizex)) ((y) + ()) ((z) + (sizez)) size (PEN SIZE)\nDraw 3D line - p1 ((x) + (sizex)) ((y) + ()) ((z) + (sizez)) p2 ((x) + (sizex)) ((y) + (sizey)) ((z) + (sizez)) size (PEN SIZE)\nDraw 3D line - p1 ((x) + (sizex)) ((y) + (sizey)) ((z) + (sizez)) p2 ((x) + ()) ((y) + (sizey)) ((z) + (sizez)) size (PEN SIZE)\nDraw 3D line - p1 ((x) + ()) ((y) + (sizey)) ((z) + (sizez)) p2 ((x) + ()) ((y) + ()) ((z) + (sizez)) size (PEN SIZE)\nDraw 3D line - p1 ((x) + ()) ((y) + ()) ((z) + ()) p2 ((x) + ()) ((y) + ()) ((z) + (sizez)) size (PEN SIZE)\nDraw 3D line - p1 ((x) + (sizex)) ((y) + ()) ((z) + ()) p2 ((x) + (sizex)) ((y) + ()) ((z) + (sizez)) size (PEN SIZE)\nDraw 3D line - p1 ((x) + ()) ((y) + (sizey)) ((z) + ()) p2 ((x) + ()) ((y) + (sizey)) ((z) + (sizez)) size (PEN SIZE)\nDraw 3D line - p1 ((x) + (sizex)) ((y) + (sizey)) ((z) + ()) p2 ((x) + (sizex)) ((y) + (sizey)) ((z) + (sizez)) size (PEN SIZE)\n\ndefine Draw All Blocks\nset [i v] to [0]\nrepeat (length of [layerids v])\n    change [i v] by (1)\n    set [getid v] to (item (i) of [layerids v])\n    set pen color to (item (getID) of [blockcolor v])\n    set pen (transparency v) to (30)\n    Draw Block at (item (getID) of [blockx v]) (item (getID) of [blocky v]) (item (getID) of [blockz v]) size (item (getID) of [blocksizex v]) (item (getID) of [blocksizey v]) (item (getID) of [blocksizez v])\nend\n\ndefine Block Order\ndelete all of [layerids v]\ndelete all of [layervalues v]\nset [i v] to [0]\nrepeat (length of [blockx v])\n    change [i v] by (1)\n    set [vx v] to (((item (i) of [blockx v]) + ((item (i) of [blocksizex v]) / (2))) - (CameraX))\n    set [vy v] to (((item (i) of [blocky v]) + ((item (i) of [blocksizey v]) / (2))) - (CameraY))\n    set [vz v] to (((item (i) of [blockz v]) + ((item (i) of [blocksizez v]) / (2))) - (CameraZ))\n    set [z v] to (((vx) * (vx)) + (((vy) * (vy)) + ((vz) * (vz))))\n    add (z) to [layervalues v]\n    set [sort_low v] to [1]\n    set [sort_high v] to (length of [layervalues v])\n    repeat until <not <(sort_Low) < (sort_High)>>\n        set [sort_mid v] to ([floor v] of (((sort_Low) + (sort_High)) / (2)) )\n        if <(z) < (item (item (sort_Mid) of [layerids v]) of [layervalues v])> then\n            set [sort_low v] to ((sort_Mid) + (1))\n        else\n            set [sort_high v] to (sort_Mid)\n        end\n    end\n    insert (i) at (sort_Low) of [layerids v] \nend\n\nwhen flag clicked\nset [pen size v] to [0.1]\n\n@Update\n\nwhen I receive [init level v]\nset [collision v] to [0]\nset [playervely v] to [0]\n\nwhen I receive [update v]\nUpdate\n\ndefine Update\nUpdate Camera Rotation\nUpdate Player\nPlayer Shadow\nUpdate Camera Position\nreplace item (1) of [blockx v] with (PlayerX)\nreplace item (1) of [blocky v] with (PlayerY)\nreplace item (1) of [blockz v] with (PlayerZ)\nreplace item (2) of [blockx v] with (PlayerX)\nreplace item (2) of [blocky v] with (ShadowY)\nreplace item (2) of [blockz v] with (PlayerZ)\n\ndefine Update Camera Rotation\nchange [camerarotx v] by ((<key (up arrow v) pressed?> - <key (down arrow v) pressed?>) * ((180) * (DeltaTime)))\nchange [cameraroty v] by ((<key (right arrow v) pressed?> - <key (left arrow v) pressed?>) * ((-180) * (DeltaTime)))\nif <mouse down?> then\n    if <(mouseRotation) = [0]> then\n        set [mouserotation v] to [1]\n        set [mouseox v] to (mouse x)\n        set [mouseoy v] to (mouse y)\n    else\n        change [camerarotx v] by (((mouse y) - (mouseOy)) * (0.5))\n        change [cameraroty v] by (((mouse x) - (mouseOx)) * (-0.5))\n        set [mouseox v] to (mouse x)\n        set [mouseoy v] to (mouse y)\n    end\nelse\n    set [mouserotation v] to [0]\nend\nif <(CameraRotX) < [-90]> then\n    set [camerarotx v] to [-90]\nend\nif <(CameraRotX) > [30]> then\n    set [camerarotx v] to [30]\nend\n\ndefine Update Camera Position\nset [camerax v] to (((PlayerX) + ((PlayerSize) / (2))) + ((8) * (([sin v] of (CameraRotY) ) * ([cos v] of (CameraRotX) ))))\nset [cameray v] to (((PlayerY) + ((PlayerSize) / (2))) + ((-8) * ([sin v] of (CameraRotX) )))\nset [cameraz v] to (((PlayerZ) + ((PlayerSize) / (2))) + ((-8) * (([cos v] of (CameraRotY) ) * ([cos v] of (CameraRotX) ))))\n\ndefine Check Player Collision\nif <(collision) = [end]> then\n    stop [this script v]\nend\ndelete all of [collisionid v]\ndelete all of [collisiontype v]\nset [c v] to [2]\nset [collision v] to [0]\nrepeat ((length of [blockx v]) - (2))\n    change [c v] by (1)\n    if <<(PlayerX) < ((item (c) of [blockx v]) + (item (c) of [blocksizex v]))> and <((PlayerX) + (PlayerSize)) > (item (c) of [blockx v])>> then\n        if <<(PlayerY) < ((item (c) of [blocky v]) + (item (c) of [blocksizey v]))> and <((PlayerY) + (PlayerSize)) > (item (c) of [blocky v])>> then\n            if <<(PlayerZ) < ((item (c) of [blockz v]) + (item (c) of [blocksizez v]))> and <((PlayerZ) + (PlayerSize)) > (item (c) of [blockz v])>> then\n                set [collision v] to [1]\n                add (c) to [collisionid v]\n                add (item (c) of [block type v]) to [collisiontype v]\n            end\n        end\n    end\nend\nif <[collisiontype v] contains [end]?> then\n    start sound [end v]\n    set [collision v] to [end]\n    change [level v] by (1)\n    broadcast (Init Level v)\nend\nif <<[collisiontype v] contains [lava]?> or <(PlayerY) < [-10]>> then\n    start sound [die v]\n    set [playerx v] to (PlayerStartX)\n    set [playery v] to (PlayerStartY)\n    set [playerz v] to (PlayerStartZ)\n    set [playervely v] to [0]\n    set [camerarotx v] to [-20]\n    set [cameraroty v] to [0]\n    set [collision v] to [0]\nend\n\ndefine Update Player\nPlayer Y movement <(PlayerVelY) > [0]>\nset [movex v] to (<key (d v) pressed?> - <key (a v) pressed?>)\nset [movez v] to (<key (w v) pressed?> - <key (s v) pressed?>)\nset [mag v] to ([sqrt v] of (((moveX) * (moveX)) + ((moveZ) * (moveZ))) )\nif <(mag) > [0]> then\n    set [movex v] to (((moveX) / (mag)) * ((DeltaTime) * (PLAYER SPEED)))\n    set [movez v] to (((moveZ) / (mag)) * ((DeltaTime) * (PLAYER SPEED)))\n    Player XZ movement (((moveX) * ([cos v] of (CameraRotY) )) - ((moveZ) * ([sin v] of (CameraRotY) ))) (((moveX) * ([sin v] of (CameraRotY) )) + ((moveZ) * ([cos v] of (CameraRotY) )))\nend\n\ndefine Player Y movement <ydir>\nchange [playery v] by ((PlayerVelY) * (DeltaTime))\nchange [playervely v] by ((-15) * (DeltaTime))\nif <(PlayerVelY) < [-8]> then\n    set [playervely v] to [-8]\nend\nchange [playery v] by (((<ydir> * (2)) - (1)) * (0.001))\nCheck Player Collision\nif <(collision) = [1]> then\n    set [playervely v] to [0]\n    if <ydir> then\n        set [c v] to [0]\n        repeat (length of [collisionid v])\n            change [c v] by (1)\n            set [gety v] to ((item (item (c) of [collisionid v]) of [blocky v]) - (PlayerSize))\n            if <(getY) < (PlayerY)> then\n                set [playery v] to (getY)\n            end\n        end\n    else\n        set [c v] to [0]\n        repeat (length of [collisionid v])\n            change [c v] by (1)\n            set [gety v] to ((item (item (c) of [collisionid v]) of [blocky v]) + (item (item (c) of [collisionid v]) of [blocksizey v]))\n            if <(getY) > (PlayerY)> then\n                set [playery v] to (getY)\n            end\n        end\n        if <key (space v) pressed?> then\n            set [playervely v] to (JUMP HEIGHT)\n            start sound [jump v]\n        end\n        if <[collisiontype v] contains [bouncy]?> then\n            set [playervely v] to [8]\n            start sound [bouncy v]\n        end\n        if <<[collisiontype v] contains [bouncy]?> and <<<(Level) = [6]> or <(Level) = [7]>> or >> then\n            set [playervely v] to [15]\n            start sound [bouncy v]\n        end\n        if <<[collisiontype v] contains [bouncy]?> and <(Level) = [8]>> then\n            set [playervely v] to [13]\n            start sound [bouncy v]\n        end\n        if <[collisiontype v] contains [small]?> then\n            set [playersize v] to [2]\n        end\n    end\nelse\n    change [playery v] by (((<ydir> * (2)) - (1)) * (-0.001))\nend\n\ndefine Player XZ movement (x) (z)\nchange [playerx v] by (x)\nCheck Player Collision\nif <(collision) = [1]> then\n    change [playerx v] by (() - (x))\nend\nchange [playerz v] by (z)\nCheck Player Collision\nif <(collision) = [1]> then\n    change [playerz v] by (() - (z))\nend\n\nwhen flag clicked\nset [jump height v] to [6]\nset [player speed v] to [4]\n\ndefine Player Shadow\nset [c v] to [2]\nset [shadowy v] to [-9999999999999999999]\nrepeat ((length of [blockx v]) - (2))\n    change [c v] by (1)\n    if <<(PlayerX) < ((item (c) of [blockx v]) + (item (c) of [blocksizex v]))> and <((PlayerX) + (PlayerSize)) > (item (c) of [blockx v])>> then\n        if <<(PlayerZ) < ((item (c) of [blockz v]) + (item (c) of [blocksizez v]))> and <((PlayerZ) + (PlayerSize)) > (item (c) of [blockz v])>> then\n            set [gety v] to ((item (c) of [blocky v]) + (item (c) of [blocksizey v]))\n            if <<(ShadowY) < (getY)> and <not <(PlayerY) < (getY)>>> then\n                set [shadowy v] to (getY)\n            end\n        end\n    end\nend\n\n@Levels\n\nwhen I receive [init v]\nInit\n\ndefine Init level\ndelete all of [blockx v]\ndelete all of [blocky v]\ndelete all of [blockz v]\ndelete all of [blocksizex v]\ndelete all of [blocksizey v]\ndelete all of [blocksizez v]\ndelete all of [blockcolor v]\ndelete all of [block type v]\nset [camerarotx v] to [-20]\nset [camerarotx v] to [0]\nif <(Level) = [1]> then\n    Level 1\n    stop [this script v]\nend\nif <(Level) = [2]> then\n    Level 2\n    stop [this script v]\nend\nif <(Level) = [3]> then\n    Level 3\n    stop [this script v]\nend\nif <(Level) = [4]> then\n    Level 4\n    stop [this script v]\nend\nif <(Level) = [5]> then\n    Level 5\n    stop [this script v]\nend\nif <(Level) = [6]> then\n    Level 6\n    stop [this script v]\nend\nif <(Level) = [7]> then\n    Level 7\n    stop [this script v]\nend\nif <(Level) = [8]> then\n    Level 8\n    stop [this script v]\nend\nif <(Level) = [9]> then\n    Level 9\n    stop [this script v]\nend\nif <(Level) = [10]> then\n    Level 10\n    stop [this script v]\nend\nif <(Level) = [11]> then\n    Level 11\nend\n\nwhen I receive [init level v]\nInit level\n\ndefine Add Block at (x) (y) (z) size (sizex) (sizey) (sizez) type (type)\nadd (x) to [blockx v]\nadd (y) to [blocky v]\nadd (z) to [blockz v]\nadd (sizex) to [blocksizex v]\nadd (sizey) to [blocksizey v]\nadd (sizez) to [blocksizez v]\nadd (item (item # of (type) in [block type name v]) of [block type color v]) to [blockcolor v]\nadd (type) to [block type v]\n\ndefine Level 1\nAdd Player [0] [0] [0]\nAdd Block at [-2] [0] [-2] size [5] [1] [5] type [ground]\nAdd Block at [0] [0] [4] size [1] [1] [1] type [bouncy]\nAdd Block at [0] [0] [6] size [1] [1] [1] type [lava]\nAdd Block at [0] [0] [8] size [1] [1] [1] type [bouncy]\nAdd Block at [-1] [0] [10] size [3] [1] [3] type [ground]\nAdd Block at [0] [1] [11] size [1] [1] [1] type [end]\n\ndefine Add Player (x) (y) (z)\nset [playerx v] to (x)\nset [playery v] to (y)\nset [playerz v] to (z)\nset [playerstartx v] to (x)\nset [playerstarty v] to (y)\nset [playerstartz v] to (z)\nAdd Block at (PlayerX) (PlayerY) (PlayerZ) size (PlayerSize) (PlayerSize) (PlayerSize) type [player]\nAdd Block at [0] [0] [0] size (PlayerSize) [0] (PlayerSize) type [shadow]\n\ndefine Add block Type (name) color (r) (g) (b)\nadd (name) to [block type name v]\nadd ((((r) * (65536)) + ((g) * (256))) + (b)) to [block type color v]\n\ndefine Init Block Types\nAdd block Type [player] color [100] [255] [255]\nAdd block Type [shadow] color [100] [100] [255]\nAdd block Type [ground] color [255] [255] [255]\nAdd block Type [end] color [0] [255] [0]\nAdd block Type [lava] color [255] [0] [0]\nAdd block Type [bouncy] color [255] [255] [0]\nAdd block Type [ice] color [161] [231] [247]\n\ndefine Init\nset [playersize v] to [0.8]\ndelete all of [block type name v]\ndelete all of [block type color v]\nInit Block Types\nbroadcast (Init Level v)\n\ndefine Level 2\nAdd Player [-9] [-3] [3]\nAdd Block at [-0.5] [0] [-0.5] size [2] [1] [8] type [ground]\nAdd Block at [-0.5] [0] [9] size [2] [1] [2] type [bouncy]\nAdd Block at [-7.5] [1.5] [9] size [6] [1] [2] type [ground]\nAdd Block at [-7] [2.5] [9.5] size [1] [0.5] [1] type [end]\nAdd Block at [0.5] [1] [1.5] size [1] [0.5] [2] type [lava]\nAdd Block at [-0.5] [1] [5] size [1] [0.5] [2.5] type [lava]\nAdd Block at [-1.9] [2.5] [9] size [0.1] [2] [0.1] type [lava]\nAdd Block at [-3] [2.5] [11] size [0.1] [2] [0.1] type [lava]\nAdd Block at [-3.5] [2.5] [10] size [0.1] [2] [0.1] type [lava]\nAdd Block at [-5] [2.5] [9] size [0.1] [2] [0.1] type [lava]\nAdd Block at [-5] [2.5] [10.8] size [0.1] [2] [0.1] type [lava]\nAdd Block at [-3.5] [-1] [-0.5] size [2] [1] [2] type [bouncy]\nAdd Block at [-6.5] [-2] [-0.5] size [2] [1] [2] type [bouncy]\nAdd Block at [-6.5] [-3] [2.5] size [2] [1] [2] type [bouncy]\nAdd Block at [-9.5] [-4] [2.5] size [2] [1] [2] type [ground]\n\ndefine Level 3\nAdd Player [0] [1] [0]\nAdd Block at [0] [0] [0] size [5] [1] [5] type [ground]\nAdd Block at [2] [1] [2] size [1] [11] [1] type [ground]\nAdd Block at [0] [1] [2] size [1] [1] [1] type [bouncy]\nAdd Block at [0] [2] [4] size [1] [1] [1] type [bouncy]\nAdd Block at [2] [3] [4] size [1] [1] [1] type [bouncy]\nAdd Block at [4] [4] [4] size [1] [1] [1] type [bouncy]\nAdd Block at [4] [5] [2] size [1] [1] [1] type [bouncy]\nAdd Block at [4] [6] [0] size [1] [1] [1] type [bouncy]\nAdd Block at [2] [7] [0] size [1] [1] [1] type [bouncy]\nAdd Block at [0] [8] [0] size [1] [1] [1] type [bouncy]\nAdd Block at [0] [9] [2] size [1] [1] [1] type [bouncy]\nAdd Block at [2] [12] [2] size [1] [1] [1] type [end]\n\ndefine Level 4\nAdd Player [0.5] [0] [-1.5]\nAdd Block at [-1] [0] [-2] size [4] [1] [4] type [ground]\nAdd Block at [2] [1] [2] size [1] [1] [1] type [bouncy]\nAdd Block at [-1] [3] [2] size [1] [1] [1] type [bouncy]\nAdd Block at [2] [5] [2] size [1] [1] [1] type [bouncy]\nAdd Block at [-1] [7] [2] size [1] [1] [1] type [bouncy]\nAdd Block at [2] [9] [2] size [1] [1] [1] type [bouncy]\nAdd Block at [-1] [11] [2] size [1] [1] [1] type [bouncy]\nAdd Block at [2] [13] [2] size [1] [1] [1] type [bouncy]\nAdd Block at [2] [13] [4] size [1] [1] [6] type [ground]\nAdd Block at [2] [14] [5] size [1] [0.5] [1] type [lava]\nAdd Block at [2] [14] [6] size [1] [1] [1] type [bouncy]\nAdd Block at [2] [14] [7] size [1] [2] [1] type [lava]\nAdd Block at [2] [14] [8] size [1] [3] [1] type [bouncy]\nAdd Block at [2] [14] [9] size [1] [4] [1] type [lava]\nAdd Block at [1.5] [14] [12] size [2] [1] [4] type [ground]\nAdd Block at [1.5] [14] [17] size [2] [1] [2] type [bouncy]\nAdd Block at [-0.5] [16] [17] size [2] [1] [2] type [bouncy]\nAdd Block at [-0.5] [17] [14] size [2] [1] [2] type [ground]\nAdd Block at [0] [18] [14.5] size [1] [1] [1] type [end]\n\ndefine Level 5\nAdd Player [0] [0] [0]\nAdd Block at [-1] [0] [-1] size [3] [1] [3] type [ground]\nAdd Block at [-5] [0] [0] size [4] [1] [1] type [ground]\nAdd Block at [-3] [1] [0] size [1] [0.25] [1] type [lava]\nAdd Block at [-5] [1] [0] size [1] [0.25] [1] type [bouncy]\nAdd Block at [-5] [0] [0] size [1] [1] [5] type [ground]\nAdd Block at [-5] [1] [2] size [1] [0.25] [1] type [lava]\nAdd Block at [-4] [1] [4] size [1] [1] [1] type [bouncy]\nAdd Block at [-2] [3] [4] size [1] [1] [1] type [bouncy]\nAdd Block at [0] [5] [4] size [1] [1] [1] type [bouncy]\nAdd Block at [2] [7] [4] size [1] [1] [1] type [bouncy]\nAdd Block at [2] [9] [2] size [1] [1] [1] type [bouncy]\nAdd Block at [2] [11] [0] size [1] [1] [1] type [bouncy]\nAdd Block at [0] [13] [0] size [1] [1] [1] type [bouncy]\nAdd Block at [-2] [15] [0] size [1] [1] [1] type [bouncy]\nAdd Block at [-2] [17] [2] size [1] [1] [1] type [bouncy]\nAdd Block at [-2] [19] [4] size [1] [1] [1] type [bouncy]\nAdd Block at [-2] [21] [6] size [1] [1] [1] type [bouncy]\nAdd Block at [-3.5] [21] [8] size [0.75] [1] [4] type [ground]\nAdd Block at [-0.25] [21] [8] size [0.75] [1] [4] type [ground]\nAdd Block at [-3.5] [21] [8] size [4] [1] [0.75] type [ground]\nAdd Block at [-3.5] [21] [11.25] size [4] [1] [0.75] type [ground]\nAdd Block at [-3.5] [6] [8] size [0.25] [15] [4] type [lava]\nAdd Block at [0.25] [6] [8] size [0.25] [15] [4] type [lava]\nAdd Block at [-3.5] [6] [8] size [4] [15] [0.25] type [lava]\nAdd Block at [-3.5] [6] [11.75] size [4] [15] [0.25] type [lava]\nAdd Block at [-2] [6] [9.5] size [1] [0.5] [1] type [end]\n\ndefine Level 6\nAdd Player [0] [0] [0]\nAdd Block at [-1] [0.5] [4] size [0.25] [4] [7] type [lava]\nAdd Block at [1.8] [0.5] [4] size [0.25] [4] [7] type [lava]\nAdd Block at [-1] [0] [-1] size [3] [1] [3] type [ground]\nAdd Block at [0] [0] [4] size [1] [1] [1] type [ground]\nAdd Block at [0] [0] [7] size [1] [1] [1] type [ground]\nAdd Block at [0] [0] [10] size [1] [1] [1] type [ground]\nAdd Block at [-0.5] [-3] [15] size [2] [1] [2] type [bouncy]\nAdd Block at [-0.5] [-3] [25] size [2] [1] [2] type [bouncy]\nAdd Block at [-2] [-3] [35] size [5] [1] [5] type [ground]\nAdd Block at [-0.5] [-3] [40] size [2] [1] [2] type [bouncy]\nAdd Block at [3] [4] [36.5] size [2] [1] [2] type [bouncy]\nAdd Block at [-0.5] [11] [33] size [2] [1] [2] type [bouncy]\nAdd Block at [-4] [18] [36.5] size [2] [1] [2] type [bouncy]\nAdd Block at [-0.5] [25] [40] size [2] [1] [2] type [bouncy]\nAdd Block at [-1] [32] [42] size [3] [1] [3] type [ground]\nAdd Block at [-1] [32] [47] size [3] [1] [3] type [ground]\nAdd Block at [-1] [32] [52] size [3] [1] [3] type [ground]\nAdd Block at [0] [33] [53] size [1] [0.5] [1] type [end]\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    if <key (r v) pressed?> then\n        broadcast (Init Level v)\n    end\nend\n\ndefine Level 7\nAdd Player [1] [0] [1]\nAdd Block at [0] [0] [0] size [3] [1] [11] type [ground]\nAdd Block at [0] [1] [3.5] size [2] [2.5] [1] type [lava]\nAdd Block at [1] [1] [6.5] size [2] [2.5] [1] type [lava]\nAdd Block at [1] [1] [9] size [1] [0.5] [1] type [bouncy]\nAdd Block at [3] [7] [8] size [3] [1] [3] type [ground]\nAdd Block at [6] [7] [11] size [5] [6] [1] type [lava]\nAdd Block at [6] [7] [7] size [5] [6] [1] type [lava]\nAdd Block at [8] [1] [9] size [1] [0.5] [1] type [bouncy]\nAdd Block at [11] [7] [8] size [3] [1] [3] type [ground]\nAdd Block at [12] [8] [9] size [1] [0.5] [1] type [bouncy]\nAdd Block at [11] [14] [6] size [3] [1] [2] type [ground]\nAdd Block at [11] [14] [0] size [3] [1] [6] type [lava]\nAdd Block at [11.5] [15] [5] size [0.25] [1.25] [0.25] type [ground]\nAdd Block at [13.25] [15] [4] size [0.25] [2.5] [0.25] type [ground]\nAdd Block at [11.5] [15] [3] size [0.25] [3.75] [0.25] type [ground]\nAdd Block at [13.25] [15] [2] size [0.25] [5] [0.25] type [ground]\nAdd Block at [11.5] [15] [1] size [0.25] [6.25] [0.25] type [ground]\nAdd Block at [11] [21.5] [-3] size [3] [1] [3] type [ground]\nAdd Block at [3] [21.5] [-3] size [8] [1] [3] type [bouncy]\nAdd Block at [0] [21.5] [-3] size [3] [1] [3] type [ground]\nAdd Block at [1] [22.5] [-2] size [1] [1] [1] type [end]\nAdd Block at [9] [21.5] [-2] size [0.25] [10] [0.25] type [lava]\nAdd Block at [7] [21.5] [-1] size [0.25] [10] [0.25] type [lava]\nAdd Block at [5] [21.5] [-2.5] size [0.25] [10] [0.25] type [lava]\nAdd Block at [3] [21.5] [-1] size [0.25] [10] [0.25] type [lava]\n\ndefine Level 8\nAdd Player [2] [1] [2]\nAdd Block at [0] [-9] [19] size [5] [14] [1] type [ground]\nAdd Block at [0] [-9] [0] size [5] [1] [20] type [ground]\nAdd Block at [0] [4] [0] size [5] [1] [20] type [ground]\nAdd Block at [4] [-9] [0] size [1] [14] [20] type [ground]\nAdd Block at [0] [-9] [0] size [1] [14] [20] type [ground]\nAdd Block at [0] [-9] [0] size [5] [14] [1] type [ground]\nAdd Block at [1] [0] [1] size [3] [1] [3] type [ground]\nAdd Block at [1] [-5] [3] size [3] [6] [1] type [ground]\nAdd Block at [1] [-1] [7] size [3] [6] [1] type [ground]\nAdd Block at [1] [-5] [3] size [3] [1] [5] type [ground]\nAdd Block at [1] [-1] [7] size [3] [1] [5] type [ground]\nAdd Block at [1] [-5] [8] size [3] [0.5] [3] type [lava]\nAdd Block at [1] [-5] [11] size [3] [1] [5] type [ground]\nAdd Block at [1] [-5] [15] size [3] [6] [1] type [lava]\nAdd Block at [2] [-4] [13.5] size [1] [0.5] [1] type [bouncy]\nAdd Block at [1] [-1] [11] size [3] [6] [1] type [ground]\nAdd Block at [1] [-8] [10.5] size [1.5] [3] [5.5] type [lava]\nAdd Block at [2.5] [-8] [3] size [1.5] [3] [5.5] type [lava]\nAdd Block at [2.5] [-8] [1.5] size [1] [0.5] [1] type [bouncy]\nAdd Block at [2] [-1] [1.5] size [1] [1] [1] type [end]\n\ndefine Level 9\nAdd Player [0] [0] [0]\nAdd Block at [-1] [0] [-1] size [3] [1] [3] type [ground]\nAdd Block at [-4] [0] [2] size [9] [13] [9] type [ground]\nAdd Block at [-1] [13] [5] size [3] [10] [3] type [ground]\nAdd Block at [-2] [1] [0] size [1] [1] [1] type [bouncy]\nAdd Block at [-4] [2] [0] size [1] [1] [1] type [bouncy]\nAdd Block at [-6] [3] [0] size [1] [1] [1] type [bouncy]\nAdd Block at [-7] [4] [2] size [3] [1] [3] type [ground]\nAdd Block at [-7] [4] [8] size [3] [1] [2] type [ground]\nAdd Block at [-6] [5] [10] size [1] [1] [1] type [bouncy]\nAdd Block at [-6] [6] [12] size [1] [1] [1] type [ground]\nAdd Block at [-4] [7] [12] size [1] [1] [1] type [bouncy]\nAdd Block at [-2] [8] [12] size [1] [1] [1] type [bouncy]\nAdd Block at [0] [9] [12] size [1] [1] [1] type [bouncy]\nAdd Block at [2] [10] [12] size [1] [1] [1] type [bouncy]\nAdd Block at [4] [11] [12] size [1] [1] [1] type [bouncy]\nAdd Block at [2] [13] [8] size [3] [3] [1] type [ground]\nAdd Block at [6] [14] [9] size [0.5] [0] [0.5] type []\nAdd Block at [0.5] [13] [9.25] size [0] [3] [1.75] type [lava]\nAdd Block at [-3.5] [13] [5] size [2.5] [3] [4.25] type [ground]\nAdd Block at [-2.5] [13] [2] size [4.5] [0.25] [3] type [lava]\nAdd Block at [-0.5] [13.25] [3] size [1] [0.25] [1] type [bouncy]\nAdd Block at [3] [13] [6] size [1] [1] [1] type [bouncy]\nAdd Block at [-2.75] [16] [5.75] size [1] [1] [1] type [bouncy]\nAdd Block at [-2.75] [17] [3.25] size [1] [1] [1] type [bouncy]\nAdd Block at [0] [18] [3.25] size [1] [1] [1] type [bouncy]\nAdd Block at [2.75] [19] [3.25] size [1] [1] [1] type [bouncy]\nAdd Block at [2.75] [20] [6.25] size [1] [1] [1] type [bouncy]\nAdd Block at [0] [23] [6] size [1] [1] [1] type [end]\n\ndefine Level 10\nAdd Player [6] [1] [-7]\nAdd Block at [0] [0] [0] size [13] [1] [5] type [ground]\nAdd Block at [1] [3] [3] size [5] [1] [1] type [lava]\nAdd Block at [2] [2] [3] size [1] [3] [1] type [lava]\nAdd Block at [3] [1] [3] size [1] [3] [1] type [lava]\nAdd Block at [4] [2] [3] size [1] [3] [1] type [lava]\nAdd Block at [7] [3] [3] size [5] [1] [1] type [bouncy]\nAdd Block at [8] [1] [3] size [1] [3] [1] type [bouncy]\nAdd Block at [9] [2] [3] size [1] [3] [1] type [bouncy]\nAdd Block at [10] [1] [3] size [1] [3] [1] type [bouncy]\nAdd Block at [5] [0] [-4] size [3] [1] [3] type [ground]\nAdd Block at [5] [0] [-8] size [3] [1] [3] type [ground]\n\nLevel 10\nstop [this script v]\n\ndefine Level 11\n\n@time\n\nwhen flag clicked\nhide variable [☁ world record v]\nhide variable [time v]\nset [on/off v] to [off]\nset [wait v] to [0]\nset [time v] to [0]\nset [level v] to [1]\nforever\n    wait (1) seconds\n    change [time v] by (1)\nend\n\nwhen I receive [forever v]\nif <<<key (t v) pressed?> and <(on/off) = [off]>> and <(wait) = [0]>> then\n    set [wait v] to [1]\n    show variable [time v]\n    set [on/off v] to [on]\nend\nif <<<key (t v) pressed?> and <(on/off) = [on]>> and <(wait) = [0]>> then\n    set [wait v] to [1]\n    hide variable [time v]\n    set [on/off v] to [off]\nend\nif <not <key (t v) pressed?>> then\n    set [wait v] to [0]\nend\nif <(Level) > [9]> then\n    show variable [☁ world record v]\n    show variable [time v]\n    broadcast (end v)\n    wait (0.25) seconds\n    stop [other scripts in sprite v]\nend\n\nwhen I receive [end v]\nif <(Time) < (☁ World Record)> then\n    set [☁ world record v] to (Time)\nend\n\n@popup\n\nwhen flag clicked\ngo to x: (0) y: (-219)\ngo to [back v] layer\nhide\nset [ghost v] effect to (100)\nwait (2) seconds\nbroadcast (popup v)\nglide (1.5) secs to x: (0) y: (-160)\nwait (2) seconds\nbroadcast (popdown v)\nglide (1.5) secs to x: (0) y: (-219)\nforever\n    wait (30) seconds\n    broadcast (popup v)\n    glide (1.5) secs to x: (0) y: (-160)\n    wait (2) seconds\n    broadcast (popdown v)\n    glide (1.5) secs to x: (0) y: (-219)\n    wait (30) seconds\n    broadcast (popup2 v)\n    glide (1.5) secs to x: (0) y: (-160)\n    wait (4) seconds\n    broadcast (popdown2 v)\n    glide (1.5) secs to x: (0) y: (-219)\nend\n\nwhen I receive [popup v]\nswitch costume to (like and favorite v)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [popdown v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\n\nwhen I receive [popdown2 v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\n\nwhen I receive [popup2 v]\nswitch costume to (low quality v)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\n@thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    set [ghost v] effect to (100)\n    go to [front v] layer\nend\n\n