Advertisement
ItsNoah

GliderGameJS

Feb 22nd, 2022
568
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2.  *                                                                                                               *
  3.  *                                               𝗚𝗹𝗶𝗱𝗲𝗿 𝗙𝗿𝗲𝗲𝗱𝗼𝗺 𝟮                                                 *
  4.  *                                                                                                               *
  5.  *                                  The original Glider Freedom was made by EliK.                                *
  6.  *                                   https://www.openprocessing.org/sketch/850008                                *                                
  7.  *                                                                                                               *
  8.  *                                                                                                               *                                                                                                            *
  9.  *                                                                                                               *
  10.  *                                                                                                               *
  11.  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  12. p5.disableFriendlyErrors = true;
  13. var lives
  14. var coins2
  15. var coinget
  16. var heatres
  17. var livecount
  18. var startspeed
  19. var coincost
  20. var spacego
  21. var fast
  22. var travb
  23. var sonic
  24. var light
  25. var fst
  26. var fst2
  27. var stt
  28. var sss
  29. var ttt
  30. var stu
  31. var drag
  32. var tf
  33. var tf2
  34. var airbrake
  35. var fuel
  36. var fuelget
  37. var moonget
  38. var fm
  39.  
  40. var livesm
  41. var coins2m
  42. var coingetm
  43. var heatresm
  44. var livecountm
  45. var startspeedm
  46. var coincostm
  47. var dragm
  48. var airbrakem
  49. var fuelm
  50. var fuelgetm
  51. var sandget
  52. var img
  53.  
  54.  
  55. function preload() {
  56.     img = loadImage("thumbnail.png")
  57.     rawJSON = loadJSON("https://www.openprocessing.org/api/sketch/909114/true");
  58.  
  59.  
  60. }
  61.  
  62. function setup() {
  63.  
  64.     createCanvas(windowWidth, windowHeight);
  65.     tx = width / 2
  66.     ty = height / 2
  67.     lives = getItem('lives');
  68.     coins2 = getItem('coins2');
  69.     coinget = getItem('coinget');
  70.     heatres = getItem('heatres');
  71.     livecount = getItem('livecount');
  72.     startspeed = getItem('startspeed');
  73.     coincost = getItem('coincost');
  74.     spacego = getItem('spacego');
  75.     fast = getItem('fast');
  76.     travb = getItem('travb');
  77.     sonic = getItem('sonic');
  78.     light = getItem('light');
  79.     fst = getItem('fst');
  80.     fst2 = getItem('fst2');
  81.     stt = getItem('stt');
  82.     sss = getItem('sss');
  83.     ttt = getItem('ttt');
  84.     stu = getItem('stu');
  85.     drag = getItem('drag');
  86.     tf = getItem('tf');
  87.     tf2 = getItem('tf2');
  88.     airbrake = getItem('airbrake');
  89.     fuel = getItem('fuel');
  90.     fuelget = getItem('fuelget');
  91.     moonget = getItem('moonget');
  92.     fm = getItem('fm');
  93.     livesm = getItem('livesm')
  94.     coins2m = getItem('coins2m')
  95.     coingetm = getItem('coingetm')
  96.     heatresm = getItem('heatresm')
  97.     livecountm = getItem('livecountm')
  98.     startspeedm = getItem('startspeedm')
  99.     coincostm = getItem('coincostm')
  100.     dragm = getItem('dragm')
  101.     airbrakem = getItem('airbrakem')
  102.     fuelm = getItem('fuelm')
  103.     fuelgetm = getItem('fuelgetm')
  104.     sandget = getItem('sandget')
  105.  
  106.     frameRate(60)
  107.  
  108.     background(87, 171, 255);
  109.     textAlign(CENTER)
  110.     clouds.push(new Cloud())
  111.     clouds.push(new Cloud())
  112.     clouds.push(new Cloud())
  113.     clouds.push(new Cloud())
  114.     clouds.push(new Cloud())
  115.     clouds.push(new Cloud())
  116.     clouds.push(new Cloud())
  117.     clouds.push(new Cloud())
  118.     clouds.push(new Cloud())
  119.     clouds.push(new Cloud())
  120.     coins.push(new Coin())
  121.     coins.push(new Coin())
  122.     rocks.push(new Rock())
  123.  
  124.     pixelDensity(1)
  125.  
  126.  
  127. }
  128. var x = 100
  129. var y = -2000
  130. var yy = 170
  131. var yspeed = 100
  132. var xspeed = 0
  133. var r = 0
  134. var home = -1
  135. var tx = 0
  136. var ty = 0
  137. var burntime = 0
  138. var clouds = []
  139. var coins = []
  140. var rocks = []
  141. var trav = 0
  142. var reset2 = 0
  143. var hst = 0
  144. var lst = 0
  145. var deathmess = 0
  146. var cst = 0
  147. var sst = 0
  148. var f = 300
  149. var fs = 300
  150. var bf = 0
  151. var ss = 300
  152. var textfill = 0
  153. var ar = 0
  154. var ast = 0
  155. var fgh = 0
  156. var fpsl = 60
  157. var moon = 0
  158. var sand = 0
  159. var store = 0
  160. var t = 0
  161.  
  162.  
  163.  
  164. function draw() {
  165.  
  166.     if (windowWidth <= 1200 || windowHeight <= 530) {
  167.         scale(0.75, 0.75)
  168.         translate(200, 0)
  169.         mouseX = mouseX * 1.3333333333333333333333333333333333333333333333 - 200
  170.         mouseY = mouseY * 1.3333333333333333333333333333333333333333333333
  171.  
  172.     }
  173.     t++
  174.  
  175.     // fuel++
  176.     // fuelm++
  177.     if (t > 5 * frameRate()) {
  178.         storeAll();
  179.         t = 0
  180.     }
  181.     cursor(ARROW)
  182.     if (lives == null) {
  183.         lives = 1
  184.     }
  185.     if (coins2 == null) {
  186.         coins2 = 5
  187.     }
  188.     if (coinget == null) {
  189.         coinget = 1
  190.     }
  191.     if (heatres == null) {
  192.         heatres = 20
  193.     }
  194.     if (livecount == null) {
  195.         livecount = 1
  196.     }
  197.     if (startspeed == null) {
  198.         startspeed = 5
  199.     }
  200.     if (coincost == null) {
  201.         coincost = 10
  202.     }
  203.     if (fst == null) {
  204.         fst = 0
  205.     }
  206.     if (fst2 == null) {
  207.         fst2 = 0
  208.     }
  209.     if (stt == null) {
  210.         stt = 0
  211.     }
  212.     if (sss == null) {
  213.         sss = 0
  214.     }
  215.     if (ttt == null) {
  216.         ttt = 0
  217.     }
  218.     if (drag == null) {
  219.         drag = 10
  220.     }
  221.     if (tf == null) {
  222.         tf = 300
  223.     }
  224.     if (tf2 == null) {
  225.         tf2 = 300
  226.     }
  227.     if (airbrake == null) {
  228.         airbrake = 0
  229.     }
  230.     if (fuel == null) {
  231.         fuel = 0
  232.     }
  233.     if (fuelget == null) {
  234.         fuelget = 0
  235.     }
  236.     if (moonget == null) {
  237.         moonget = 0
  238.     }
  239.     if (fm == null) {
  240.         fm = 300
  241.     }
  242.     if (livesm == null) {
  243.         livesm = 1
  244.     }
  245.     if (coins2m == null) {
  246.         coins2m = 5
  247.     }
  248.     if (coingetm == null) {
  249.         coingetm = 1
  250.     }
  251.     if (heatresm == null) {
  252.         heatresm = 20
  253.     }
  254.     if (livecountm == null) {
  255.         livecountm = 1
  256.     }
  257.     if (startspeedm == null) {
  258.         startspeedm = 5
  259.     }
  260.     if (coincostm == null) {
  261.         coincostm = 10
  262.     }
  263.     if (dragm == null) {
  264.         dragm = 10
  265.     }
  266.     if (airbrakem == null) {
  267.         airbrakem = 0
  268.     }
  269.     if (fuelm == null) {
  270.         fuelm = 0
  271.     }
  272.     if (fuelgetm == null) {
  273.         fuelgetm = 0
  274.     }
  275.  
  276.     if (spacego == null) {
  277.         spacego = 0
  278.     }
  279.     if (fast == null) {
  280.         fast = 0
  281.     }
  282.     if (travb == null) {
  283.         travb = 0
  284.     }
  285.     if (sonic == null) {
  286.         sonic = 0
  287.     }
  288.     if (light == null) {
  289.         light = 0;
  290.     }
  291.     if (sandget == null) {
  292.         sandget = 0
  293.     }
  294.  
  295.     if (home == -1) {
  296.         background(999)
  297.         if (yy >= 200) {
  298.             yy = 200
  299.         }
  300.         if (yy <= -400) {
  301.             yy = -400
  302.         }
  303.         // rect(200,100,1000,500)
  304.         text("The original Glider Freedom was made by EliK.\n\
  305. https://www.openprocessing.org/sketch/850008 (link is also in the code)\n\
  306. Go check it out!\n\n\
  307. -------------------------------------------------Instructions-------------------------------------------------\n\n\
  308. Left and right arrow keys to rotate. Collect coins at the bottom.\n\
  309. Get higher than 150 feet to get to space. You go slower in space.\n\
  310. Don't get hit by asteroids!\n\
  311. Get higher than 1000 feet to unlock moon.\n\
  312. Scroll to continue\n\
  313. Get higher than 1500 feet on moon to get sandbox.\n\n\
  314. --------------------------------------------------What's new?--------------------------------------------------\n\n\
  315. The main improvement from Glider Freedom is the FPS.\n\
  316. If you play Glider Freedom for more than 5 or so minutes the FPS drops significantly\n\
  317. making very hard to play.\n\
  318. On Glider Freedom 2 this is fixed and your FPS should be around 50-60.\n\
  319. The second big improvement is that this uses getItem() so save your progress so \n\
  320. if you reload it you will still have your progress.\n\
  321. The physics have NOT been inproved\n\
  322. It is also fullscreen making it look better.\n\
  323. There are many other small improvements too.\
  324. ", (width / 2), yy)
  325.  
  326.         text("OK!", (width / 2), yy + 750 + 40)
  327.         push()
  328.         noStroke()
  329.         fill(87, 171, 255)
  330.         rect(0, 0, width, height / 10)
  331.         rect(0, height - height / 10, width, height / 10)
  332.         rect(0, 0, 200, height)
  333.         rect(width - 200, 0, 200, height)
  334.         pop()
  335.         textSize(25)
  336.  
  337.  
  338.  
  339.         if (mouseX > (width / 2) - 30 && mouseY > yy + 730 + 40 && mouseX < (width / 2) + 30 && mouseY < yy + 760 + 40) {
  340.             cursor(HAND)
  341.         } else {
  342.             cursor(ARROW)
  343.         }
  344.         if (mouseX > (width / 2) - 30 && mouseY > yy + 730 + 40 && mouseX < (width / 2) + 30 && mouseY < yy + 760 + 40 && mouseIsPressed) {
  345.             mouseX = 0;
  346.             home = 1;
  347.             cursor(ARROW)
  348.         }
  349.  
  350.  
  351.  
  352.     } else
  353.     if (home == 1) {
  354.         background(999);
  355.         textSize(50)
  356.         fill(0)
  357.         textAlign(CENTER, CENTER)
  358.         text("𝐆𝐥𝐢𝐝𝐞𝐫 𝐅𝐫𝐞𝐞𝐝𝐨𝐦 𝟐!", width / 2, 100);
  359.         textSize(25)
  360.         if (deathmess != 0) {
  361.             text(deathmess + "", width / 2, 170)
  362.         }
  363.         textAlign(LEFT, TOP)
  364.         textSize(35)
  365.         if (butt(width / 2 - 50, 250 - 50, 100, 40)) {
  366.             home = 0;
  367.             if (moon == 0) {
  368.                 yspeed = startspeed * 10
  369.             }
  370.             if (moon == 1) {
  371.                 yspeed = startspeedm * 10
  372.             }
  373.             deathmess = 0;
  374.             fuel = fuelget;
  375.             fuelm = fuelgetm
  376.         }
  377.         text("Play", width / 2 - 40, 252 - 50)
  378.         lives = livecount;
  379.         if (butt(width / 2 - 85, 350 - 50, 170, 40)) {
  380.             home = 2;
  381.             mouseX = 0
  382.         }
  383.         text("Upgrades", width / 2 - 85, 352 - 50)
  384.  
  385.         if (butt(width / 2 - 95, 450 - 50, 190, 40)) {
  386.             home = 4;
  387.             mouseX = 0
  388.         }
  389.         text("Challenges", width / 2 - 90, 452 - 50)
  390.  
  391.         if (moon == 1) {
  392.             if (butt(width / 2 - 70, 550 - 50, 110, 40)) {}
  393.         } else {
  394.             if (cbutt(width / 2 - 70, 550 - 50, 110, 40) && moonget == 1) {
  395.                 moon = 1;
  396.             }
  397.         }
  398.         text("Moon", width / 2 - 70, 550 - 50)
  399.  
  400.  
  401.         if (moon == 0) {
  402.             if (butt(width / 2 - 120 - 70, 550 - 50, 100, 40)) {}
  403.         } else {
  404.             if (cbutt(width / 2 - 120 - 70, 550 - 50, 100, 40)) {
  405.                 moon = 0;
  406.             }
  407.         }
  408.         text("Earth", width / 2 - 120 - 70, 550 - 50)
  409.         text("Level:", width / 2 - 300, 550 - 50)
  410.  
  411.  
  412.  
  413.         if (sand == 1) {
  414.             if (butt(width / 2 + 50, 550 - 50, 100, 40)) {}
  415.         } else {
  416.             if (cbutt(width / 2 + 50, 550 - 50, 100, 40) && sandget == 1) {
  417.                 sand2();
  418.             }
  419.         }
  420.         text("Sandbox", width / 2 + 50, 550 - 50)
  421.  
  422.  
  423.  
  424.         if (butt(width / 2 + 300, 400, 170, 40)) {
  425.             home = 3;
  426.             mouseX = 0
  427.         }
  428.         text("Reset all", width / 2 + 300, 450 - 50)
  429.  
  430.         if (butt(width / 2 - 400, 400, 170, 40)) {
  431.             fullscreen(!fullscreen());
  432.             if (fullscreen()) {
  433.                 createCanvas(windowWidth, windowHeight)
  434.             } else {
  435.                 createCanvas(displayWidth, displayHeight)
  436.             }
  437.             mouseX = 0
  438.         }
  439.         text("Fullscreen", width / 2 - 400, 400)
  440.  
  441.  
  442.  
  443.  
  444.     } else {
  445.         if (home == 2) {
  446.             background(999);
  447.             textSize(50)
  448.             textAlign(CENTER, CENTER)
  449.             text("𝐔𝐩𝐠𝐫𝐚𝐝𝐞𝐬!", width / 2, 100);
  450.             textAlign(LEFT, TOP)
  451.             textSize(25)
  452.             // coins2m=1
  453.             if (moon == 0) {
  454.                 text("Coins: " + coins2, 250, 90)
  455.                 if (butt(width / 2 - 400, 200, 220, 120) && hst == 0 && coins2 >= 5) {
  456.                     heatres += 5;
  457.                     coins2 -= 5;
  458.                     hst = 1;
  459.                 }
  460.                 if (!butt(width / 2 - 400, 200, 220, 120)) {
  461.                     hst = 0
  462.                 }
  463.                 textSize(25)
  464.                 text("Heat shield = " + heatres, width / 2 - 400, 210)
  465.                 text("Cost: 5\nClick to buy", width / 2 - 400, 240)
  466.  
  467.  
  468.  
  469.  
  470.                 if (butt(width / 2 - 150, 200, 220, 120) && lst == 0 && coins2 >= 30) {
  471.                     livecount++;
  472.                     coins2 -= 30;
  473.                     lst = 1;
  474.                 }
  475.                 if (!butt(width / 2 - 150, 200, 220, 120)) {
  476.                     lst = 0
  477.                 }
  478.                 textSize(25)
  479.                 text("lives = " + livecount, width / 2 - 150, 210)
  480.                 text("Cost: 30\nClick to buy", width / 2 - 150, 240)
  481.  
  482.  
  483.  
  484.                 if (butt(width / 2 + 100, 200, 220, 120) && cst == 0 && coins2 >= coincost) {
  485.                     coinget += 1;
  486.                     coins2 -= coincost;
  487.                     coincost += 4;
  488.                     cst = 1;
  489.                 }
  490.                 if (!butt(width / 2 + 100, 200, 220, 120)) {
  491.                     cst = 0
  492.                 }
  493.                 textSize(25)
  494.                 text("Coins + " + coinget, width / 2 + 100, 210)
  495.                 text("Cost: " + coincost + "\nClick to buy", width / 2 + 100, 240)
  496.  
  497.  
  498.                 if (butt(width / 2 + 350, 200, 220, 120) && sst == 0 && coins2 >= 3) {
  499.                     startspeed += 1;
  500.                     coins2 -= 3;
  501.                     sst = 1;
  502.                 }
  503.                 if (!butt(width / 2 + 350, 200, 220, 120)) {
  504.                     sst = 0
  505.                 }
  506.                 textSize(25)
  507.                 text("Starting speed = " + startspeed, width / 2 + 350, 210)
  508.                 text("Cost: 3\nClick to buy", width / 2 + 350, 240)
  509.  
  510.  
  511.  
  512.  
  513.                 if (butt(width / 2 + -650, 200, 220, 120) && ar == 0 && coins2 >= 10 && drag > 1) {
  514.                     drag -= 1;
  515.                     coins2 -= 10;
  516.                     ar = 1;
  517.                 }
  518.                 if (!butt(width / 2 + -650, 200, 220, 120)) {
  519.                     ar = 0
  520.                 }
  521.                 textSize(25)
  522.                 text("Air resistance = " + drag, width / 2 - 650, 210)
  523.                 text("Cost: 10\nClick to buy", width / 2 - 650, 240)
  524.  
  525.  
  526.                 if (butt(width / 2 - 0, 200 + 150, 220, 120) && fgh == 0 && coins2 >= 15 && fuelget < 60) {
  527.                     fuelget++;
  528.                     coins2 -= 15;
  529.                     fgh = 1;
  530.                 }
  531.                 if (!butt(width / 2 - 0, 200 + 150, 220, 120)) {
  532.                     fgh = 0
  533.                 }
  534.                 textSize(25)
  535.                 text("Rocket fuel = " + fuelget, width / 2 - 0, 210 + 150)
  536.                 text("Cost: 15\nClick to buy", width / 2 - 0, 240 + 150)
  537.  
  538.  
  539.  
  540.                 if (butt(width / 2 + -250, 400 - 50, 220, 120) && ast == 0 && coins2 >= 75 && airbrake == 0) {
  541.                     airbrake = 1;
  542.                     coins2 -= 75;
  543.                     ast = 1;
  544.                 }
  545.                 if (!butt(width / 2 + -250, 400 - 50, 220, 120)) {
  546.                     ast = 0
  547.                 }
  548.                 textSize(25)
  549.                 text("Air brake", width / 2 - 250, 410 - 50)
  550.                 if (airbrake == 0) {
  551.                     text("Cost: 75\nClick to buy", width / 2 - 250, 440 - 50)
  552.                 } else {
  553.                     text("Purchased", width / 2 - 250, 440 - 50)
  554.                 }
  555.             }
  556.  
  557.             if (moon == 1) {
  558.                 text("Coins: " + coins2m, 250, 90)
  559.                 if (butt(width / 2 - 400, 200, 220, 120) && hst == 0 && coins2m >= 5 * 2) {
  560.                     heatresm += 5;
  561.                     coins2m -= 5 * 2;
  562.                     hst = 1;
  563.                 }
  564.                 if (!butt(width / 2 - 400, 200, 220, 120)) {
  565.                     hst = 0
  566.                 }
  567.                 textSize(25)
  568.                 text("Heat shield = " + heatresm, width / 2 - 400, 210)
  569.                 text("Cost: 10\nClick to buy", width / 2 - 400, 240)
  570.  
  571.  
  572.  
  573.  
  574.                 if (butt(width / 2 - 150, 200, 220, 120) && lst == 0 && coins2m >= 30 * 2) {
  575.                     livecountm++;
  576.                     coins2m -= 30 * 2;
  577.                     lst = 1;
  578.                 }
  579.                 if (!butt(width / 2 - 150, 200, 220, 120)) {
  580.                     lst = 0
  581.                 }
  582.                 textSize(25)
  583.                 text("lives = " + livecountm, width / 2 - 150, 210)
  584.                 text("Cost: 60\nClick to buy", width / 2 - 150, 240)
  585.  
  586.  
  587.  
  588.                 if (butt(width / 2 + 100, 200, 220, 120) && cst == 0 && coins2m >= coincostm * 2) {
  589.                     coingetm += 1;
  590.                     coins2m -= coincostm * 2;
  591.                     coincostm += 4;
  592.                     cst = 1;
  593.                 }
  594.                 if (!butt(width / 2 + 100, 200, 220, 120)) {
  595.                     cst = 0
  596.                 }
  597.                 textSize(25)
  598.                 text("Coins + " + coingetm, width / 2 + 100, 210)
  599.                 text("Cost: " + coincostm * 2 + "\nClick to buy", width / 2 + 100, 240)
  600.  
  601.  
  602.                 if (butt(width / 2 + 350, 200, 220, 120) && sst == 0 && coins2m >= 3 * 2) {
  603.                     startspeedm += 1;
  604.                     coins2m -= 3 * 2;
  605.                     sst = 1;
  606.                 }
  607.                 if (!butt(width / 2 + 350, 200, 220, 120)) {
  608.                     sst = 0
  609.                 }
  610.                 textSize(25)
  611.                 text("Starting speed = " + startspeedm, width / 2 + 350, 210)
  612.                 text("Cost: 6\nClick to buy", width / 2 + 350, 240)
  613.  
  614.  
  615.  
  616.  
  617.                 if (butt(width / 2 + -650, 200, 220, 120) && ar == 0 && coins2m >= 10 * 2 && dragm > 1) {
  618.                     dragm -= 1;
  619.                     coins2m -= 10 * 2;
  620.                     ar = 1;
  621.                 }
  622.                 if (!butt(width / 2 + -650, 200, 220, 120)) {
  623.                     ar = 0
  624.                 }
  625.                 textSize(25)
  626.                 text("Air resistance = " + dragm, width / 2 - 650, 210)
  627.                 text("Cost: 20\nClick to buy", width / 2 - 650, 240)
  628.  
  629.  
  630.                 if (butt(width / 2 - 0, 200 + 150, 220, 120) && fgh == 0 && coins2m >= 15 * 2 && fuelgetm < 60) {
  631.                     fuelgetm++;
  632.                     coins2m -= 15 * 2;
  633.                     fgh = 1;
  634.                 }
  635.                 if (!butt(width / 2 - 0, 200 + 150, 220, 120)) {
  636.                     fgh = 0
  637.                 }
  638.                 textSize(25)
  639.                 text("Rocket fuel = " + fuelgetm, width / 2 - 0, 210 + 150)
  640.                 text("Cost: 30\nClick to buy", width / 2 - 0, 240 + 150)
  641.  
  642.  
  643.  
  644.                 if (butt(width / 2 + -250, 400 - 50, 220, 120) && ast == 0 && coins2m >= 75 * 2 && airbrakem == 0) {
  645.                     airbrakem = 1;
  646.                     coins2m -= 75 * 2;
  647.                     ast = 1;
  648.                 }
  649.                 if (!butt(width / 2 + -250, 400 - 50, 220, 120)) {
  650.                     ast = 0
  651.                 }
  652.                 textSize(25)
  653.                 text("Air brake", width / 2 - 250, 410 - 50)
  654.                 if (airbrakem == 0) {
  655.                     text("Cost: 150\nClick to buy", width / 2 - 250, 440 - 50)
  656.                 } else {
  657.                     text("Purchased", width / 2 - 250, 440 - 50)
  658.                 }
  659.             }
  660.  
  661.             if (butt(width / 2, 500, 100, 30)) {
  662.                 home = 1;
  663.                 mouseX = 0
  664.             }
  665.             textSize(25)
  666.  
  667.             text("Go back", width / 2, 500)
  668.  
  669.  
  670.  
  671.  
  672.             textSize(35)
  673.         } else {
  674.             if (home == 3) {
  675.                 push()
  676.                 fill(999)
  677.                 rect(width / 2 - 200, height / 2 - 100, 400, 200)
  678.  
  679.                 pop()
  680.                 textSize(25)
  681.                 text("This will reset EVERYTHING\nyou did so far. Is this OK?", width / 2 - 190, height / 2 - 90)
  682.                 textSize(30)
  683.  
  684.                 if (butt(width / 2 - 150, height / 2 + 50, 120, 40)) {
  685.                     home = 1;
  686.                     mouseX = 0
  687.                 }
  688.  
  689.                 text("Cancel", width / 2 - 140, height / 2 + 60)
  690.  
  691.  
  692.                 if (butt(width / 2, height / 2 + 50, 80, 40)) {
  693.                     resetAll();
  694.                     home = 1;
  695.                     mouseX = 0
  696.                 }
  697.                 text("Yes", width / 2 + 10, height / 2 + 60)
  698.  
  699.  
  700.  
  701.  
  702.             } else {
  703.                 if (home == 4) {
  704.                     textSize(30)
  705.                     background(999)
  706.                     push()
  707.                     textAlign(CENTER)
  708.                     if (fast == 1) {
  709.                         text("Go faster than 100 MPH + 50 coins  ✓", width / 2, 150)
  710.                     } else {
  711.                         text("Go faster than 100 MPH + 50 coins ", width / 2, 150)
  712.                     }
  713.  
  714.  
  715.  
  716.                     if (spacego == 1) {
  717.                         text("Go to space + 30 coins  ✓", width / 2, 100)
  718.                     } else {
  719.                         text("Go to space + 30 coins ", width / 2, 100)
  720.                     }
  721.  
  722.  
  723.                     if (travb == 1) {
  724.                         text("Travel 6000 feet + 50 coins  ✓", width / 2, 200)
  725.                     } else {
  726.                         text("Travel 6000 feet + 50 coins ", width / 2, 200)
  727.                     }
  728.  
  729.  
  730.  
  731.                     if (sonic == 1) {
  732.                         text("Go supersonic! faster than 767 Mph + 500 coins  ✓", width / 2, 250)
  733.                     } else {
  734.                         text("Go supersonic! faster than 767 Mph + 500 coins ", width / 2, 250)
  735.                     }
  736.  
  737.  
  738.  
  739.  
  740.                     text("Light Speed? Faster than 670,616,629 Mph! + 100,000 coins!", width / 2, 300)
  741.  
  742.  
  743.                     pop()
  744.  
  745.  
  746.                     if (butt(width / 2 - 50, 350, 100, 30)) {
  747.                         home = 1;
  748.                         mouseX = 0
  749.                     }
  750.                     textSize(25)
  751.  
  752.                     text("Go back", width / 2 - 50, 350)
  753.  
  754.                 } else {
  755.                     /*if (home==5) {
  756.  
  757.                     push()
  758.                         textAlign(LEFT,TOP)
  759.                         fill(999)
  760.                         rect(width/2-400,height/2-100,800,200)
  761.  
  762.                        
  763.                         textSize(25)
  764.                         fill(0)
  765.                         text("your screen is smaller than 1300 X 530 ("+windowWidth+" "+windowHeight+"\nThis means that you may not be able to see all the buttons\nyou can go to glider freedom 2 for smaller screens:(coming soom)\n(link is also in the code)",width/2-350,height/2-90)
  766.                         textSize(30)
  767.  
  768.                         if (butt(width/2-150,height/2+50,70,40)) {home=1;mouseX=0}
  769.  
  770.                         text ("OK",width/2-140,height/2+60)
  771.                         pop()
  772.  
  773.                        
  774.                     }else{
  775.                     */
  776.  
  777.                     textSize(15)
  778.  
  779.                     if (round(-y / 2 / 35.7) < 150) {
  780.                         background(87, 171, 255);
  781.                         textfill = 0
  782.                     } else {
  783.                         background(87, 171, 255);
  784.                         background(0, 0, 0, round(-y / 2 / 35.7) * 5 - 750);
  785.                         bf += 5;
  786.                         textfill = 255
  787.                     }
  788.                     if (moon == 1) {
  789.                         background(0);
  790.                         textfill = 255
  791.                     }
  792.                     if (moon == 1 && round(-y / 2 / 35.7) < 1500) {
  793.                         sandget = 1;
  794.                     }
  795.                     fill(textfill)
  796.                     //text(store,30,30)
  797.                     if (yspeed > 50) {
  798.                         yspeed -= drag / 100
  799.                     }
  800.                     if (yspeed > 50) {
  801.                         if (round(-y / 2 / 35.7) >= 150 || moon == 1) {
  802.                             yspeed -= drag * 10 / 100
  803.                         }
  804.                     }
  805.  
  806.  
  807.                     //  text("You are "+-round(y/2/35.7)+" feet above the ground",200,25);
  808.                     for (var i = 0; i < clouds.length; i++) {
  809.                         clouds[i].move();
  810.                     }
  811.                     for (var j = 0; j < coins.length; j++) {
  812.                         coins[j].move();
  813.                     }
  814.                     for (var l = 0; l < rocks.length; l++) {
  815.                         rocks[l].move();
  816.                     }
  817.  
  818.  
  819.                     if (keyIsDown(32) && airbrake == 1 && yspeed > 5 && moon == 0) {
  820.                         yspeed -= 7
  821.                     }
  822.                     if (keyIsDown(32) && airbrakem == 1 && yspeed > 5 && moon == 1) {
  823.                         yspeed -= 7
  824.                     }
  825.                     if (keyIsDown(82)) {
  826.                         home = 1;
  827.                         reset()
  828.                     }
  829.  
  830.                     textAlign(CENTER, CENTER)
  831.                     push()
  832.                     fill(255, 0, 0)
  833.                     if (moon == 0) {
  834.                         rect(width / 2 - 60, height - 40, fuel * 2, 30)
  835.                     }
  836.                     if (moon == 1) {
  837.                         rect(width / 2 - 60, height - 40, fuelm * 2, 30)
  838.                     }
  839.                     pop()
  840.                     textSize(20)
  841.                     text("Rocket Fuel", width / 2, height - 60)
  842.  
  843.                     push()
  844.                     noFill()
  845.                     stroke(textfill)
  846.                     strokeWeight(2)
  847.                     rect(width / 2 - 65, height - 45, 130, 40)
  848.                     pop()
  849.                     trav -= yspeed / 10
  850.                     textSize(20);
  851.                     text("You traveled " + round(trav * -1 / 35.7) + " feet", width / 2, 75);
  852.                     if (moon == 0) {
  853.                         if (coins2 == 1) {
  854.                             text(coins2 + " Coin", width / 2, 100);
  855.                         } else {
  856.                             text(coins2 + " Coins", width / 2, 100);
  857.                         }
  858.                     }
  859.                     if (moon == 1) {
  860.                         if (coins2m == 1) {
  861.                             text(coins2m + " Coin", width / 2, 100);
  862.                         } else {
  863.                             text(coins2m + " Coins", width / 2, 100);
  864.                         }
  865.                     }
  866.                     if (moon == 0) {
  867.                         text(lives + " lives", width / 2, 125);
  868.                     }
  869.                     if (moon == 1) {
  870.                         text(livesm + " lives", width / 2, 125);
  871.                     }
  872.  
  873.                     text("You are " + round(-y / 2 / 35.7) + " feet above the ground", width / 2, 25);
  874.                     text("" + round(yspeed / 20) + " Miles per hour", width / 2, 50);
  875.                     //text(int(moonget),width/2,150);
  876.                     if (round(-y / 2 / 35.7) >= 1000 && moon == 0) {
  877.                         moonget = 1;
  878.                         push();
  879.                         fill(textfill, textfill, textfill, fm);
  880.                         fm--;
  881.                         text("You got 1000 feet high! moon unlocked", width / 2, 300);
  882.                         pop()
  883.                     }
  884.                     push()
  885.                     fill(9999)
  886.                     translate(tx, ty)
  887.                     if (keyIsDown(37)) {
  888.                         r -= 0.03 * 60 / frameRate()
  889.                     }
  890.                     if (keyIsDown(39)) {
  891.                         r += 0.03 * 60 / frameRate()
  892.                     }
  893.                     y += (r * yspeed / 20)
  894.                     rotate(r)
  895.                     yspeed += r * yspeed / 50 //*60/frameRate()
  896.                     yspeed += r / 10
  897.                     if (r < 0) {
  898.                         y += r * yspeed / 10;
  899.                         yspeed += r * yspeed / 100
  900.                     }
  901.                     push()
  902.                     fill(255, 0, 0)
  903.                     noStroke()
  904.                     if (keyIsDown(38) && fuel > 0 && moon == 0) {
  905.                         yspeed += 7;
  906.                         fuel -= 0.2;
  907.                         ellipse(-17, 0, 35, 15)
  908.                     }
  909.                     if (keyIsDown(38) && fuelm > 0 && moon == 1) {
  910.                         yspeed += 7;
  911.                         fuelm -= 0.2;
  912.                         ellipse(-17, 0, 35, 15)
  913.                     }
  914.  
  915.                     pop()
  916.  
  917.                     fill(255)
  918.                     y += 2
  919.                     strokeWeight(2)
  920.                     triangle(-10, -10, -10, 10, 20, 0);
  921.                     if (moon == 0) {
  922.                         if (yspeed / 20 >= heatres) {
  923.                             push();
  924.                             noStroke();
  925.                             fill(255, 140, 0);
  926.                             ellipse(-17, 0, 35, 15);
  927.                             tx = random(width / 2 - 2, width / 2 + 2);
  928.                             ty = random(height / 2 - 2, height / 2 + 2);
  929.                             burntime++;
  930.                             pop()
  931.                         } else {
  932.                             tx = width / 2
  933.                             ty = height / 2
  934.                         }
  935.                     } else {
  936.                         if (yspeed / 20 >= heatresm) {
  937.                             push();
  938.                             noStroke();
  939.                             fill(255, 140, 0);
  940.                             ellipse(-17, 0, 35, 15);
  941.                             tx = random(width / 2 - 2, width / 2 + 2);
  942.                             ty = random(height / 2 - 2, height / 2 + 2);
  943.                             burntime++;
  944.                             pop()
  945.                         } else {
  946.                             tx = width / 2
  947.                             ty = height / 2
  948.                         }
  949.                     }
  950.  
  951.  
  952.                     if (yspeed / 20 >= heatresm && moon == 1) {
  953.                         push();
  954.                         noStroke();
  955.                         fill(255, 140, 0);
  956.                         ellipse(-17, 0, 35, 15);
  957.                         tx = random(width / 2 - 2, width / 2 + 2);
  958.                         ty = random(height / 2 - 2, height / 2 + 2);
  959.                         burntime++;
  960.                         pop()
  961.                     }
  962.                     if (burntime >= 100 && moon == 0) {
  963.                         lives--;
  964.                         burntime = 0;
  965.                         deathmess = "You went too fast and burned up!"
  966.                     }
  967.                     if (burntime >= 100 && moon == 1) {
  968.                         livesm--;
  969.                         burntime = 0;
  970.                         deathmess = "You went too fast and burned up!"
  971.                     }
  972.  
  973.                     if (lives <= 0 && moon == 0) {
  974.                         home = 1;
  975.                         burntime = 0;
  976.                         lives = livecount;
  977.                         reset();
  978.                     }
  979.                     if (livesm <= 0 && moon == 1) {
  980.                         home = 1;
  981.                         burntimem = 0;
  982.                         livesm = livecountm;
  983.                         reset();
  984.                     }
  985.  
  986.  
  987.                     pop()
  988.                     if (round(frameRate()) < fpsl) {
  989.                         fpsl = round(frameRate())
  990.                     }
  991.                     text("FPS:  " + round(frameRate()), 50, 20)
  992.                     textSize(30)
  993.                     if (round(yspeed / 20) >= 100) {
  994.                         fast = 1;
  995.                     }
  996.                     if (round(yspeed / 20) >= 767) {
  997.                         sonic = 1;
  998.                     }
  999.  
  1000.  
  1001.  
  1002.                     if (fast == 1 && fst < 300) {
  1003.                         push();
  1004.                         fill(textfill, textfill, textfill, f);
  1005.                         f -= 3;
  1006.                         text("Challenge complete go faster than 100 MPH coins + 50", width / 2, 200)
  1007.                         pop();
  1008.                         fst++;
  1009.                     }
  1010.                     if (fast == 1 && fst2 == 0) {
  1011.                         coins2 += 50;
  1012.                         fst2 = 1;
  1013.                     }
  1014.  
  1015.  
  1016.  
  1017.  
  1018.                     if (sonic == 1 && tf2 >= 0) {
  1019.                         push();
  1020.                         fill(textfill, textfill, textfill, tf2);
  1021.                         tf2 -= 3;
  1022.                         text("Challenge complete go super sonic coins + 500", width / 2, 200)
  1023.                         pop();
  1024.                     }
  1025.                     if (sonic == 1 && stu == 0) {
  1026.                         coins2 += 500;
  1027.                         stu = 1;
  1028.                     }
  1029.  
  1030.  
  1031.  
  1032.  
  1033.                     ground(-y + height / 2 - 35)
  1034.                     if (round(y / 2 / 35.7) >= 0) {
  1035.                         home = 1;
  1036.                         reset();
  1037.                         burntime = 0;
  1038.                         deathmess = "You hit the ground!"
  1039.                     }
  1040.                     if (round(-y / 2 / 35.7) >= 150) {
  1041.                         spacego = 1;
  1042.                     }
  1043.  
  1044.  
  1045.                     if (spacego == 1 && stt < 300) {
  1046.                         push();
  1047.                         fill(textfill, textfill, textfill, fs);
  1048.                         fs -= 3;
  1049.                         text("Challenge complete go to space coins + 30", width / 2, 200);
  1050.                         stt++
  1051.                         pop();
  1052.                         stt++;
  1053.                     }
  1054.                     if (sss == 0 && spacego == 1) {
  1055.                         coins2 += 30;
  1056.                         sss = 1;
  1057.                     }
  1058.  
  1059.  
  1060.                     if (travb == 1 && tf > 0) {
  1061.                         push();
  1062.                         fill(textfill, textfill, textfill, tf);
  1063.                         tf -= 3;
  1064.                         text("Challenge complete travel 6000 feet coins + 50", width / 2, 200);
  1065.                         pop();
  1066.                     }
  1067.                     if (ttt == 0 && travb == 1) {
  1068.                         coins2 += 50;
  1069.                         ttt = 1;
  1070.                     }
  1071.                     if (round(trav * -1 / 35.7) >= 6000) {
  1072.                         travb = 1;
  1073.                     }
  1074.  
  1075.  
  1076.                 }
  1077.             }
  1078.         }
  1079.     }
  1080.     /*
  1081.         imageMode(CENTER)
  1082.         img.resize(height,0)
  1083.         image(img,width/2,height/2)*/
  1084.     push()
  1085.     textSize(20)
  1086.     textAlign(CENTER, CENTER);
  1087.     if (mouseY > height - 50) {
  1088.         fill(999)
  1089.         rect(0, height - 50, width, 50)
  1090.         fill(0)
  1091.         text("?️ " + rawJSON.sketch.numberOfViews + "  ♡" + rawJSON.sketch.hearts.length + "  ?" + rawJSON.sketch.comments.length, width / 2, height - 20)
  1092.     }
  1093.     pop()
  1094. }
  1095.  
  1096.  
  1097.  
  1098.  
  1099. function ground(y2) {
  1100.     push()
  1101.     noStroke()
  1102.     if (moon == 0) {
  1103.         fill(9, 255, 0)
  1104.     } else {
  1105.         fill(170)
  1106.     }
  1107.     rect(0, y2, 2000, 2000)
  1108.  
  1109.     pop()
  1110.  
  1111.  
  1112. }
  1113.  
  1114.  
  1115.  
  1116.  
  1117. function Cloud() {
  1118.  
  1119.     this.x = random(width)
  1120.     this.y = 0
  1121.     this.r = random(-1500, -500)
  1122.     this.up = 0;
  1123.     this.st = 0;
  1124.     this.t = 0;
  1125.     this.t2 = 0;
  1126.     this.t3 = 0;
  1127.  
  1128.     this.move = function() {
  1129.         if (reset2 == 1) {
  1130.             this.t++;
  1131.             if (this.t <= 5) {
  1132.                 this.x = random(width)
  1133.                 this.y = 0
  1134.                 this.r = random(-1500, -500)
  1135.                 this.up = 0;
  1136.                 this.st = 0;
  1137.                 this.t2 = 0;
  1138.             }
  1139.             if (this.t > 5) {
  1140.                 reset2 = 1
  1141.             }
  1142.         }
  1143.         this.t2++
  1144.         this.t3++
  1145.  
  1146.         if (this.t3 > 30 * frameRate()) {
  1147.             this.st = 0
  1148.         }
  1149.  
  1150.         if (round(-y / 2 / 35.7) < 170 && moon == 0) {
  1151.             cloudDraw(this.x, this.y)
  1152.         } else {
  1153.             push();
  1154.             strokeWeight(0);
  1155.             fill(999);
  1156.             ellipse(this.x, this.y, 10, 10);
  1157.             pop()
  1158.         }
  1159.  
  1160.  
  1161.  
  1162.  
  1163.         this.x -= yspeed / 10
  1164.         this.y = -y + this.r + this.up
  1165.         if (this.x < -150) {
  1166.             this.x = random(width + 150, width + 300)
  1167.         }
  1168.         if (this.st == 0) {
  1169.             this.st = 1
  1170.             if (this.y > height + 150) {
  1171.                 this.up -= random(height + 200, height + 400)
  1172.             }
  1173.  
  1174.             if (this.y < -150) {
  1175.                 this.up += random(height + 100, height + 300)
  1176.             }
  1177.  
  1178.         } else {}
  1179.         if (this.y > height + 150 || this.y < -150) {} else {
  1180.             this.st = 0
  1181.         }
  1182.  
  1183.  
  1184.         if (this.y > height + 1500 && this.st2 == 0) {
  1185.             this.y = height / 2
  1186.             this.x = width / 2
  1187.             this.st2 = 1
  1188.         }
  1189.  
  1190.  
  1191.         if (this.y < -1500 && this.st2 == 0) {
  1192.             this.y = height / 2
  1193.             this.x = width / 2
  1194.             this.st2 = 1
  1195.         }
  1196.  
  1197.  
  1198.  
  1199.         if (this.x < -1500 && this.st2 == 0) {
  1200.             this.y = height / 2
  1201.             this.x = width / 2
  1202.             this.st2 = 1
  1203.  
  1204.         }
  1205.  
  1206.  
  1207.     }
  1208. }
  1209.  
  1210. function cloudDraw(x2, y2) {
  1211.     push()
  1212.     fill(999);
  1213.     noStroke()
  1214.  
  1215.     // sky/clouds/ sun
  1216.     ellipse(x2 + 45, y2 + 97, 60, 60)
  1217.  
  1218.     ellipse(x2 + 72, y2 + 78, 60, 60)
  1219.     ellipse(x2 + 72, y2 + 94, 60, 60)
  1220.     ellipse(x2 + 40, y2 + 80, 60, 60)
  1221.     pop()
  1222.  
  1223.  
  1224.  
  1225.  
  1226. }
  1227.  
  1228.  
  1229. function Coin() {
  1230.  
  1231.     this.x = random(width)
  1232.     this.y = 500
  1233.     this.up = 0
  1234.     this.st = 0
  1235.  
  1236.     this.move = function() {
  1237.  
  1238.  
  1239.         this.x -= yspeed / 10
  1240.         this.y = -y + this.up
  1241.  
  1242.         if (this.x < -150) {
  1243.             this.x = random(width + 150, width + 300);
  1244.             this.up = random(-700, 200);
  1245.             this.st = 0
  1246.         }
  1247.         //  if (this.y>height-100) {this.up+=random(-200,200)}
  1248.  
  1249.  
  1250.         push()
  1251.         fill(255, 242, 0)
  1252.  
  1253.         if (this.st == 0) {
  1254.             ellipse(this.x, this.y, 50, 50)
  1255.             if (this.x > width / 2 - 30 && this.x < width / 2 + 30 && this.y > height / 2 - 30 && this.y < height / 2 + 30 && moon == 0) {
  1256.                 coins2 += coinget;
  1257.                 this.st = 1
  1258.             }
  1259.             if (this.x > width / 2 - 30 && this.x < width / 2 + 30 && this.y > height / 2 - 30 && this.y < height / 2 + 30 && moon == 1) {
  1260.                 coins2m += coingetm;
  1261.                 this.st = 1
  1262.             }
  1263.         }
  1264.  
  1265.         pop()
  1266.     }
  1267. }
  1268.  
  1269.  
  1270. function Rock() {
  1271.  
  1272.  
  1273.     this.x = random(width)
  1274.     this.y = 0
  1275.     this.r = random(-1500, -500)
  1276.     this.up = 0;
  1277.     this.st = 0;
  1278.     this.t = 0;
  1279.     this.t2 = 0;
  1280.     this.st2 = 0
  1281.  
  1282.     this.move = function() {
  1283.         this.t2++
  1284.  
  1285.  
  1286.         if (round(-y / 2 / 35.7) > 170 || moon == 1) {
  1287.             push()
  1288.             fill(255, 0, 0)
  1289.             ellipse(this.x, this.y, 40, 40)
  1290.             if (this.x > width / 2 - 20 && this.x < width / 2 + 20 && this.y > height / 2 - 20 && this.y < height / 2 + 20 && this.st2 == 0 && moon == 0) {
  1291.                 lives--;
  1292.                 this.st2 = 1;
  1293.                 deathmess = "you got hit by an asteroid!"
  1294.             }
  1295.             if (lives < 1 && this.x > width / 2 - 20 && this.x < width / 2 + 20 && this.y > height / 2 - 20 && this.y < height / 2 + 2 && moon == 0) {
  1296.                 deathmess = "you got hit by an asteroid!";
  1297.                 reset();
  1298.                 home = 1
  1299.             }
  1300.  
  1301.  
  1302.             if (this.x > width / 2 - 20 && this.x < width / 2 + 20 && this.y > height / 2 - 20 && this.y < height / 2 + 20 && this.st2 == 0 && moon == 1) {
  1303.                 livesm--;
  1304.                 this.st2 = 1;
  1305.                 deathmess = "you got hit by an asteroid!"
  1306.             }
  1307.             if (lives < 1 && this.x > width / 2 - 20 && this.x < width / 2 + 20 && this.y > height / 2 - 20 && this.y < height / 2 + 2 && moon == 1) {
  1308.                 deathmess = "you got hit by an asteroid!";
  1309.                 reset();
  1310.                 home = 1
  1311.             }
  1312.             if (this.x > width / 2 - 20 && this.x < width / 2 + 20 && this.y > height / 2 - 20 && this.y < height / 2 + 20) {} else {
  1313.                 this.st2 = 0
  1314.             }
  1315.             pop()
  1316.         }
  1317.  
  1318.         this.x -= yspeed / 10
  1319.         this.y = -y + this.r + this.up
  1320.         if (this.x < -150) {
  1321.             this.x = random(width + 150, width + 300)
  1322.         }
  1323.         if (this.st == 0) {
  1324.             this.st = 1
  1325.             if (this.y > height + 150) {
  1326.                 this.up -= random(height + 200, height + 400)
  1327.             }
  1328.  
  1329.             if (this.y < -150) {
  1330.                 this.up += random(height + 100, height + 300)
  1331.             }
  1332.  
  1333.         } else {}
  1334.         if (this.y > height + 150 || this.y < -150) {} else {
  1335.             this.st = 0
  1336.         }
  1337.         if (this.st2 == 0) {
  1338.  
  1339.  
  1340.         }
  1341.     }
  1342. }
  1343.  
  1344.  
  1345.  
  1346.  
  1347. function butt(xx, yy, ww, hh) {
  1348.     push()
  1349.     strokeWeight(2)
  1350.     stroke(0)
  1351.     fill(999)
  1352.     rect(xx, yy, ww, hh)
  1353.  
  1354.     pop()
  1355.     if ((mouseX > xx && mouseX < xx + ww && (mouseY > yy && mouseY < yy + hh))) {
  1356.         cursor(HAND)
  1357.     }
  1358.     if ((mouseX > xx && mouseX < xx + ww && (mouseY > yy && mouseY < yy + hh && mouseIsPressed))) {
  1359.         return true;
  1360.     }
  1361.  
  1362. }
  1363.  
  1364.  
  1365. function cbutt(xx, yy, ww, hh) {
  1366.     push()
  1367.     noStroke()
  1368.     noFill()
  1369.     rect(xx, yy, ww, hh)
  1370.  
  1371.     pop()
  1372.     if ((mouseX > xx && mouseX < xx + ww && (mouseY > yy && mouseY < yy + hh))) {
  1373.         cursor(HAND)
  1374.     }
  1375.     if ((mouseX > xx && mouseX < xx + ww && (mouseY > yy && mouseY < yy + hh && mouseIsPressed))) {
  1376.         return true;
  1377.     }
  1378.  
  1379. }
  1380.  
  1381.  
  1382.  
  1383.  
  1384. function reset() {
  1385.  
  1386.     x = 100
  1387.     y = -2000
  1388.     yspeed = 100
  1389.     xspeed = 0
  1390.     r = 0
  1391.     reset2 = 1
  1392.     trav = 0
  1393.  
  1394. }
  1395.  
  1396.  
  1397. function resetAll() {
  1398.     lives = null
  1399.     coins2 = null
  1400.     coinget = null
  1401.     heatres = null
  1402.     livecount = null
  1403.     startspeed = null
  1404.     coincost = null
  1405.     spacego = null
  1406.     fast = null
  1407.     travb = null
  1408.     sonic = null
  1409.     light = null
  1410.     fst = null
  1411.     fst2 = null
  1412.     stt = null
  1413.     sss = null
  1414.     ttt = null
  1415.     stu = null
  1416.     drag = null
  1417.     tf = null
  1418.     tf2 = null
  1419.     airbrake = null
  1420.     fuel = null
  1421.     fuelget = null
  1422.     moonget = null
  1423.     fm = null
  1424.     livesm = null
  1425.     coins2m = null
  1426.     coingetm = null
  1427.     heatresm = null
  1428.     livecountm = null
  1429.     startspeedm = null
  1430.     coincostm = null
  1431.     dragm = null
  1432.     airbrakem = null
  1433.     fuelm = null
  1434.     fuelgetm = null
  1435. }
  1436.  
  1437. function storeAll() {
  1438.     storeItem('lives', lives)
  1439.     storeItem('coins2', coins2)
  1440.     storeItem('coinget', coinget)
  1441.     storeItem('heatres', heatres)
  1442.     storeItem('livecount', livecount)
  1443.     storeItem('startspeed', startspeed)
  1444.     storeItem('coincost', coincost)
  1445.     storeItem('spacego', spacego)
  1446.     storeItem('fast', fast)
  1447.     storeItem('travb', travb)
  1448.     storeItem('sonic', sonic)
  1449.     storeItem('light', light)
  1450.     storeItem('fst', fst)
  1451.     storeItem('fst2', fst2)
  1452.     storeItem('stt', stt)
  1453.     storeItem('sss', sss)
  1454.     storeItem('ttt', ttt)
  1455.     storeItem('stu', stu)
  1456.     storeItem('drag', drag)
  1457.     storeItem('tf', tf)
  1458.     storeItem('tf2', tf2)
  1459.     storeItem('airbrake', airbrake)
  1460.     storeItem('fuel', fuel)
  1461.     storeItem('fuelget', fuelget)
  1462.     storeItem('moonget', moonget)
  1463.     storeItem('fm', fm)
  1464.     storeItem('livesm', livesm)
  1465.     storeItem('coins2m', coins2m)
  1466.     storeItem('coingetm', coingetm)
  1467.     storeItem('heatresm', heatresm)
  1468.     storeItem('livecountm', livecountm)
  1469.     storeItem('startspeedm', startspeedm)
  1470.     storeItem('coincostm', coincostm)
  1471.     storeItem('dragm', dragm)
  1472.     storeItem('airbrakem', airbrakem)
  1473.     storeItem('fuelm', fuelm)
  1474.     storeItem('fuelgetm', fuelgetm)
  1475.     store++
  1476.  
  1477. }
  1478.  
  1479. function sand2() {
  1480.  
  1481.     //  coins2=999999999
  1482.     // coinget=999999999
  1483.     //  heatres=999999999
  1484.     // livecount=999999999
  1485.     //  drag=-5
  1486.     //  fuel=999999999
  1487.     // fuelget=999999999
  1488.  
  1489.  
  1490.     //  coins2m=999999999
  1491.     // coingetm=999999999
  1492.     //  heatresm=999999999
  1493.     // livecountm=999999999
  1494.     //  dragm=-5
  1495.     //  fuelm=999999999
  1496.     // fuelgetm=999999999
  1497. }
  1498.  
  1499.  
  1500. function mouseWheel(event) {
  1501.     yy -= event.delta
  1502.     return false
  1503. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement