Advertisement
thepowderguy

thepowderguy's script

Mar 1st, 2013
412
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 15.22 KB | None | 0 0
  1. --thepowderguy
  2.  
  3. --need bran
  4.  
  5. tpt.el.bran.enabled=1
  6.  
  7. tpt.el.dyst.menu=1
  8. tpt.el.eqve.menu=1
  9. tpt.el.shd4.menu=1
  10. tpt.el.shd3.menu=1
  11. tpt.el.shd2.menu=1
  12. tpt.el.lolz.menu=1
  13. tpt.el.love.menu=1
  14. tpt.el.embr.menu=1
  15. tpt.el.spwn.menu=1
  16. tpt.el.spwn2.menu=1
  17. tpt.el.fog.menu=1
  18. tpt.el.rime.menu=1
  19. tpt.el.frzw.menu=1
  20. tpt.el.bizs.menu=1
  21. tpt.el.bizg.menu=1
  22. tpt.el.bray.menu=1
  23. tpt.el.psts.menu=1
  24. tpt.el.mort.menu=1
  25. tpt.el.bran.menu=1
  26.  
  27. tpt.el.dyst.menusection=8
  28. tpt.el.eqve.menusection=8
  29. tpt.el.shd4.menusection=9
  30. tpt.el.shd3.menusection=9
  31. tpt.el.shd2.menusection=9
  32. tpt.el.lolz.menusection=11
  33. tpt.el.love.menusection=11
  34. tpt.el.embr.menusection=5
  35. tpt.el.spwn.menusection=11
  36. tpt.el.spwn2.menusection=11
  37. tpt.el.fog.menusection=6
  38. tpt.el.rime.menusection=9
  39. tpt.el.frzw.menusection=7
  40. tpt.el.bizs.menusection=9
  41. tpt.el.bizg.menusection=6
  42. tpt.el.bray.menusection=11
  43. tpt.el.psts.menusection=9
  44. tpt.el.mort.menusection=8
  45. tpt.el.bran.menusection=11
  46.  
  47. tpt.el.spwn2.name="spw2"
  48. tpt.el.bran.name="____"
  49. tpt.el.bran.description="Empty element. Does nothing. Can be modded into another element."
  50. tpt.el.bran.color=0x000000
  51. tpt.el.bran.heat=0
  52. tpt.el.bran.hconduct=0
  53.  
  54. local Element1 = elements.allocate("MOD", "BNCB")
  55. elements.element(elements.MOD_PT_BNCB, elements.element(tpt.element("PHOT")))
  56. elements.property(elements.MOD_PT_BNCB, "Name", "BNCB")
  57. elements.property(elements.MOD_PT_BNCB, "Color", 0xFF4444)
  58. elements.property(elements.MOD_PT_BNCB, "MenuVisible", 1)
  59. elements.property(elements.MOD_PT_BNCB, "MenuSection", 8)
  60. elements.property(elements.MOD_PT_BNCB, "Advection", 0.5)
  61. elements.property(elements.MOD_PT_BNCB, "AirDrag", 0.01)
  62. elements.property(elements.MOD_PT_BNCB, "AirLoss", 0.75)
  63. elements.property(elements.MOD_PT_BNCB, "Loss", 0.98)
  64. elements.property(elements.MOD_PT_BNCB, "Collision", -1)
  65. elements.property(elements.MOD_PT_BNCB, "Gravity", 1)
  66. elements.property(elements.MOD_PT_BNCB, "Falldown", 1)
  67. elements.property(elements.MOD_PT_BNCB, "Flammable", 4)
  68. elements.property(elements.MOD_PT_BNCB, "Hardness", 25)
  69. elements.property(elements.MOD_PT_BNCB, "Weight", 2)
  70. elements.property(elements.MOD_PT_BNCB, "Temperature", 295.15)
  71. elements.property(elements.MOD_PT_BNCB, "HeatConduct", 2)
  72. elements.property(elements.MOD_PT_BNCB, "Description", "Bouncy balls!")
  73. elements.property(elements.MOD_PT_BNCB, "HighTemperature", 573.15)
  74. elements.property(elements.MOD_PT_BNCB, "HighTemperatureTransition", tpt.element("FIRE"))
  75.  
  76.  
  77.  
  78. local Element1 = elements.allocate("MOD", "SDUM")
  79. elements.element(elements.MOD_PT_SDUM, elements.element(tpt.element("EQVE")))
  80. elements.property(elements.MOD_PT_SDUM, "Name", "SDUM")
  81. elements.property(elements.MOD_PT_SDUM, "Color", 0xFFDD44)
  82. elements.property(elements.MOD_PT_SDUM, "Gravity", 0)
  83. elements.property(elements.MOD_PT_SDUM, "Falldown", 0)
  84. elements.property(elements.MOD_PT_SDUM, "Weight", 100)
  85. elements.property(elements.MOD_PT_SDUM, "MenuVisible", 1)
  86. elements.property(elements.MOD_PT_SDUM, "MenuSection", 5)
  87. elements.property(elements.MOD_PT_SDUM, "Advection", 0.05)
  88. elements.property(elements.MOD_PT_SDUM, "AirDrag", 0.01)
  89. elements.property(elements.MOD_PT_SDUM, "Loss", 0.2)
  90. elements.property(elements.MOD_PT_SDUM, "Collision", -0.2)
  91. elements.property(elements.MOD_PT_SDUM, "Flammable", 100)
  92. elements.property(elements.MOD_PT_SDUM, "Hardness", 5)
  93. elements.property(elements.MOD_PT_SDUM, "Temperature", 295.15)
  94. elements.property(elements.MOD_PT_SDUM, "HeatConduct", 200)
  95. elements.property(elements.MOD_PT_SDUM, "Description", "Sodium. Burns.")
  96.  
  97. local function sodium(i, x, y, s, n)
  98.     local rx, ry
  99.     for rx = -1, 1 do
  100.         for ry = -1, 1 do
  101.             element = tpt.get_property("type", x + rx, y + ry)
  102.             if element == tpt.el.watr.id or element == tpt.el.dstw.id or element == tpt.el.sltw.id or element == tpt.el.bubw.id then
  103.                 tpt.parts[i].type = tpt.el.plsm.id
  104.                 tpt.set_property('life', math.random(100, 150), i)
  105.             end
  106.             if element == tpt.el.oxyg.id or element == tpt.el.loxy.id then
  107.                 tpt.parts[i].type = tpt.el.brmt.id
  108.             end
  109.             if element == tpt.el.caus.id then
  110.                 tpt.parts[i].type = tpt.el.salt.id
  111.             end
  112.         end
  113.     end
  114. end
  115.  
  116.  
  117.  
  118. local Element1 = elements.allocate("MOD", "RNDM")
  119. elements.element(elements.MOD_PT_RNDM, elements.element(tpt.element("____")))
  120. elements.property(elements.MOD_PT_RNDM, "Name", "RNDM")
  121. elements.property(elements.MOD_PT_RNDM, "Color", 0xFFFFFF)
  122. elements.property(elements.MOD_PT_RNDM, "MenuVisible", 1)
  123. elements.property(elements.MOD_PT_RNDM, "MenuSection", 5)
  124. elements.property(elements.MOD_PT_RNDM, "Temperature", 295.15)
  125. elements.property(elements.MOD_PT_RNDM, "HeatConduct", 200)
  126. elements.property(elements.MOD_PT_RNDM, "Description", "Creates random elements.")
  127.  
  128. local function randomelements(i, x, y, s, n)
  129.     tpt.create(x + math.random(-4, 4),y + math.random(-4, 4), math.random(1, 169))
  130.     tpt.create(x + math.random(-4, 4),y + math.random(-4, 4), math.random(1, 169))
  131.     tpt.create(x + math.random(-4, 4),y + math.random(-4, 4), "rndm")
  132. end
  133.  
  134.  
  135.  
  136. local Element1 = elements.allocate("MOD", "PCNV")
  137. elements.element(elements.MOD_PT_PCNV, elements.element(tpt.element("____")))
  138. elements.property(elements.MOD_PT_PCNV, "Name", "PCNV")
  139. elements.property(elements.MOD_PT_PCNV, "Color", 0x0000D0)
  140. elements.property(elements.MOD_PT_PCNV, "MenuVisible", 1)
  141. elements.property(elements.MOD_PT_PCNV, "MenuSection", 11)
  142. elements.property(elements.MOD_PT_PCNV, "Temperature", 295.15)
  143. elements.property(elements.MOD_PT_PCNV, "HeatConduct", 0)
  144. elements.property(elements.MOD_PT_PCNV, "Description", "Property converter.")
  145.  
  146. local function convert(i, x, y, s, n)
  147.     local rx, ry
  148.     if tpt.get_property("life", i) < 0 then
  149.         tpt.set_property("life", 1, i)
  150.     end
  151.     local r = tpt.get_property("life", i)
  152.     for rx = -r, r do
  153.         for ry = -r, r do
  154.             if (rx ~= 0 or ry ~= 0) and tpt.get_property("type", x + rx, y + ry) ~= tpt.element("pcnv") and tpt.get_property("x", i) + rx <= 611 and tpt.get_property("y", i) + ry <= 383 then
  155.                 if tpt.get_property("ctype", i) == tpt.el.conv.id then
  156.                     tpt.set_property("type", tpt.get_property("tmp", i), x + rx, y + ry)
  157.                 end
  158.                 if tpt.get_property("ctype", i) == tpt.el.life.id then
  159.                     tpt.set_property("life", tpt.get_property("tmp", i), x + rx, y + ry)
  160.                 end
  161.                 if tpt.get_property("ctype", i) == tpt.el.clne.id then
  162.                     tpt.set_property("ctype", tpt.get_property("tmp", i), x + rx, y + ry)
  163.                 end
  164.                 if tpt.get_property("ctype", i) == tpt.el.wifi.id then
  165.                     tpt.set_property("tmp", tpt.get_property("tmp", i), x + rx, y + ry)
  166.                 end
  167.                 if tpt.get_property("ctype", i) == tpt.el.exot.id then
  168.                     tpt.set_property("tmp2", tpt.get_property("tmp", i), x + rx, y + ry)
  169.                 end
  170.                 if tpt.get_property("ctype", i) == tpt.el.pscn.id then
  171.                     tpt.set_property("x", tpt.get_property("tmp", i), x + rx, y + ry)
  172.                 end
  173.                 if tpt.get_property("ctype", i) == tpt.el.nscn.id then
  174.                     tpt.set_property("y", tpt.get_property("tmp", i), x + rx, y + ry)
  175.                 end
  176.                 if tpt.get_property("ctype", i) == tpt.el.bizr.id then
  177.                     tpt.set_property("dcolor", tpt.get_property("dcolor", i), x + rx, y + ry)
  178.                 end
  179.                 if tpt.get_property("ctype", i) == tpt.el.plsm.id then
  180.                     tpt.set_property("temp", tpt.get_property("temp", i), x + rx, y + ry)
  181.                 end
  182.             end
  183.         end
  184.     end
  185. end
  186.  
  187.  
  188.  
  189. local Element1 = elements.allocate("MOD", "SZRE")
  190. elements.element(elements.MOD_PT_SZRE, elements.element(tpt.element("____")))
  191. elements.property(elements.MOD_PT_SZRE, "Name", "SZRE")
  192. elements.property(elements.MOD_PT_SZRE, "Color", 0xFFFFFF)
  193. elements.property(elements.MOD_PT_SZRE, "MenuVisible", 1)
  194. elements.property(elements.MOD_PT_SZRE, "MenuSection", 11)
  195. elements.property(elements.MOD_PT_SZRE, "Temperature", 295.15)
  196. elements.property(elements.MOD_PT_SZRE, "HeatConduct", 200)
  197. elements.property(elements.MOD_PT_SZRE, "Description", "SEIZURE TIME!!!")
  198.  
  199. local function seizure(i, x, y, s, n)
  200.     tpt.create(x+math.random(-4, 4), y+math.random(-4, 4), "szre")
  201.     local color = math.random(1, 6)
  202.     if color == 1 then
  203.         tpt.set_property("dcolor", 0xFFFF0000, i)
  204.     end
  205.     if color == 2 then
  206.         tpt.set_property("dcolor", 0xFF00FF00, i)
  207.     end
  208.     if color == 3 then
  209.         tpt.set_property("dcolor", 0xFF0000FF, i)
  210.     end
  211.     if color == 4 then
  212.         tpt.set_property("dcolor", 0xFFFFFF00, i)
  213.     end
  214.     if color == 5 then
  215.         tpt.set_property("dcolor", 0xFF00FFFF, i)
  216.     end
  217.     if color == 6 then
  218.         tpt.set_property("dcolor", 0xFFFF00FF, i)
  219.     end
  220. end
  221.  
  222.  
  223.  
  224. local Element1 = elements.allocate("MOD", "HPBD")
  225. elements.element(elements.MOD_PT_HPBD, elements.element(tpt.element("____")))
  226. elements.property(elements.MOD_PT_HPBD, "Name", "HPBD")
  227. elements.property(elements.MOD_PT_HPBD, "Color", 0xFFFFFF)
  228. elements.property(elements.MOD_PT_HPBD, "MenuVisible", 1)
  229. elements.property(elements.MOD_PT_HPBD, "MenuSection", 11)
  230. elements.property(elements.MOD_PT_HPBD, "Temperature", 295.15)
  231. elements.property(elements.MOD_PT_HPBD, "HeatConduct", 200)
  232. elements.property(elements.MOD_PT_HPBD, "Description", "Happy Birthday!!")
  233.  
  234. local function birthdayfireworks(i, x, y, s, n)
  235.     if tpt.get_property("ctype", i) == 0 then
  236.         print("To someone on the the other end of the screen, you are a great person and deserve some fireworks. happy birthday.")
  237.         tpt.create(x - 2, y + 1, "dmnd")
  238.         tpt.create(x - 1, y + 1, "dmnd")
  239.         tpt.create(x, y + 1, "dmnd")
  240.         tpt.create(x + 1, y + 1, "dmnd")
  241.         tpt.create(x + 2, y + 1, "dmnd")
  242.         tpt.create(x - 2, y + 2, "dmnd")
  243.         tpt.create(x - 1, y + 2, "dmnd")
  244.         tpt.create(x, y + 2, "dmnd")
  245.         tpt.create(x + 1, y + 2, "dmnd")
  246.         tpt.create(x + 2, y + 2, "dmnd")
  247.         tpt.set_property("ctype", tpt.el.firw.id, i)
  248.     end
  249.     local color = math.random(1, 6)
  250.     if color == 1 then
  251.         tpt.set_property("dcolor", 0xFFFF0000, i)
  252.     end
  253.     if color == 2 then
  254.         tpt.set_property("dcolor", 0xFF00FF00, i)
  255.     end
  256.     if color == 3 then
  257.         tpt.set_property("dcolor", 0xFF0000FF, i)
  258.     end
  259.     if color == 4 then
  260.         tpt.set_property("dcolor", 0xFFFFFF00, i)
  261.     end
  262.     if color == 5 then
  263.         tpt.set_property("dcolor", 0xFF00FFFF, i)
  264.     end
  265.     if color == 6 then
  266.         tpt.set_property("dcolor", 0xFFFF00FF, i)
  267.     end
  268.     tpt.create(x, y - 1, "firw")
  269.     tpt.set_property("life", 24, x, y - 1)
  270.     tpt.set_property("tmp", 1, x, y - 1)
  271.     tpt.set_property("dcolor", 0xFF00FF00, x, y - 1)
  272.     tpt.set_property("vy", -15, x, y - 1)
  273.     tpt.create(x - 2, y, "firw")
  274.     tpt.set_property("life", 24, x - 2, y)
  275.     tpt.set_property("tmp", 1, x - 2, y)
  276.     tpt.set_property("dcolor", 0xFFFF0000, x - 2, y)
  277.     tpt.set_property("vy", -15, x - 2, y)
  278.     tpt.create(x + 2, y, "firw")
  279.     tpt.set_property("life", 24, x + 2, y)
  280.     tpt.set_property("tmp", 1, x + 2, y)
  281.     tpt.set_property("dcolor", 0xFF0000FF, x + 2, y)
  282.     tpt.set_property("vy", -15, x + 2, y)
  283.     tpt.create(x - 2, y + 3, "exot")
  284.     tpt.create(x, y + 3, "exot")
  285.     tpt.create(x + 2, y + 3, "exot")
  286.     tpt.set_property("tmp2", 500, x - 2, y + 3)
  287.     tpt.set_property("tmp2", 500, x, y + 3)
  288.     tpt.set_property("tmp2", 500, x + 2, y + 3)
  289. end
  290.  
  291.  
  292.  
  293. local Element1 = elements.allocate("MOD", "CMNT")
  294. elements.element(elements.MOD_PT_CMNT, elements.element(tpt.element("GLOW")))
  295. elements.property(elements.MOD_PT_CMNT, "Name", "CMNT")
  296. elements.property(elements.MOD_PT_CMNT, "Color", 0xAAAA99)
  297. elements.property(elements.MOD_PT_CMNT, "MenuVisible", 1)
  298. elements.property(elements.MOD_PT_CMNT, "MenuSection", 7)
  299. elements.property(elements.MOD_PT_CMNT, "Weight", 85)
  300. elements.property(elements.MOD_PT_CMNT, "Temperature", 295.15)
  301. elements.property(elements.MOD_PT_CMNT, "HeatConduct", 30)
  302. elements.property(elements.MOD_PT_CMNT, "Description", "Cement, hardens into brick.")
  303.  
  304. local function harden(i, x, y, s, n)
  305.     if tpt.get_property("ctype", i) == 0 then
  306.         tpt.set_property("life", 240, i)
  307.         tpt.set_property("ctype", tpt.el.cnct.id, i)
  308.     end
  309.     local rx = math.random(-2, 2)
  310.     local ry = math.random(-2, 2)
  311.     if tpt.get_property("life", i) <= 600 then
  312.         local element = tpt.get_property("type", x + rx, y + ry)
  313.         if element == tpt.el.watr.id or element == tpt.el.dstw.id or element == tpt.el.sltw.id or element == tpt.el.bubw.id then
  314.             tpt.set_property("life", tpt.get_property("life", i) + 80, i)
  315.             tpt.delete(x + rx, y + ry)
  316.         end
  317.     end
  318.     if tpt.get_property("life", i) >= 200 then
  319.         tpt.set_property("ctype", tpt.el.pste.id, i)
  320.         if tpt.get_property("temp", i) >= 393.15 then
  321.             local tobrickwsteam = math.random(1, 4)
  322.             if tobrickwsteam == 1 then
  323.                 tpt.create(x, y - 1, "wtrv")
  324.                 tpt.parts[i].type = tpt.el.brck.id
  325.             end
  326.         end
  327.     elseif tpt.get_property("temp", i) >= 393.15 then
  328.         tpt.set_property("ctype", tpt.el.cnct.id, i)
  329.         local tobrick = math.random(1, 4)
  330.         if tobrick == 1 then
  331.             tpt.parts[i].type = tpt.el.brck.id
  332.         end
  333.     else
  334.         tpt.set_property("ctype", tpt.el.cnct.id, i)
  335.     end
  336.     if tpt.get_property("life", i) == 0 then
  337.         local probabilityvalue = math.random(1, 100)
  338.         if probabilityvalue == 25 then
  339.             tpt.parts[i].type = tpt.el.brck.id
  340.         end
  341.     end
  342. end
  343.  
  344.  
  345.  
  346. local Element1 = elements.allocate("MOD", "TIME")
  347. elements.element(elements.MOD_PT_TIME, elements.element(tpt.element("____")))
  348. elements.property(elements.MOD_PT_TIME, "Name", "TIME")
  349. elements.property(elements.MOD_PT_TIME, "Color", 0xFF00FF)
  350. elements.property(elements.MOD_PT_TIME, "MenuVisible", 1)
  351. elements.property(elements.MOD_PT_TIME, "MenuSection", 1)
  352. elements.property(elements.MOD_PT_TIME, "Temperature", 295.15)
  353. elements.property(elements.MOD_PT_TIME, "Description", "Timer, outputs a particle every X frames.")
  354.  
  355. local function pulse(i, x, y, s, n)
  356.     if tpt.get_property("ctype", i) == 0 then
  357.         tpt.set_property("ctype", tpt.el.btry.id, i)
  358.     end
  359.     if tpt.get_property("tmp", i) < 1 then
  360.         tpt.set_property("tmp", 1, i)
  361.     end
  362.     if tpt.get_property("tmp", i) > 65355 then
  363.         tpt.set_property("tmp", 65355, i)
  364.     end
  365.     if tpt.get_property("tmp2", i) < 1 then
  366.         tpt.set_property("tmp2", 1, i)
  367.     end
  368.     if tpt.get_property("tmp2", i) > tpt.get_property("tmp", i) then
  369.         tpt.set_property("tmp2", tpt.get_property("tmp", i), i)
  370.     end
  371.     if tpt.get_property("life", i) >= tpt.get_property("tmp", i) then
  372.         tpt.set_property("life", 0, i)
  373.     else
  374.         tpt.set_property("life", tpt.get_property("life", i) + 1, i)
  375.     end
  376.     if tpt.get_property("life", i) < tpt.get_property("tmp2", i) then
  377.         tpt.create(x, y - 1, tpt.get_property("ctype", i))
  378.     else
  379.         tpt.delete(x, y - 1)
  380.     end
  381. end
  382.  
  383.  
  384.  
  385. function hotkeys(key)
  386.     if key == "n" then
  387.         fpsinput = tpt.input("Enter FPS cap", "Type the value you want to set it to.")
  388.         if fpsinput ~= "" then
  389.             if tonumber(fpsinput) == nil then
  390.                 tpt.throw_error("Not a number.")
  391.             elseif fpsinput <= "1" then
  392.                 tpt.throw_error("Value too small.")
  393.             else
  394.                 tpt.setfpscap(fpsinput)
  395.             end
  396.         end
  397.     end
  398.     if key == "m" then
  399.         firevalue = tpt.input("Enter fire strength", "Type the value you want to set it to.")
  400.         if firevalue ~= "" then
  401.             if tonumber(firevalue) == nil then
  402.                 tpt.throw_error("Not a number.")
  403.             else
  404.                 tpt.setfire(firevalue)
  405.             end
  406.         end
  407.     end
  408.     if key == "t" then
  409.         text = tpt.input("Enter log text", "Type text to put in the log.")
  410.         if text ~= "" then
  411.             print(text)
  412.         end
  413.     end
  414. end
  415.  
  416.  
  417.  
  418. tpt.element_func(turntosmke, elements.MOD_PT_BNCB)
  419.  
  420. tpt.element_func(sodium, elements.MOD_PT_SDUM)
  421.  
  422. tpt.element_func(randomelements, elements.MOD_PT_RNDM)
  423.  
  424. tpt.element_func(convert, elements.MOD_PT_PCNV)
  425.  
  426. tpt.element_func(seizure, elements.MOD_PT_SZRE)
  427.  
  428. tpt.element_func(birthdayfireworks,elements.MOD_PT_HPBD)
  429.  
  430. tpt.element_func(harden, elements.MOD_PT_CMNT)
  431.  
  432. tpt.element_func(pulse, elements.MOD_PT_TIME)
  433.  
  434. tpt.register_keypress(hotkeys)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement