ok
Thanks!
Don't use the graphics function then, it should give you better FPS. I have also edited the script to reduce lag.
Here is the code again without graphics the function
local NEON = elements.allocate("MOD", "NEON")
elements.element(elements.MOD_PT_NEON, elements.element(elements.DEFAULT_PT_NBLE))
elements.property(elements.MOD_PT_NEON, "Name", "NEON")
elements.property(elements.MOD_PT_NEON, "Description", "Neon gas - glows in contact with electricity")
elements.property(elements.MOD_PT_NEON, "Colour", 0x00242424)
elements.property(elements.MOD_PT_NEON, "MenuSection", 6)
elements.property(elements.MOD_PT_NEON, "Loss", 0.1)
elements.property(elements.MOD_PT_NEON, "AirLoss", 1)
elements.property(elements.MOD_PT_NEON, "Advection", 0.4)
elements.property(elements.MOD_PT_NEON, "Diffusion", 0.5)
elements.property(elements.MOD_PT_NEON, "Temperature", 295)
elements.property(elements.MOD_PT_NEON, "Gravity", 0)
elements.property(elements.MOD_PT_NEON, "Flammable", 0)
elements.property(elements.MOD_PT_NEON, "Weight", 0)
elements.property(elements.MOD_PT_NEON, "Properties", 0x4828)
local colour={0xFFAA0000,0xFFFF6600,0xFFFFFF00,0xFF00FF00,0xFF00FFFF,0xFF0000FF,0xFF9900CC}
local none=0x00242424
local function neon(i,x,y,s,n)
if tpt.get_property("tmp",i)== 0 then
tpt.set_property("tmp",1,i)
end
if tpt.get_property("tmp2",i)== 1 then
tpt.set_property("life",180+math.random(0,20),i)
tpt.set_property("tmp2",0,i)
end
if tpt.parts[i].life<=0 then
tpt.set_property("dcolour",none,i)
end
end
local function neonsprk(i,x,y,s,n)
local ntmp=tpt.get_property("tmp",i)
local neontype=tpt.get_property("ctype",i)
if tpt.get_property("ctype",i)==elements.MOD_PT_NEON then
if tpt.get_property("tmp",i)==ntmp then
tpt.set_property("dcolour",colour[ntmp],i)
tpt.set_property("tmp2",1,i)
end
if tpt.get_property("tmp",i)==8 then
tpt.set_property("dcolour",colour[math.random(1,7)],i)
tpt.set_property("tmp2",1,i)
end
end
end
tpt.element_func(neon,elements.MOD_PT_NEON)
tpt.element_func(neonsprk,elements.DEFAULT_PT_SPRK)
--By MrSalit0s
The new version is better than the old version. ;DDDDDDDD