Noobyhead99

mim

Sep 27th, 2013
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 49.44 KB | None | 0 0
  1. while true do
  2. term.clear()
  3. term.setCursorPos(1,1)
  4. print "GAME CONTROLS"
  5. print "-------------"
  6. print "Arrows Keys to Move"
  7. print "Q,W,E,A,D,Z,X,C - Place or Destroy Blocks"
  8. print "S - To toggle place or destroy"
  9. print "L - To toggle lighting"
  10. print "N - To toggle noclip"
  11. print "#1-X - To change current block"
  12. print "Esc - To Quit(while in game)"
  13. print "--------------"
  14. print ""
  15. print "Press 1 to Install Font, Press 2 to Play Game"
  16. event, param = os.pullEvent()
  17. if event == "char" and param == "1" then
  18. file = io.open("font.txt", "w")
  19. font = "137\n80\n78\n71\n13\n10\n26\n10\n0\n0\n0\n13\n73\n72\n68\n82\n0\n0\n0\n128\n0\n0\n0\n128\n8\n6\n0\n0\n0\n195\n62\n97\n203\n0\n0\n0\n1\n115\n82\n71\n66\n0\n174\n206\n28\n233\n0\n0\n0\n6\n98\n75\n71\n68\n0\n255\n0\n255\n0\n255\n160\n189\n167\n147\n0\n0\n0\n9\n112\n72\n89\n115\n0\n0\n14\n193\n0\n0\n14\n193\n1\n184\n145\n107\n237\n0\n0\n0\n7\n116\n73\n77\n69\n7\n220\n1\n19\n1\n25\n27\n198\n67\n173\n246\n0\n0\n21\n40\n73\n68\n65\n84\n120\n218\n237\n93\n123\n108\n92\n85\n122\n255\n157\n153\n59\n30\n143\n199\n99\n143\n31\n227\n119\n28\n54\n118\n60\n155\n134\n215\n38\n149\n86\n108\n121\n132\n208\n77\n200\n6\n104\n233\n110\n27\n160\n136\n173\n90\n181\n37\n130\n85\n41\n116\n181\n168\n21\n141\n171\n44\n8\n164\n236\n110\n212\n118\n31\n168\n176\n170\n22\n85\n33\n44\n93\n160\n2\n20\n40\n27\n178\n148\n135\n20\n178\n4\n130\n201\n146\n144\n135\n99\n199\n73\n198\n227\n199\n216\n158\n135\n61\n158\n241\n237\n31\n73\n198\n115\n39\n247\n222\n243\n188\n51\n99\n199\n71\n178\n146\n153\n51\n231\n245\n157\n239\n124\n175\n243\n125\n223\n33\n96\n40\n186\n174\n235\n102\n223\n19\n66\n8\n79\n61\n33\n132\n228\n255\n223\n108\n28\n179\n239\n11\n199\n176\n251\n141\n85\n29\n239\n218\n104\n99\n137\n182\n47\n252\n189\n21\n12\n105\n237\n242\n127\n199\n58\n135\n66\n216\n235\n186\n174\n107\n44\n0\n98\n217\n20\n150\n250\n252\n207\n133\n253\n94\n172\n51\n27\n207\n172\n31\n222\n141\n150\n45\n180\n13\n146\n217\n48\n179\n141\n177\n90\n163\n221\n161\n51\n131\n231\n197\n241\n204\n230\n71\n8\n33\n46\n17\n0\n208\n6\n151\n61\n133\n188\n192\n46\n68\n32\n187\n113\n236\n234\n201\n133\n98\n213\n119\n126\n189\n25\n69\n202\n239\n95\n244\n208\n176\n192\n202\n170\n15\n61\n175\n216\n33\n93\n62\n66\n104\n172\n3\n211\n54\n152\n134\n32\n188\n36\n244\n226\n36\n205\n234\n205\n78\n12\n141\n66\n216\n81\n31\n179\n245\n217\n33\n161\n221\n41\n182\n163\n110\n188\n164\n155\n151\n37\n89\n81\n84\n59\n68\n213\n156\n38\n129\n86\n11\n189\n248\n123\n90\n189\n44\n2\n161\n196\n197\n14\n89\n11\n97\n192\n34\n231\n168\n46\n174\n98\n80\n0\n26\n178\n208\n78\n163\n221\n124\n104\n245\n170\n40\n152\n147\n44\n144\n214\n158\n151\n82\n20\n34\n146\n21\n139\n226\n146\n1\n236\n120\n36\n11\n127\n98\n221\n48\n59\n193\n71\n244\n179\n236\n252\n105\n60\n158\n38\n35\n240\n242\n245\n252\n207\n188\n130\n182\n213\n188\n173\n88\n152\n20\n153\n101\n85\n3\n85\n75\n224\n86\n27\n160\n146\n133\n168\n84\n3\n105\n20\n209\n138\n93\n176\n168\n191\n44\n66\n167\n157\n26\n72\n68\n121\n165\n157\n160\n69\n251\n158\n38\n196\n137\n168\n61\n34\n252\n88\n117\n253\n66\n44\n26\n239\n194\n236\n132\n46\n17\n1\n204\n202\n72\n100\n198\n115\n11\n79\n134\n200\n56\n162\n90\n130\n44\n130\n201\n34\n79\n225\n73\n102\n29\n131\n70\n161\n92\n188\n58\n38\n43\n82\n200\n234\n187\n44\n60\n88\n134\n204\n243\n8\n125\n34\n243\n228\n65\n12\n17\n62\n79\n83\n67\n153\n231\n76\n35\n191\n44\n228\n89\n53\n11\n176\n162\n6\n52\n83\n114\n41\n88\n128\n44\n252\n100\n13\n71\n118\n99\n176\n200\n104\n26\n171\n74\n162\n242\n68\n243\n78\n84\n181\n144\n202\n139\n68\n118\n237\n105\n200\n46\n139\n180\n102\n237\n105\n54\n150\n66\n182\n97\n39\n136\n186\n88\n213\n36\n187\n58\n59\n53\n198\n172\n45\n15\n249\n182\n163\n28\n50\n214\n51\n145\n241\n89\n205\n209\n86\n106\n41\n139\n153\n218\n204\n156\n43\n59\n127\n59\n59\n131\n50\n45\n192\n78\n213\n161\n177\n0\n22\n235\n161\n93\n91\n86\n53\n116\n73\n11\n48\n129\n145\n147\n102\n79\n213\n253\n138\n96\n191\n172\n158\n127\n217\n23\n22\n190\n76\n179\n90\n177\n222\n212\n241\n240\n95\n158\n121\n178\n174\n193\n74\n218\n118\n82\n254\n41\n245\n126\n186\n202\n105\n82\n52\n96\n219\n233\n191\n162\n183\n107\n133\n194\n146\n149\n236\n163\n226\n26\n183\n28\n224\n204\n77\n241\n88\n117\n84\n150\n59\n106\n179\n13\n86\n113\n117\n44\n74\n25\n84\n140\n207\n170\n127\n151\n11\n2\n148\n4\n115\n121\n144\n68\n116\n243\n89\n47\n79\n84\n35\n0\n171\n1\n141\n101\n141\n78\n180\n151\n222\n71\n85\n30\n44\n172\n11\n224\n181\n202\n177\n178\n143\n203\n153\n2\n148\n156\n250\n216\n157\n78\n22\n228\n176\n3\n178\n168\n9\n84\n84\n208\n85\n189\n9\n197\n144\n45\n164\n198\n40\n6\n11\n144\n213\n2\n100\n88\n64\n169\n181\n0\n167\n17\n96\n49\n105\n48\n151\n173\n154\n237\n184\n33\n72\n214\n231\n158\n213\n105\n129\n102\n120\n97\n181\n242\n241\n152\n97\n89\n218\n171\n154\n127\n41\n212\n52\n150\n54\n182\n243\n231\n37\n177\n188\n36\n154\n215\n144\n35\n162\n38\n242\n176\n22\n167\n63\n139\n158\n112\n25\n74\n32\n179\n126\n141\n165\n35\n150\n43\n71\n75\n18\n195\n232\n100\n194\n66\n25\n172\n78\n47\n171\n171\n116\n57\n179\n1\n158\n235\n96\n179\n203\n38\n90\n32\n9\n179\n128\n38\n99\n80\n17\n9\n202\n144\n61\n81\n178\n42\n38\n139\n29\n66\n133\n30\n94\n12\n25\n64\n104\n253\n102\n87\n185\n170\n172\n112\n34\n27\n40\n19\n110\n38\n50\n127\n167\n72\n122\n169\n52\n45\n222\n122\n151\n44\n153\n164\n93\n11\n179\n220\n198\n229\n151\n114\n86\n99\n88\n226\n22\n69\n230\n111\n199\n98\n89\n14\n8\n139\n32\n104\n85\n175\n21\n14\n78\n115\n150\n100\n149\n180\n173\n22\n39\n226\n200\n96\n215\n222\n233\n254\n237\n214\n173\n84\n29\n179\n224\n227\n44\n18\n190\n10\n57\n107\n169\n44\n82\n61\n159\n86\n52\n179\n73\n242\n232\n201\n44\n206\n26\n50\n237\n85\n4\n133\n208\n188\n149\n104\n159\n85\n107\n52\n118\n227\n241\n254\n158\n165\n63\n46\n59\n128\n21\n217\n47\n151\n207\n170\n132\n31\n94\n59\n136\n140\n144\n43\n211\n119\n161\n153\n219\n74\n136\n22\n133\n167\n198\n194\n231\n120\n128\n168\n194\n46\n192\n203\n131\n89\n121\n180\n136\n12\n163\n146\n13\n136\n242\n224\n124\n249\n192\n46\n212\n92\n164\n127\n141\n117\n2\n60\n36\n89\n181\n176\n161\n10\n169\n88\n66\n209\n157\n64\n6\n90\n68\n143\n42\n24\n136\n204\n221\n181\n208\n132\n150\n133\n92\n84\n184\n150\n169\n166\n174\n154\n76\n99\n85\n186\n244\n66\n151\n242\n23\n242\n122\n52\n158\n240\n101\n17\n25\n128\n71\n207\n102\n149\n65\n120\n131\n58\n100\n236\n4\n118\n201\n171\n84\n244\n47\n187\n62\n167\n215\n191\n84\n22\n59\n91\n114\n90\n143\n103\n209\n195\n121\n132\n202\n114\n252\n204\n42\n84\n242\n230\n70\n228\n209\n176\n132\n89\n81\n169\n245\n120\n218\n239\n138\n49\n31\n21\n129\n45\n50\n235\n87\n229\n243\n32\n34\n96\n106\n34\n214\n46\n213\n50\n64\n185\n72\n231\n118\n129\n177\n172\n158\n55\n165\n72\n96\n89\n24\n137\n204\n51\n7\n77\n197\n166\n208\n236\n0\n78\n219\n9\n84\n1\n81\n102\n110\n178\n58\n190\n104\n123\n222\n203\n35\n170\n29\n96\n33\n235\n214\n34\n105\n109\n205\n78\n80\n41\n84\n65\n167\n109\n4\n74\n16\n192\n137\n100\n204\n197\n62\n225\n75\n118\n0\n11\n67\n16\n11\n102\n138\n144\n170\n98\n220\n215\n179\n240\n112\n39\n79\n25\n235\n141\n38\n171\n57\n215\n105\n211\n180\n97\n204\n37\n77\n120\n113\n23\n234\n117\n121\n185\n133\n61\n171\n142\n236\n145\n29\n79\n54\n216\n180\n220\n35\n119\n180\n197\n130\n229\n78\n241\n97\n21\n249\n136\n202\n90\n6\n96\n225\n235\n172\n145\n67\n118\n214\n46\n187\n246\n60\n169\n210\n172\n248\n43\n143\n63\n3\n111\n100\n17\n111\n74\n26\n39\n94\n52\n177\n123\n248\n129\n117\n109\n74\n16\n84\n181\n71\n138\n93\n118\n49\n86\n146\n42\n27\n25\n196\n51\n127\n81\n22\n32\n155\n192\n130\n53\n114\n74\n216\n35\n72\n134\n79\n201\n166\n92\n163\n233\n194\n142\n75\n194\n14\n147\n237\n114\n86\n21\n185\n223\n12\n82\n33\n52\n22\n147\n175\n58\n109\n96\n97\n245\n201\n151\n69\n2\n167\n16\n72\n83\n1\n64\n153\n187\n0\n158\n116\n170\n42\n4\n179\n82\n73\n221\n118\n126\n255\n78\n11\n177\n182\n240\n191\n220\n244\n96\n39\n0\n189\n228\n112\n81\n34\n221\n127\n161\n173\n81\n214\n45\n156\n245\n55\n11\n14\n158\n139\n29\n1\n84\n4\n214\n178\n230\n79\n226\n133\n165\n139\n37\n203\n150\n93\n14\n30\n158\n246\n118\n106\n94\n169\n28\n66\n84\n124\n118\n50\n124\n156\n71\n190\n161\n37\n244\n22\n34\n31\n44\n122\n186\n172\n30\n93\n202\n12\n31\n52\n36\n228\n89\n143\n211\n42\n172\n108\n22\n52\n179\n246\n92\n225\n225\n44\n79\n180\n89\n73\n185\n165\n206\n185\n203\n162\n105\n168\n12\n147\n103\n213\n114\n120\n88\n128\n108\n86\n119\n179\n185\n80\n93\n194\n84\n232\n209\n78\n122\n4\n21\n134\n77\n201\n0\n201\n78\n77\n91\n168\n134\n30\n42\n252\n100\n109\n221\n60\n247\n8\n118\n84\n132\n199\n155\n71\n230\n229\n113\n26\n66\n138\n68\n235\n178\n80\n74\n209\n187\n6\n21\n143\n77\n217\n205\n79\n83\n113\n2\n89\n234\n31\n248\n223\n14\n244\n252\n126\n19\n0\n96\n247\n209\n71\n240\n103\n43\n111\n196\n65\n28\n197\n26\n242\n93\n106\n63\n44\n139\n23\n109\n207\n251\n10\n184\n168\n15\n158\n29\n251\n220\n182\n109\n27\n38\n83\n41\n180\n181\n183\n227\n200\n167\n159\n162\n177\n179\n19\n201\n68\n2\n255\n250\n212\n83\n202\n252\n53\n127\n248\n200\n245\n120\n248\n7\n239\n230\n190\n127\n237\n71\n91\n176\n249\n239\n119\n159\n191\n13\n124\n227\n241\n123\n245\n79\n142\n159\n133\n166\n185\n17\n29\n143\n227\n236\n232\n20\n218\n26\n107\n240\n196\n11\n239\n17\n0\n248\n135\n87\n191\n161\n207\n206\n206\n98\n124\n124\n28\n219\n222\n254\n83\n108\n221\n125\n147\n62\n54\n54\n134\n221\n91\n63\n37\n0\n176\n225\n186\n30\n189\n165\n190\n18\n203\n155\n3\n136\n140\n39\n224\n118\n187\n225\n114\n17\n180\n124\n115\n165\n139\n16\n232\n99\n145\n120\n186\n102\n172\n210\n147\n220\n235\n77\n111\n223\n29\n38\n71\n62\n58\n67\n190\n127\n240\n249\n169\n80\n91\n77\n61\n0\n188\n245\n179\n191\n212\n251\n135\n35\n104\n171\n175\n71\n36\n22\n195\n242\n80\n51\n116\n125\n14\n183\n220\n255\n115\n162\n235\n58\n238\n186\n235\n46\n253\n240\n225\n195\n216\n178\n101\n11\n182\n111\n223\n142\n205\n155\n55\n163\n191\n191\n31\n31\n125\n244\n17\n1\n128\n199\n158\n63\n50\n252\n121\n95\n2\n154\n155\n32\n20\n244\n226\n204\n88\n10\n171\n86\n87\n7\n183\n223\n21\n174\n0\n128\n109\n219\n182\n233\n83\n83\n83\n104\n105\n105\n193\n137\n19\n39\n16\n10\n133\n144\n74\n165\n176\n99\n199\n14\n66\n171\n191\n176\n65\n185\n250\n251\n239\n191\n95\n207\n175\n215\n117\n29\n189\n189\n189\n150\n237\n105\n245\n23\n241\n204\n29\n143\n35\n59\n50\n130\n234\n234\n106\n212\n76\n78\n162\n98\n102\n6\n0\n200\n35\n191\n209\n161\n235\n176\n200\n208\n6\n178\n227\n70\n160\n192\n191\n3\n102\n56\n67\n8\n50\n223\n90\n223\n181\n166\n174\n198\n91\n125\n242\n244\n120\n252\n236\n232\n228\n39\n221\n29\n94\n226\n202\n33\n184\n14\n100\n102\n179\n88\n119\n237\n10\n120\n43\n52\n116\n183\n55\n228\n26\n183\n86\n54\n96\n121\n67\n59\n106\n106\n106\n144\n76\n38\n209\n54\n214\n0\n207\n240\n60\n241\n136\n199\n227\n168\n246\n185\n241\n65\n223\n25\n172\n9\n183\n98\n50\n49\n131\n254\n51\n147\n185\n250\n186\n166\n106\n226\n241\n184\n145\n201\n100\n9\n0\n196\n162\n113\n61\n61\n51\n171\n15\n15\n77\n26\n38\n153\n205\n100\n208\n119\n116\n4\n110\n55\n201\n199\n96\n0\n64\n34\n145\n192\n211\n79\n63\n141\n157\n59\n119\n2\n0\n86\n174\n92\n153\n251\n205\n244\n168\n30\n106\n168\n169\n8\n133\n26\n42\n67\n196\n77\n66\n173\n141\n254\n80\n52\n6\n143\n161\n239\n108\n22\n167\n79\n159\n70\n56\n28\n6\n33\n4\n126\n191\n63\n7\n48\n0\n104\n173\n241\n0\n241\n17\n132\n195\n97\n116\n214\n121\n17\n110\n171\n55\n204\n109\n116\n116\n20\n125\n125\n125\n248\n224\n189\n247\n16\n141\n70\n145\n74\n165\n12\n243\n187\n230\n247\n226\n8\n213\n29\n69\n56\n28\n198\n234\n213\n13\n88\n187\n182\n195\n80\n239\n90\n126\n53\n34\n21\n33\n132\n195\n97\n180\n118\n173\n198\n138\n43\n215\n26\n198\n175\n25\n27\n195\n228\n225\n195\n232\n232\n232\n192\n151\n70\n70\n240\n229\n120\n220\n104\n175\n53\n251\n187\n208\n191\n174\n235\n185\n63\n43\n130\n65\n8\n57\n19\n240\n87\n236\n2\n240\n108\n115\n125\n245\n174\n143\n143\n12\n233\n55\n173\n233\n58\n175\n5\n28\n63\n59\n134\n153\n76\n22\n167\n34\n49\n28\n63\n59\n134\n186\n234\n74\n188\n251\n105\n127\n110\n130\n190\n151\n71\n145\n248\n143\n126\n104\n191\n152\n194\n208\n83\n39\n113\n234\n87\n199\n225\n125\n55\n155\n235\n252\n218\n47\n183\n193\n235\n173\n196\n85\n43\n91\n112\n248\n212\n56\n8\n33\n136\n77\n38\n241\n216\n150\n93\n250\n233\n227\n163\n208\n103\n181\n209\n192\n205\n71\n225\n107\n202\n122\n102\n43\n38\n60\n117\n77\n213\n83\n21\n94\n207\n193\n127\n190\n107\n87\n129\n78\n226\n198\n166\n175\n173\n194\n192\n240\n48\n166\n207\n159\n128\n92\n185\n247\n222\n123\n81\n95\n95\n143\n103\n158\n121\n6\n183\n221\n118\n27\n214\n173\n91\n151\n171\n75\n207\n206\n225\n150\n27\n27\n17\n29\n157\n70\n77\n147\n11\n169\n212\n44\n18\n209\n105\n227\n6\n183\n182\n194\n227\n241\n96\n104\n104\n8\n13\n13\n13\n8\n6\n131\n134\n13\n202\n86\n214\n33\n146\n200\n98\n104\n104\n8\n73\n119\n0\n113\n226\n51\n140\n191\n106\n213\n42\n52\n54\n54\n226\n134\n155\n110\n66\n56\n28\n70\n119\n119\n183\n161\n254\n236\n200\n10\n244\n125\n94\n139\n161\n161\n33\n68\n34\n4\n231\n206\n25\n15\n109\n99\n234\n28\n48\n216\n135\n161\n161\n33\n204\n78\n68\n48\n51\n126\n46\n55\n190\n166\n105\n240\n94\n121\n37\n92\n21\n21\n24\n138\n70\n49\n220\n209\n129\n115\n107\n215\n178\n242\n120\n16\n66\n114\n127\n22\n153\n224\n224\n113\n107\n254\n190\n223\n69\n54\n206\n204\n100\n239\n60\n124\n50\n186\n241\n134\n107\n175\n136\n63\n251\n63\n135\n207\n35\n64\n87\n107\n61\n146\n158\n58\n212\n180\n116\n162\n171\n181\n30\n87\n119\n181\n34\n20\n244\n231\n58\n184\n88\n239\n107\n236\n192\n95\n220\n186\n22\n235\n215\n116\n161\n177\n118\n254\n4\n205\n205\n205\n97\n98\n42\n5\n143\n27\n232\n106\n169\n66\n85\n133\n39\n55\n145\n80\n91\n45\n136\n39\n83\n31\n219\n19\n78\n167\n134\n221\n179\n254\n108\n115\n186\n102\n195\n145\n122\n66\n200\n154\n237\n187\n239\n206\n141\n113\n69\n83\n51\n252\n222\n74\n12\n142\n68\n49\n112\n38\n129\n42\n223\n252\n6\n172\n91\n183\n14\n135\n14\n29\n194\n61\n247\n220\n131\n238\n238\n110\n28\n56\n112\n0\n110\n183\n123\n158\n66\n53\n120\n241\n254\n254\n113\n120\n61\n46\n140\n159\n1\n234\n2\n21\n88\n214\n52\n223\n62\n24\n12\n34\n145\n72\n160\n165\n165\n5\n126\n191\n31\n83\n83\n83\n185\n141\n215\n117\n29\n193\n96\n16\n117\n158\n12\n238\n190\n182\n1\n126\n191\n31\n43\n188\n113\n232\n48\n214\n15\n14\n14\n226\n195\n15\n63\n68\n32\n16\n192\n222\n189\n123\n161\n105\n154\n161\n190\n163\n163\n10\n59\n118\n36\n225\n247\n251\n241\n173\n77\n251\n145\n205\n186\n13\n227\n215\n52\n117\n160\n243\n193\n29\n240\n251\n253\n24\n189\n246\n155\n32\n115\n243\n7\n168\n170\n170\n10\n158\n247\n223\n199\n242\n215\n94\n195\n149\n163\n163\n112\n237\n217\n99\n184\n164\n177\n33\n0\n185\n57\n92\n252\n195\n78\n162\n155\n33\n72\n103\n83\n40\n113\n197\n178\n224\n27\n46\n23\n121\n105\n229\n178\n250\n55\n64\n220\n213\n119\n111\n232\n158\n167\n0\n115\n19\n231\n128\n169\n8\n246\n125\n124\n2\n209\n137\n4\n134\n199\n231\n73\n16\n173\n158\n16\n130\n68\n114\n6\n110\n23\n193\n231\n131\n19\n232\n233\n12\n34\n88\n83\n117\n126\n113\n237\n105\n196\n70\n226\n158\n217\n217\n44\n116\n29\n72\n103\n167\n201\n228\n155\n225\n217\n200\n96\n172\n80\n184\n194\n217\n241\n49\n44\n107\n12\n225\n43\n61\n45\n152\n203\n195\n228\n125\n251\n246\n225\n142\n59\n238\n192\n169\n83\n167\n0\n0\n107\n214\n172\n65\n54\n59\n15\n192\n145\n137\n52\n70\n39\n102\n224\n113\n17\n76\n198\n83\n136\n198\n102\n112\n242\n76\n50\n87\n31\n139\n197\n208\n216\n216\n136\n153\n11\n84\n165\n186\n186\n218\n112\n82\n98\n177\n24\n218\n171\n9\n94\n58\n54\n139\n191\n186\n121\n53\n14\n79\n85\n130\n192\n88\n63\n48\n48\n128\n245\n235\n215\n163\n175\n175\n15\n27\n54\n108\n64\n38\n147\n49\n212\n175\n255\n234\n126\n124\n239\n209\n70\n244\n246\n246\n226\n23\n255\n125\n37\n220\n238\n172\n161\n254\n92\n247\n205\n24\n126\n250\n123\n232\n237\n237\n133\n239\n253\n231\n160\n187\n230\n17\n100\n98\n98\n2\n85\n3\n3\n24\n124\n252\n113\n108\n254\n229\n47\n145\n120\n232\n33\n204\n165\n211\n60\n130\n94\n238\n239\n246\n95\n245\n152\n82\n128\n233\n153\n89\n255\n209\n83\n209\n141\n186\n174\n223\n57\n18\n79\n110\n36\n208\n227\n187\n222\n60\n6\n23\n33\n4\n131\n145\n24\n66\n65\n63\n54\n125\n53\n140\n254\n115\n227\n88\n217\n86\n135\n85\n215\n111\n202\n117\n64\n171\n63\n118\n122\n18\n201\n153\n44\n14\n30\n57\n139\n207\n142\n71\n81\n237\n175\n130\n203\n117\n62\n228\n32\n51\n90\n133\n218\n166\n74\n212\n46\n67\n69\n99\n15\n60\n68\n203\n122\n134\n7\n38\n198\n103\n103\n50\n7\n31\n219\n178\n43\n183\n17\n233\n116\n26\n110\n151\n11\n131\n35\n81\n64\n215\n49\n125\n129\n199\n94\n172\n63\n118\n236\n24\n154\n154\n154\n240\n242\n203\n47\n163\n178\n178\n18\n135\n14\n29\n154\n103\n81\n94\n55\n90\n27\n124\n168\n171\n245\n226\n246\n13\n45\n23\n172\n91\n70\n25\n34\n153\n76\n194\n227\n241\n32\n18\n137\n192\n229\n114\n33\n145\n72\n24\n128\n20\n157\n173\n64\n79\n83\n53\n158\n120\n126\n47\n124\n94\n207\n37\n245\n61\n61\n61\n152\n152\n152\n64\n91\n91\n27\n230\n230\n230\n46\n169\n63\n248\n89\n39\n214\n253\n193\n28\n182\n110\n221\n10\n191\n223\n127\n73\n125\n213\n224\n65\n212\n94\n179\n206\n180\n158\n16\n130\n248\n13\n55\n160\n238\n208\n33\n124\n127\n211\n38\n4\n127\n251\n91\n36\n162\n81\n33\n169\n63\n57\n157\n49\n69\n16\n125\n46\n155\n8\n95\n17\n122\n3\n192\n75\n157\n77\n193\n55\n146\n169\n233\n234\n63\n191\n117\n229\n124\n96\n136\n191\n202\n139\n137\n196\n52\n174\n104\n169\n195\n111\n62\n57\n133\n206\n153\n227\n6\n0\n218\n213\n39\n147\n73\n100\n179\n153\n220\n231\n116\n58\n141\n185\n185\n57\n0\n192\n208\n241\n81\n184\n116\n109\n44\n53\n236\n30\n27\n253\n2\n99\n122\n198\n61\n214\n212\n89\n171\n181\n119\n53\n24\n250\n247\n120\n60\n104\n170\n61\n207\n151\n199\n147\n73\n84\n120\n189\n134\n250\n215\n95\n127\n29\n47\n190\n248\n34\n118\n238\n220\n137\n39\n159\n124\n18\n251\n247\n239\n207\n213\n15\n68\n82\n56\n126\n38\n137\n200\n248\n52\n222\n122\n39\n138\n134\n160\n145\n5\n0\n192\n200\n200\n8\n34\n145\n8\n194\n225\n48\n250\n251\n251\n17\n139\n197\n12\n253\n247\n157\n60\n135\n3\n95\n12\n225\n161\n141\n171\n177\n174\n37\n3\n119\n122\n202\n80\n175\n235\n58\n222\n254\n245\n175\n209\n223\n223\n143\n23\n94\n120\n1\n39\n79\n158\n52\n212\n239\n253\n191\n25\n188\n186\n39\n142\n159\n254\n244\n118\n124\n231\n65\n23\n154\n234\n79\n25\n17\n236\n163\n183\n113\n250\n221\n87\n241\n237\n109\n63\n193\n178\n59\n191\n131\n177\n202\n38\n163\n12\n17\n8\n224\n100\n115\n51\n174\n219\n183\n15\n190\n231\n158\n67\n186\n191\n159\n153\n5\n228\n151\n180\n5\n229\n200\n2\n193\n147\n167\n199\n55\n214\n250\n125\n119\n30\n31\n26\n219\n232\n209\n220\n51\n255\n181\n231\n139\n243\n118\n128\n101\n205\n65\n124\n208\n119\n10\n205\n117\n213\n248\n195\n181\n221\n120\n243\n192\n23\n56\n51\n54\n149\n107\n76\n171\n215\n117\n29\n183\n126\n173\n27\n111\n125\n56\n128\n111\n92\n215\n142\n153\n217\n76\n14\n33\n218\n187\n26\n144\n83\n52\n116\n160\n186\n198\n139\n216\n72\n2\n21\n149\n6\n33\n29\n253\n195\n17\n52\n7\n235\n176\n172\n49\n132\n72\n44\n6\n183\n203\n24\n180\n212\n209\n209\n129\n193\n193\n65\n236\n219\n183\n15\n247\n221\n119\n31\n94\n121\n229\n149\n92\n221\n151\n218\n170\n16\n29\n79\n195\n227\n38\n104\n15\n85\n226\n208\n137\n41\n120\n61\n110\n67\n123\n159\n207\n135\n84\n42\n133\n88\n44\n134\n182\n182\n54\n68\n11\n78\n152\n207\n231\n3\n82\n41\n236\n250\n120\n4\n129\n64\n0\n49\n163\n12\n10\n159\n207\n135\n91\n190\n254\n117\n4\n2\n1\n4\n2\n1\n243\n246\n72\n161\n183\n119\n255\n133\n250\n122\n147\n122\n96\n207\n207\n254\n5\n129\n64\n0\n30\n99\n251\n3\n190\n138\n10\n32\n153\n196\n225\n135\n31\n70\n109\n77\n13\n210\n3\n3\n181\n172\n228\n191\n144\n220\n231\n151\n171\n195\n15\n226\n170\n158\n7\n112\n110\n252\n147\n183\n123\n150\n55\n190\n147\n201\n102\n245\n174\n246\n122\n226\n214\n60\n191\n187\n119\n83\n15\n132\n34\n88\n120\n45\n117\n172\n49\n242\n118\n94\n175\n118\n115\n74\n164\n50\n250\n220\n156\n14\n16\n224\n231\n175\n13\n53\n125\n240\n89\n12\n149\n30\n151\n235\n63\n255\n233\n234\n8\n75\n123\n218\n248\n178\n121\n250\n120\n96\n232\n148\n87\n239\n138\n102\n159\n97\n143\n78\n68\n82\n4\n80\n224\n17\n68\n179\n195\n171\n2\n144\n42\n211\n180\n172\n57\n213\n41\n143\n34\n171\n76\n98\n170\n214\n247\n149\n21\n117\n186\n215\n13\n84\n92\n32\n172\n239\n28\n25\n39\n57\n127\n0\n150\n100\n196\n44\n119\n246\n118\n57\n236\n46\n22\n43\n36\n97\n245\n39\n144\n53\n229\n138\n124\n206\n79\n102\n45\n122\n221\n204\n122\n27\n202\n115\n175\n194\n178\n55\n133\n229\n145\n191\n254\n91\n156\n142\n77\n95\n122\n29\n108\n151\n177\n155\n37\n81\n33\n141\n188\n219\n1\n80\n182\n222\n169\n251\n119\n149\n167\n155\n246\n148\n189\n232\n171\n169\n140\n129\n61\n0\n128\n173\n127\n188\n25\n0\n240\n163\n239\n254\n157\n17\n1\n88\n31\n109\n92\n202\n33\n168\n142\n85\n153\n29\n30\n209\n155\n82\n6\n207\n106\n124\n251\n250\n107\n0\n0\n63\n248\n247\n127\n195\n37\n254\n0\n162\n2\n210\n98\n40\n197\n72\n204\n224\n100\n76\n128\n29\n245\n205\n149\n71\n31\n213\n31\n90\n181\n10\n0\n240\n143\n71\n143\n226\n143\n66\n171\n204\n41\n128\n25\n37\n40\n204\n192\n193\n251\n44\n12\n77\n6\n80\n93\n79\n147\n65\n172\n128\n72\n99\n127\n50\n243\n203\n135\n141\n93\n108\n163\n8\n252\n88\n238\n10\n242\n203\n19\n127\n242\n128\n241\n250\n133\n152\n20\n59\n0\n89\n45\n144\n181\n61\n239\n6\n240\n214\n243\n206\n191\n16\n249\n157\n154\n191\n213\n41\n229\n133\n191\n0\n245\n192\n142\n129\n247\n241\n236\n103\n111\n231\n190\n203\n255\n191\n70\n211\n69\n121\n108\n3\n34\n89\n189\n85\n191\n7\n192\n171\n71\n171\n72\n228\n204\n43\n4\n58\n161\n230\n137\n22\n151\n25\n166\n209\n190\n179\n227\n71\n52\n126\n101\n213\n191\n29\n133\n225\n57\n33\n188\n90\n4\n171\n250\n165\n194\n177\n149\n215\n221\n140\n71\n240\n182\n113\n219\n55\n252\n110\n253\n143\n103\n46\n69\n0\n22\n27\n0\n109\n112\n209\n103\n225\n88\n109\n16\n162\n237\n69\n173\n153\n86\n155\n194\n43\n52\n202\n166\n186\n231\n121\n165\n196\n66\n6\n177\n220\n124\n83\n75\n96\n177\n159\n52\n97\n77\n197\n106\n71\n170\n85\n153\n162\n89\n129\n91\n248\n127\n150\n77\n19\n57\n253\n60\n237\n104\n191\n187\n170\n231\n1\n61\n20\n60\n175\n10\n238\n221\n255\n55\n132\n153\n2\n44\n4\n85\n77\n70\n136\n226\n201\n0\n106\n181\n217\n52\n33\n141\n134\n48\n249\n253\n243\n238\n1\n205\n72\n103\n198\n6\n12\n44\n160\n144\n71\n46\n52\n125\n157\n102\n202\n150\n125\n152\n178\n112\n227\n74\n149\n77\n84\n20\n9\n236\n252\n4\n1\n139\n247\n2\n100\n54\n198\n137\n192\n18\n187\n190\n84\n240\n88\n150\n60\n132\n162\n60\n159\n135\n229\n201\n192\n202\n74\n213\n164\n77\n157\n106\n9\n148\n245\n201\n231\n237\n159\n247\n179\n42\n196\n114\n146\n114\n241\n32\n151\n83\n235\n173\n109\n250\n4\n93\n171\n210\n23\n100\n0\n6\n210\n103\n22\n240\n105\n246\n175\n213\n179\n102\n44\n129\n164\n44\n150\n68\n214\n122\n218\n216\n42\n244\n121\n214\n181\n137\n140\n175\n162\n127\n169\n240\n240\n66\n94\n87\n40\n241\n90\n253\n107\n214\n110\n233\n210\n104\n225\n20\n173\n112\n163\n205\n62\n219\n33\n129\n153\n205\n90\n37\n18\n20\n235\n77\n63\n30\n75\n164\n170\n249\n171\n128\n147\n108\n123\n205\n110\n227\n89\n40\n64\n161\n116\n156\n79\n134\n84\n240\n175\n98\n189\n233\n199\n163\n211\n203\n202\n23\n42\n61\n140\n100\n225\n163\n156\n2\n152\n81\n3\n25\n12\n118\n178\n158\n55\n3\n154\n200\n134\n137\n188\n141\n204\n107\n9\n149\n161\n112\n210\n20\n160\n80\n248\n144\n49\n149\n202\n92\n12\n209\n108\n252\n86\n243\n147\n237\n159\n117\n125\n34\n119\n16\n170\n235\n77\n51\n132\n216\n9\n127\n102\n70\n134\n194\n127\n89\n76\n181\n75\n165\n124\n139\n180\n22\n96\n103\n238\n92\n66\n132\n5\n164\n5\n208\n72\n160\n21\n233\n84\n105\n184\n80\n145\n18\n86\n133\n95\n190\n25\n2\n211\n12\n58\n178\n6\n33\n218\n248\n178\n243\n183\n164\n0\n75\n103\n224\n50\n167\n0\n139\n113\n81\n170\n212\n44\n218\n45\n158\n10\n29\n157\n55\n14\n64\n197\n248\n249\n223\n47\n74\n4\n112\n66\n119\n231\n233\n219\n201\n241\n85\n183\n215\n156\n208\n189\n121\n12\n33\n78\n156\n112\n153\n247\n118\n69\n222\n66\n22\n145\n85\n138\n213\n63\n23\n2\n200\n98\n30\n207\n243\n104\n229\n208\n191\n74\n193\n78\n132\n28\n171\n132\n147\n168\n21\n115\n73\n8\n188\n220\n237\n0\n75\n32\n184\n188\n11\n81\n165\n135\n170\n208\n83\n157\n52\n32\n169\n24\n95\n70\n63\n23\n37\n243\n188\n119\n17\n220\n254\n0\n75\n103\n96\n201\n14\n224\n40\n6\n171\n148\n242\n157\n184\n174\n165\n197\n34\n44\n118\n115\n54\n211\n163\n81\n229\n166\n199\n171\n206\n54\n94\n12\n22\n84\n182\n50\n64\n177\n222\n228\n99\n185\n14\n117\n226\n58\n184\n152\n8\n90\n140\n57\n168\n150\n25\n52\n209\n11\n7\n94\n33\n75\n165\n5\n141\n245\n241\n73\n171\n211\n237\n180\n16\n90\n14\n207\n212\n45\n9\n129\n75\n101\n9\n1\n150\n10\n135\n29\n160\n84\n69\n212\n85\n170\n216\n227\n171\n184\n127\n80\n121\n75\n105\n199\n106\n120\n238\n55\n136\n8\n144\n88\n120\n28\n139\n112\n102\n198\n143\n101\n157\n33\n236\n62\n179\n202\n8\n188\n242\n77\n49\n229\n11\n153\n185\n155\n125\n166\n2\n136\n21\n184\n118\n27\n200\n3\n64\n145\n83\n74\n243\n103\n44\n252\n63\n13\n137\n105\n115\n19\n93\n15\n237\n123\n17\n13\n138\n215\n122\n89\n248\n217\n197\n122\n2\n89\n253\n253\n69\n162\n140\n105\n161\n211\n102\n26\n133\n76\n214\n18\n171\n205\n162\n205\n67\n52\n228\n204\n238\n109\n69\n59\n141\n201\n10\n230\n102\n243\n20\n157\n159\n203\n12\n48\n118\n49\n246\n78\n168\n54\n11\n193\n0\n67\n75\n146\n85\n24\n55\n105\n118\n160\n156\n14\n66\n21\n25\n195\n101\n182\n17\n180\n192\n67\n167\n46\n137\n204\n78\n139\n232\n73\n227\n181\n41\n176\n158\n54\n213\n48\n176\n58\n205\n118\n135\n142\n149\n106\n177\n20\n205\n204\n191\n223\n204\n187\n214\n233\n211\n73\n227\n115\n172\n236\n71\n116\n19\n236\n250\n183\n155\n3\n45\n183\n144\n89\n230\n15\n39\n158\n158\n19\n61\n160\n100\n161\n147\n103\n39\n30\n86\n44\n167\n245\n58\n13\n127\n229\n102\n96\n217\n197\n176\n232\n179\n50\n115\n16\n25\n215\n73\n74\n199\n146\n245\n196\n201\n185\n153\n166\n139\n23\n73\n84\n68\n227\n67\n60\n155\n175\n90\n216\n180\n75\n100\n225\n228\n184\n162\n218\n137\n25\n66\n56\n53\n55\n141\n247\n118\n201\n106\n35\n237\n34\n115\n138\n193\n70\n88\n244\n96\n167\n4\n217\n114\n96\n5\n162\n81\n204\n26\n141\n7\n178\n90\n232\n88\n133\n40\n21\n55\n126\n60\n60\n156\n69\n144\n101\n69\n142\n82\n33\n143\n147\n227\n106\n42\n58\n101\n149\n208\n101\n98\n247\n100\n16\n133\n197\n20\n236\n20\n28\n84\n242\n111\n39\n16\n129\n148\n147\n20\n44\n106\n103\n103\n53\n191\n150\n202\n213\n203\n105\n135\n91\n41\n22\n32\n234\n101\n202\n155\n152\n161\n84\n8\n86\n76\n91\n6\n11\n245\n43\n182\n12\n164\n76\n13\n44\n37\n175\n91\n44\n78\n154\n229\n184\n142\n255\n7\n63\n147\n72\n222\n250\n184\n164\n38\n0\n0\n0\n0\n73\n69\n78\n68\n174\n66\n96\n130\n"
  20. file:write(font)
  21. file:close()
  22. font = {}
  23. fonti = 1
  24. file = io.open("font.txt", "r")
  25. file2 = io.open("default.png", "wb")
  26. while true do
  27. font[fonti] = file:read()
  28. if font[fonti] == nil then break end
  29. file2:write(font[fonti])
  30. fonti = fonti + 1
  31. end
  32. file:close()
  33. file2:close()
  34. print ""
  35. print "Font installed to this computer's root directory."
  36. print "Font Labeled default.png"
  37. print "Place this font inside your minecraft.jar/font folder"
  38. print "Make sure to make a backup of either your whole jar or the default.png file located within."
  39. print ""
  40. print "I AM NOT RESPONSIBLE FOR YOUR FUCK UPS"
  41. return
  42. end
  43. if event == "char" and param == "2" then break end
  44. end
  45. term.clear()
  46. term.setCursorPos(1,1)
  47. --- DO NOT CHANGE THESE UNLESS I TELL YOU TO
  48. startchunkx = -400
  49. endchunkx = 400
  50. slowcomp = false
  51. --------------------------------------------
  52. map = { {}, }
  53. lightmap = { {}, }
  54.  
  55. ScreenX, ScreenY = term.getSize()
  56. Player = {
  57. x = 1,
  58. y = 1,
  59. ox = 1,
  60. oy = 1,
  61. dir = "none",
  62. canmove = true,
  63. block = nil,
  64. }
  65. p_top = "ƒ"
  66. p_bottom = "»"
  67.  
  68. b_dirt = "Ç"
  69. b_grass = "ü"
  70. b_sapling = "3"
  71. b_air = "ì"
  72. b_tree = "é"
  73. b_leaf = "â"
  74. b_wood = "ä"
  75. b_bedrock = "à"
  76. b_water = "å"
  77. b_lava = "2"
  78. b_stone = "ç"
  79. b_iron = "ê"
  80. b_coal = "ë"
  81. b_gold = "è"
  82. b_diamond = "ï"
  83. b_redstone = "î"
  84. b_torch = "Ä"
  85. b_ladder = "Å"
  86.  
  87.  
  88. block_torch = {
  89. block = b_torch,
  90. name = "torch",
  91. isbreakable = true,
  92. gravity = false,
  93. isopac = true,
  94. isattached = true,
  95. }
  96. block_grass = {
  97. block = b_grass,
  98. name = "grass",
  99. isbreakable = true,
  100. gravity = false,
  101. isopac = false,
  102. isattached = false,
  103. }
  104. block_bedrock = {
  105. block = b_bedrock,
  106. name = "bedrock",
  107. isbreakable = false,
  108. gravity = false,
  109. isopac = false,
  110. isattached = false,
  111. }
  112. block_wood = {
  113. block = b_wood,
  114. name = "wood",
  115. isbreakable = true,
  116. gravity = true,
  117. isopac = false,
  118. isattached = false,
  119. }
  120. block_dirt = {
  121. block = b_dirt,
  122. name = "dirt",
  123. isbreakable = true,
  124. gravity = false,
  125. isopac = false,
  126. isattached = false,
  127. }
  128. block_sapling = {
  129. block = b_sapling,
  130. name = "sapling",
  131. isbreakable = true,
  132. gravity = false,
  133. isopac = true,
  134. isattached = true,
  135. }
  136. block_air = {
  137. block = b_air,
  138. name = "air",
  139. isbreakable = false,
  140. gravity = false,
  141. isopac = true,
  142. isattached = false,
  143. }
  144. block_dark = {
  145. block = " ",
  146. name = "cave",
  147. isbreakable = false,
  148. gravity = false,
  149. isopac = true,
  150. isattached = false,
  151. }
  152. block_tree = {
  153. block = b_tree,
  154. name = "tree",
  155. isbreakable = true,
  156. gravity = false,
  157. isopac = true,
  158. isattached = false,
  159. }
  160. block_leaf = {
  161. block = b_leaf,
  162. name = "leaf",
  163. isbreakable = true,
  164. gravity = false,
  165. isopac = false,
  166. isattached = false,
  167. }
  168. block_water = {
  169. block = b_water,
  170. name = "water",
  171. isbreakable = false,
  172. gravity = true,
  173. isopac = true,
  174. isattached = false,
  175. }
  176. block_stone = {
  177. block = b_stone,
  178. name = "stone",
  179. isbreakable = true,
  180. gravity = false,
  181. isopac = false,
  182. isattached = false,
  183. }
  184. block_coal = {
  185. block = b_coal,
  186. name = "coal",
  187. isbreakable = true,
  188. gravity = false,
  189. isopac = false,
  190. isattached = false,
  191. }
  192. block_diamond = {
  193. block = b_diamond,
  194. name = "diamond",
  195. isbreakable = true,
  196. gravity = false,
  197. isopac = false,
  198. isattached = false,
  199. }
  200. block_redstone = {
  201. block = b_redstone,
  202. name = "redstone",
  203. isbreakable = true,
  204. gravity = false,
  205. isopac = false,
  206. isattached = false,
  207. }
  208. block_gold = {
  209. block = b_gold,
  210. name = "gold",
  211. isbreakable = true,
  212. gravity = false,
  213. isopac = false,
  214. isattached = false,
  215. }
  216. block_iron = {
  217. block = b_iron,
  218. name = "iron",
  219. isbreakable = true,
  220. gravity = false,
  221. isopac = false,
  222. isattached = false,
  223. }
  224. block_ladder = {
  225. block = b_ladder,
  226. name = "ladder",
  227. isbreakable = true,
  228. gravity = false,
  229. isopac = true,
  230. isattached = true,
  231. }
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240. local function dirtfill(sx, ex, y, block_type)
  241. if block_type == nil then block_type = block_dirt end
  242. local i = 0
  243. while true do
  244. map[sx + i] = map[sx + i] or {}
  245. map[sx + i][y] = block_type
  246. if block_type == block_dark and math.random(1,20) == 1 then map[sx + i][y] = block_dirt end
  247. i = i + 1
  248. if sx + i > ex then break end
  249. end
  250.  
  251. end
  252.  
  253. local function genhill(sx, ex, h, block_type)
  254. local y = 1
  255. if block_type == nil then block_type = block_dirt end
  256. if block_type == block_water then
  257.     for y = -2, h do
  258.     map[sx + y] = map[sx + y] or {}
  259.     map[ex - y] = map[ex - y] or {} -- create slopes and fill accordingly
  260.     if map[sx + y][y + 1] == nil then map[sx + y][y + 1] = block_dirt end
  261.     if map[ex - y][y + 1] == nil then map[ex - y][y + 1] = block_dirt end
  262.     dirtfill(sx + y, ex - y, y + 1, block_type)
  263.     end
  264. elseif block_type == block_dark then
  265.     local ny = math.random(30,180)
  266.     for y = 0, h do
  267.     map[sx + y] = map[sx + y] or {}
  268.     map[ex - y] = map[ex - y] or {} -- create slopes and fill accordingly
  269.     if map[sx + y][y + 1 + ny] == nil then map[sx + y][y + 1 + ny] = block_dirt end
  270.     if map[ex - y][y + 1 + ny] == nil then map[ex - y][y + 1 + ny] = block_dirt end
  271.     dirtfill(sx + y, ex - y, y + 1 + ny, block_type)
  272.     for nyy = 0, math.random(5,20) do
  273.         local rnd1 = math.random(-5,5)
  274.         local rnd2 = math.random(-5,5)
  275.         map[sx + y + rnd1] = map[sx + y + rnd1] or {}
  276.         map[ex - y + rnd2] = map[ex - y + rnd2] or {}
  277.         map[sx + y + rnd1][y + 1 + ny] = block_dark
  278.         map[ex - y + rnd2][y + 1 + ny] = block_dirt
  279.         end
  280.     end
  281. else
  282.     for y = 0, h do
  283.     map[sx + y] = map[sx + y] or {}
  284.     map[ex - y] = map[ex - y] or {} -- create slopes and fill accordingly
  285.     if map[sx + y][(y + 1)*-1] == nil then map[sx + y][(y + 1)*-1] = block_dirt end
  286.     if map[ex - y][(y + 1)*-1] == nil then map[ex - y][(y + 1)*-1] = block_dirt end
  287.     dirtfill(sx + y, ex - y, (y + 1)*-1, block_type)
  288.     end
  289. end
  290.  
  291. end
  292.  
  293.  
  294. --[[
  295.   x          x  
  296.  x            x
  297. x              x
  298. ]]
  299. -- Generate Starting Area
  300.  
  301.  
  302. -- Generate Level Field
  303. function genlevel(start, stop)
  304. for x = start, stop do
  305. map[x] = {}
  306. lightmap[x] = {}
  307. map[x][0] = {}
  308. map[x][0] = block_dirt
  309. end
  310. end
  311.  
  312. function makehill(start, stop, block_type)
  313. -- Generat Random Hills / Mountains
  314. if block_type == nil then block_type = block_dirt end
  315. if block_type == block_water then
  316. for x = start, stop do
  317.     if math.random(1, 75) == 1 then
  318.     -- Get Height
  319.     repeat
  320.     genh = math.ceil(math.random(1,50) / math.random(1,3)) -- 10
  321.     genc = math.random(1,20)
  322.     until genh < 6 or genc == 1
  323.     if math.random(1,20) == 1 then genh = genh * 2 end
  324.     -- Get Length
  325.     genl = (genh * 2) + (math.ceil(math.random(1,100) / math.random(1,4))) -- 40
  326.     sx = x - math.ceil(genl / 2)
  327.     ex = x + math.ceil(genl / 2)
  328.     genhill(sx,ex,genh, block_type)
  329.     end
  330. end
  331. elseif block_type == block_dark then
  332. for x = start, stop do
  333.     if math.random(1, 5) == 1 then
  334.     -- Get Height
  335.     repeat
  336.     genh = math.ceil(math.random(1,30) / math.random(1,3)) -- 10
  337.     genc = math.random(1,20)
  338.     until genh < 6 or genc == 1
  339.     if math.random(1,20) == 1 then genh = genh * 2 end
  340.     -- Get Length
  341.     genl = (genh * 2) + (math.ceil(math.random(1,100) / math.random(1,4))) -- 40
  342.     sx = x - math.ceil(genl / 2)
  343.     ex = x + math.ceil(genl / 2)
  344.     genhill(sx,ex,genh, block_type)
  345.     end
  346. end
  347. else
  348. for x = start, stop do
  349.     if math.random(1, 30) == 1 then
  350.     -- Get Height
  351.     repeat
  352.     genh = math.ceil(math.random(1,30) / math.random(1,3)) -- 10
  353.     genc = math.random(1,20)
  354.     until genh < 6 or genc == 1
  355.     if math.random(1,20) == 1 then genh = genh * 2 end
  356.     -- Get Length
  357.     genl = (genh * 2) + (math.ceil(math.random(1,100) / math.random(1,4))) -- 40
  358.     sx = x - math.ceil(genl / 2)
  359.     ex = x + math.ceil(genl / 2)
  360.     genhill(sx,ex,genh, block_type)
  361.     end
  362. end
  363. end
  364. end
  365.  
  366. local function gentrees(start, stop)
  367. for x = start, stop do
  368. map[x] = map[x] or {}
  369.     if math.random(1,10) == 1 and map[x][0] ~= block_water then
  370.         -- find the top block
  371.         local y = 0
  372.             repeat
  373.             y = y - 1
  374.             until map[x][y] == nil or map[x][y] == block_air
  375.         -- designate a tree height
  376.         local count = 0   --- make sure theres room for the lovely tree
  377.         local i = 0
  378.             for i = 0, 4 do
  379.             map[x - i] = map[x - i] or {}
  380.             map[x + i] = map[x + i] or {}
  381.             if map[x - i][y] ~= nil and map[x - i][y] ~= block_air then count = count + 1 end
  382.             if map[x + i][y] ~= nil and map[x + i][y] ~= block_air then count = count + 1 end
  383.             end
  384.         if count == 0 then
  385.                 treeh = math.random(3,5)
  386.                 while true do                              
  387.                 map[x][y] = block_tree
  388.                 y = y - 1
  389.                 treeh = treeh - 1
  390.                 if treeh == 0 then break end
  391.                 end
  392.                 -- gen leaves
  393.                 map[x - 1] = map[x - 1] or {}
  394.                 map[x + 1] = map[x + 1] or {}
  395.                 map[x][y] = block_leaf
  396.                 map[x - 1][y + 1] = block_leaf
  397.                 map[x + 1][y + 1] = block_leaf
  398.                
  399.         end
  400.     end
  401. end
  402. end
  403.  
  404. local function findhighest(fh)
  405. local y = 0
  406. while true do
  407. if map[fh][y] ~= block_water then
  408. if map[fh][y] == nil then break end
  409. if map[fh][y].isopac == true then break end
  410. if map[fh][y] == block_air then break end
  411. end
  412. y = y - 1
  413. end
  414. return y
  415. end
  416.  
  417.  
  418. local function checkmove()
  419. Player.canmove = false
  420. if noclip == false then
  421.     if map[Player.x][Player.y] ~= nil then
  422.         if map[Player.x][Player.y].isopac == false then
  423.          -- let you move up 1 block inclines
  424.             if Player.dir ~= "up" then
  425.             if map[Player.x][Player.y - 1] == nil or map[Player.x][Player.y - 1].isopac == true then
  426.             if map[Player.x][Player.y - 2] == nil or map[Player.x][Player.y - 2].isopac == true then
  427.             Player.y = Player.y - 1
  428.             return
  429.             end
  430.             end
  431.             end
  432.         ----------
  433.         if Player.dir == "left" then Player.x = Player.x + 1 end
  434.         if Player.dir == "right" then Player.x = Player.x - 1 end
  435.         if Player.dir == "up" then Player.y = Player.y + 1 end
  436.         if Player.dir == "down" then Player.y = Player.y - 1 end       
  437.         end
  438.     end
  439.     if map[Player.x][Player.y - 1] ~= nil then
  440.         if map[Player.x][Player.y - 1].isopac == false then
  441.         if Player.dir == "left" then Player.x = Player.x + 1 end
  442.         if Player.dir == "right" then Player.x = Player.x - 1 end
  443.         if Player.dir == "up" then Player.y = Player.y + 1 end
  444.         if Player.dir == "down" then Player.y = Player.y - 1 end
  445.         end
  446.     end
  447. end
  448. end
  449.  
  450. local function gengrass(start, stop)
  451.     for x = start, stop do
  452.         local _ = findhighest(x)
  453.         if map[x][_ + 1] == block_dirt then            
  454.         map[x][_] = block_grass
  455.         end
  456.     end
  457. end
  458.  
  459. local function genunderground(start, stop)
  460. for x = start, stop do
  461.     for y = 1, 201 do
  462.     map[x] = map[x] or {}
  463.     map[x][y] = block_dirt
  464.     if y >= 198 then
  465.     if math.random(1,7) == 1 then map[x][y] = block_bedrock end
  466.     end
  467.     if y == 201 then map[x][y] = block_bedrock end
  468.     end
  469. end
  470. end
  471.  
  472. local function genbedrock(start, stop)
  473. for x = start, stop do
  474.     for y = 1, 201 do
  475.     map[x] = map[x] or {}
  476.     if y >= 198 then
  477.     if math.random(1,7) == 1 then map[x][y] = block_bedrock end
  478.     end
  479.     if y == 201 then map[x][y] = block_bedrock end
  480.     end
  481. end
  482. end
  483.  
  484. local function genundergroundwater(start, stop)
  485. local y = 1
  486. for x = start, stop do
  487.     for y = 50, 175 do
  488.     map[x] = map[x] or {}
  489.     if math.random(1,70) == 1 and map[x][y - 1].isopac == false and map[x][y + 1].isopac == true then map[x][y] = block_water map[x - 1][y] = block_water end
  490.     end
  491. end
  492. end
  493.  
  494. local function genorepatch(x, y, size, block_type)
  495. local x,y,i,rnd1,rnd2,size = x,y,0,0,0,size
  496.     if map[x][y] == block_grass or map[x][y] == block_dirt then
  497.     map[x][y] = block_type
  498.         for i = 0, size do
  499.         rnd1 = rnd1 + math.random(-1,1)
  500.         rnd2 = rnd2 + math.random(-1,1)
  501.         if map[x + rnd1][y + rnd2] == block_dirt or map[x + rnd1][y + rnd2] == block_grass then map[x + rnd1][y + rnd2] = block_type end
  502.         end
  503.     end
  504. end
  505.  
  506. --[[
  507. b_stone = "3"
  508. b_iron = "4"
  509. b_coal = "5"
  510. b_gold = "6"
  511. b_diamond = "7"
  512. b_redstone = "8"
  513. ]]
  514.  
  515. local function genores(start, stop)
  516. for y = -50, 200 do
  517.     for x = start, stop do
  518.     if y < 0 and math.random(1,100) == 1 then genorepatch(x,y,math.random(15,20),block_stone) end
  519.     if y < 0 and math.random(1,200) == 2 then genorepatch(x,y,math.random(3,7),block_coal) end
  520.     if y > 100 and math.random(1,2000) == 3 then genorepatch(x,y,math.random(1,3),block_diamond) end
  521.     if y > 175 and math.random(1,1500) == 4 then genorepatch(x,y,math.random(1,3),block_diamond) end
  522.     if y > 50 and math.random(1,1500) == 5 then genorepatch(x,y,math.random(2,5),block_gold) end
  523.     if y > 75 and math.random(1,1200) == 55 then genorepatch(x,y,math.random(2,5),block_gold) end
  524.     if y > 125 and math.random(1,1000) == 123 then genorepatch(x,y,math.random(2,5),block_gold) end
  525.     if y > 0 and math.random(1,1000) == 7 then genorepatch(x,y,math.random(3,6),block_iron) end
  526.     if y > 10 and math.random(1,600) == 8 then genorepatch(x,y,math.random(3,6),block_iron) end
  527.     if y > 10 and math.random(1,400) == 9 then genorepatch(x,y,math.random(3,7),block_coal) end
  528.     if y > 20 and math.random(1,500) == 10 then genorepatch(x,y,math.random(1,7),block_redstone) end
  529.     if y > 0 and math.random(1,75) == 11 then genorepatch(x,y,math.random(1,15),block_stone) end
  530.     end
  531. if slowcomp == true then sleep(.000001) end
  532.     end
  533.  
  534. end
  535.  
  536. local function createnewchunk(startchunkx, endchunkx)
  537. print "genlevel"
  538. genlevel(startchunkx, endchunkx)
  539. sleep(.0001)
  540. print "make hills"
  541. makehill(startchunkx, endchunkx, block_dirt)
  542. sleep(.0001)
  543. print "generating grass"
  544. gengrass(startchunkx, endchunkx)
  545. sleep(.0001)
  546. print "generating underground"
  547. genunderground(startchunkx, endchunkx)
  548. sleep(.0001)
  549. print "generating water"
  550. makehill(startchunkx, endchunkx, block_water)
  551. sleep(.0001)
  552. print "generating trees"
  553. gentrees(startchunkx, endchunkx)
  554. sleep(.0001)
  555. print "generating caves"
  556. makehill(startchunkx, endchunkx, block_dark)
  557. sleep(.0001)
  558. print "lining with bedrock"
  559. genbedrock(startchunkx,endchunkx)
  560. sleep(.0001)
  561. print "genunderwater"
  562. genundergroundwater(startchunkx,endchunkx)
  563. sleep(.0001)
  564. print "genores"
  565. genores(startchunkx,endchunkx)
  566. sleep(.0001)
  567.  
  568.  
  569. print "final touchups"
  570. addlighting(startchunkx,endchunkx)
  571. sleep(.0001)
  572. end
  573.  
  574. function addlighting(start, stop)
  575. print "start lightning"
  576. for y = -200, 0 do
  577.     for x = start, stop do
  578.     map[x] = map[x] or {}
  579.     lightmap[x] = lightmap[x] or {}
  580.     if map[x][y] == nil then map[x][y] = block_air end
  581.     if map[x][y] == block_air then lightmap[x][y] = 15 end
  582.     end
  583. if slowcomp == true then sleep(.000001) end
  584.     end
  585. print "end lighting"
  586. end
  587.  
  588. local function updatelight(x,y)
  589. local x,y = x,y
  590. local i,ii = 0,0
  591. local update = false
  592. local oldlightmap = -100
  593. for ii = -1, 1 do
  594.     for i = -1, 1 do    
  595.         map[x + i] = map[x + i] or {}
  596.         lightmap[x + i] = lightmap[x + i] or {}
  597.         lightmap[x + i][y + ii] = lightmap[x + i][y + ii] or 0
  598.         if map[x + i][y + ii] == nil and y > 0 then map[x + i][y + ii] = block_dark end
  599.         if map[x + i][y + ii] == nil and y <= 0 then map[x + i][y + ii] = block_air lightmap[x + i][y + ii] = 15 end
  600.         oldlightmap = lightmap[x + i][y + ii]
  601.             --if x + i ~= x and y + ii ~= y then
  602.                 if lightmap[x][y] > lightmap[x + i][y + ii] then
  603.                     if map[x + i][y + ii].isopac == true then
  604.                     lightmap[x + i][y + ii] = lightmap[x][y] - 1
  605.                     else
  606.                     lightmap[x + i][y + ii] = 1
  607.                     end
  608.                 end
  609.             --end
  610.         if oldlightmap ~= lightmap[x + i][y + ii] then update = true end
  611.     end
  612. end
  613. return update
  614. end
  615.  
  616.  
  617. function simulate(force)
  618. local update = false
  619. local update1 = false
  620. if force == true then update = true end
  621.  
  622. for y = Player.y - math.ceil(ScreenY / 2) - 15, Player.y + math.ceil(ScreenY / 2) + 15 do
  623. for x = Player.x - math.ceil(ScreenX / 2) - 15, Player.x + math.ceil(ScreenX / 2) - 3 + 15 do
  624.         if map[x][y] == nil and y > 0 then map[x][y] = block_dark end
  625.         if map[x][y] == nil and y <= 0 then map[x][y] = block_air end
  626.         lightmap[x] = lightmap[x] or {}
  627.         lightmap[x][y] = lightmap[x][y] or 0
  628.         if lightmap[x][y] < 0 then lightmap[x][y] = 0 end
  629.         if map[x][y] == block_torch then lightmap[x][y] = 15 end
  630.        
  631.         if map[x][y].isattached == true then
  632.             if map[x][y] == block_torch or map[x][y] == block_ladder then
  633.             if (map[x - 1][y].isopac == true and map[x + 1][y].isopac == true and map[x][y + 1].isopac == true and map[x][y - 1].isopac == true) or (map[x + 1][y] == block_water or map[x - 1][y] == block_water or map[x][y + 1] == block_water or map[x][y - 1] == block_water) then
  634.             destroyblock(x,y,true)     
  635.             end
  636.             end
  637.         end
  638.        
  639.         if lightmap[x][y] > 1 then if updatelight(x,y) == true then update = true end end
  640.        
  641.        
  642.         if map[x][y].gravity == true then
  643.             if map[x][y + 1] ~= nil and map[x][y + 1] == block_air or map[x][y + 1] == block_dark or map[x][y + 1] == block_water then
  644.             map[x][y + 1] = map[x][y]
  645.             if y > 0 and map[x][y] ~= block_water then map[x][y] = block_dark update = true end
  646.             if y <= 0 and map[x][y] ~= block_water then map[x][y] = block_air update = true end
  647.             end
  648.         end
  649.        
  650.         if math.random(1,15) == 1 then
  651.         if map[x][y] == block_water and map[x][y - 1] == block_water then
  652.         if map[x][y + 1].isopac == false and map[x - 1][y].isopac == true and map[x - 1][y] ~= block_water then map[x - 1][y] = block_water update1 = true end
  653.         if map[x][y + 1].isopac == false and map[x + 1][y].isopac == true and map[x + 1][y] ~= block_water then map[x + 1][y] = block_water update1 = true end
  654.         if map[x][y + 1].isopac == false and map[x][y + 1].isopac == true and map[x][y + 1] ~= block_water then map[x][y + 1] = block_water update1 = true end
  655.         if update1 == true and math.random(1,10) == 1 then map[x][y] = block_dark end
  656.         if update1 == true then update = true end
  657.         end
  658.         end
  659.        
  660.        
  661.        
  662. end
  663. end
  664.  
  665.  
  666. if Player.canmove == false then update = true end
  667. Player.canmove = true
  668. if update == true then printplay() end
  669. simtimer = os.startTimer(.075)
  670. end
  671.  
  672. function updategrav()
  673. local update = false
  674. if map[Player.x][Player.y + 1] == nil or map[Player.x][Player.y + 1].isopac == true then
  675.     if map[Player.x][Player.y + 1] ~= block_ladder then
  676.     Player.y = Player.y + 1
  677.     update = true
  678.     end
  679. end
  680. if update == true then printplay() end
  681. gravtimer = os.startTimer(.15)
  682. end
  683.  
  684. local function updateleaf()
  685. local update = false
  686. for y = Player.y - math.ceil(ScreenY / 2), Player.y + math.ceil(ScreenY / 2) do
  687. for x = Player.x - math.ceil(ScreenX / 2), Player.x + math.ceil(ScreenX / 2) - 3 do
  688.             if map[x][y] ~= nil then
  689.             if map[x][y] == block_leaf and map[x - 1][y] ~= block_tree and map[x + 1][y] ~= block_tree and map[x][y + 1] ~= block_tree and math.random(1,5) == 1 then map[x][y] = block_air update = true end
  690.             end
  691. end
  692. end
  693. if update == true then printplay() end
  694. leaftimer = os.startTimer(5)
  695. end
  696.  
  697. createnewchunk(startchunkx, endchunkx)
  698. map[Player.x][0] = block_wood
  699. Player.y = findhighest(Player.x) --Place Player In A Good Spot
  700. simloop = 0
  701. -- cheats
  702. noclip = false
  703. flying = false
  704. creative = false
  705. lighting = false
  706. blockdestroy = true
  707.  
  708. local function maximum (a)
  709.       local mi = 1          -- maximum index
  710.       local m = a[mi]       -- maximum value
  711.       for i,val in ipairs(a) do
  712.         if val > m then
  713.           mi = i
  714.           m = val
  715.         end
  716.       end
  717.       return m, mi
  718. end
  719.  
  720. function destroyblock(x,y,sim)
  721. local x,y = x,y
  722. if map[x][y] ~= nil and map[x][y].isbreakable == true then
  723. if map[x][y] == block_torch then
  724.     lightmap[x][y] = 0
  725.     for tx = -15, 15 do
  726.     for ty = -15, 15 do
  727.     if lightmap[x + tx][y + ty] ~= 15 then lightmap[x + tx][y + ty] = 0 end
  728.     end
  729.     end
  730. if sim ~= true then simulate(true) end
  731. else
  732. -- calc lighting
  733. local l = {}
  734. l[1] = lightmap[x][y - 1]
  735. l[2] = lightmap[x - 1][y]
  736. l[3] = lightmap[x + 1][y]
  737. l[4] = lightmap[x][y + 1]
  738. lightmap[x][y] = maximum(l) - 1
  739. ----
  740. end
  741. if y > 0 then map[x][y] = block_dark end
  742. if y <= 0 then map[x][y] = block_air end
  743. if sim ~= true then simulate(true) end
  744. end
  745.  
  746.  
  747. end
  748.  
  749. local function placeblock(x,y, block_type)
  750. local x,y = x,y
  751. if block_type ~= nil then
  752.     if (map[x][y] == nil or map[x][y].isopac == true) and map[x][y] ~= block_tree then
  753.     map[x][y] = block_type
  754.     -- calc lighting
  755.     lightmap[x][y] = 1
  756.     if block_type == block_torch then
  757.     lightmap[x][y] = 15
  758.     end
  759.     --------
  760.     simulate(true)
  761.     end
  762. end
  763. end
  764.  
  765.  
  766. -- Print Playing Field
  767. function printplay()
  768. --term.clear()
  769. yy = 1
  770.  
  771. for y = Player.y - math.ceil(ScreenY / 2), Player.y + math.ceil(ScreenY / 2) do
  772. term.setCursorPos(1,yy)
  773.     for x = Player.x - math.ceil(ScreenX / 2), Player.x + math.ceil(ScreenX / 2) - 3 do
  774.    
  775.     map[x] = map[x] or {}
  776.     if x < startchunkx then
  777.     -- load a chunk to the left
  778.     startchunkx = startchunkx - 200
  779.     createnewchunk(startchunkx, startchunkx + 199)
  780.     end
  781.     if x > endchunkx then
  782.     -- load a chunk to the right
  783.     endchunkx = endchunkx + 200
  784.     createnewchunk(endchunkx - 199, endchunkx)
  785.     end
  786.        
  787.             if map[x][y] ~= nil and (lightmap[x][y] ~= nil and lightmap[x][y] >= 1 or lighting == true) then           
  788.                 write(map[x][y].block)
  789.             else
  790.                 write(" ")         
  791.             end
  792.        
  793.     end
  794. yy = yy + 1
  795. end
  796.  
  797.  
  798. term.setCursorPos(math.ceil(ScreenX / 2) + 1, math.ceil(ScreenY / 2) + 1)
  799. write (p_bottom)
  800. term.setCursorPos(math.ceil(ScreenX / 2) + 1, math.ceil(ScreenY / 2))
  801. write (p_top)
  802.  
  803.  
  804. --debug
  805. term.setCursorPos(1,1)
  806. if blockdestroy == true then
  807. print "---DESTROY---"
  808. else
  809. print "----PLACE----"
  810. end
  811. print "             "
  812. print "-------------"
  813. term.setCursorPos(1,2)
  814. lightmap[Player.x][Player.y] = lightmap[Player.x][Player.y] or 0
  815. --print ("X-"..Player.x.." Y-"..Player.y.." L-"..lightmap[Player.x][Player.y].." Destroy-"..tostring(blockdestroy).." Light-"..tostring(lighting).." Clip-"..tostring(noclip).." Block-"..map[Player.x][Player.y].name)
  816. inventory = block_dirt.block .. block_torch.block .. block_ladder.block
  817. if Player.block ~= nil then
  818. inventory = string.gsub(inventory, Player.block.block, "[".. Player.block.block .."]")
  819. end
  820. print (inventory)
  821.  
  822.  
  823. end
  824.  
  825. simtimer = os.startTimer(.05)
  826. gravtimer = os.startTimer(.15)
  827. leaftimer = os.startTimer(5)
  828. printplay()
  829. simulate(true)
  830. simulate(true)
  831. while true do
  832. event, param1 = os.pullEvent()
  833. if event == "timer" and param1 == simtimer then simulate() end
  834. if event == "timer" and param1 == gravtimer then updategrav() end
  835. if event == "timer" and param1 == leaftimer then updateleaf() end
  836. if event == "key" and param1 == 203 and Player.canmove == true then Player.x = Player.x - 1 Player.dir = "left" checkmove() end
  837. if event == "key" and param1 == 205 and Player.canmove == true then Player.x = Player.x + 1 Player.dir = "right" checkmove() end
  838. if event == "key" and param1 == 200 and Player.canmove == true and map[Player.x][Player.y + 1] ~= nil and (map[Player.x][Player.y + 1].isopac == false or map[Player.x][Player.y + 1] == block_water or map[Player.x][Player.y + 1] == block_ladder) then Player.y = Player.y - 2 Player.dir = "up" checkmove() gravtimer = os.startTimer(.25) end
  839. if event == "key" and param1 == 208 and Player.canmove == true then Player.y = Player.y + 1 Player.dir = "down" checkmove() end
  840. if event == "key" and param1 == 1 then break end
  841. if event == "char" and param1 == "1" then Player.block = block_dirt printplay() end
  842. if event == "char" and param1 == "2" then Player.block = block_torch printplay() end
  843. if event == "char" and param1 == "3" then Player.block = block_ladder printplay() end
  844. if event == "char" and param1 == "w" then
  845. if blockdestroy == true then destroyblock(Player.x, Player.y - 2) else placeblock(Player.x, Player.y - 2, Player.block) end
  846. end
  847. if event == "char" and param1 == "x" then
  848. if blockdestroy == true then destroyblock(Player.x, Player.y + 1) else placeblock(Player.x, Player.y + 1, Player.block) end
  849. end
  850. if event == "char" and param1 == "c" then
  851. if blockdestroy == true then destroyblock(Player.x + 1, Player.y + 1) else placeblock(Player.x + 1, Player.y + 1, Player.block) end
  852. end
  853. if event == "char" and param1 == "z" then
  854. if blockdestroy == true then destroyblock(Player.x - 1, Player.y + 1) else placeblock(Player.x - 1, Player.y + 1, Player.block) end
  855. end
  856. if event == "char" and param1 == "a" then
  857. if blockdestroy == true then destroyblock(Player.x - 1, Player.y) else placeblock(Player.x - 1, Player.y, Player.block) end
  858. end
  859. if event == "char" and param1 == "d" then
  860. if blockdestroy == true then destroyblock(Player.x + 1, Player.y) else placeblock(Player.x + 1, Player.y, Player.block) end
  861. end
  862. if event == "char" and param1 == "q" then
  863. if blockdestroy == true then destroyblock(Player.x - 1, Player.y - 1) else placeblock(Player.x - 1, Player.y - 1, Player.block) end
  864. end
  865. if event == "char" and param1 == "e" then
  866. if blockdestroy == true then destroyblock(Player.x + 1, Player.y - 1) else placeblock(Player.x + 1, Player.y - 1, Player.block) end
  867. end
  868.  
  869.  
  870.  
  871.  
  872. if event == "char" and param1 == "s" then
  873. if blockdestroy == true then blockdestroy = false else blockdestroy = true end
  874. printplay()
  875. end
  876. if event == "char" and param1 == "l" then
  877. if lighting == true then lighting = false else lighting = true end
  878. printplay()
  879. end
  880. if event == "char" and param1 == "n" then
  881. if noclip == true then noclip = false else noclip = true end
  882. printplay()
  883. end
  884.  
  885. end
  886.  
  887. term.clear()
  888. term.setCursorPos(1,1)
  889. print "Thanks for Playing MiM by Casper7526"
Add Comment
Please, Sign In to add comment