Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if not partTerm then
- if not (fs.exists("partTerm") or fs.exists(shell.resolve("partTerm"))) then
- shell.run("pastebin get hR8p9ML4 partTerm")
- os.loadAPI(shell.resolve("partTerm"))
- else os.loadAPI(fs.exists("partTerm") and "partTerm" or shell.resolve("partTerm")) end
- end
- partTerm.removeAll()
- partTerm.setDensity(1)
- local parts = 5
- local x, y, z = commands.getBlockPosition()
- x, y, z = x + 0.5, y + 1, z + 0.5 -- Top-center of the block.
- local heatPad = partTerm.createWindow(x, y, z, 5, 5, colours.black)
- heatPad.setParticle("mobSpell")
- heatPad.setAngles(0, 90)
- local smoke = {colours.red, colours.orange, colours.grey, colours.white, colours.black}
- local particles = {}
- for i = 1, parts do particles[i] = {["colour"] = i, ["x"] = math.random(5), ["y"] = math.random(5)} end
- parallel.waitForAny(
- function()
- while true do
- for i = 1, parts do
- local thisPart = particles[i]
- if thisPart.colour > 5 then
- particles[i] = {["colour"] = i, ["x"] = math.random(5), ["y"] = math.random(5)}
- else
- heatPad.setCursorPos(thisPart.x, thisPart.y)
- heatPad.setBackgroundColour(smoke[thisPart.colour])
- heatPad.write(" ")
- thisPart.colour = thisPart.colour + 1
- end
- end
- sleep(0.5)
- end
- end,
- partTerm.render
- )
Add Comment
Please, Sign In to add comment