Further Enhance this lua powder toy script:

And add really solid properties, and a more ULTRA-powerful regeneration.
Custom ingame properties doesn't exist.

```
-- Allocate a new element for the ultra infused constant-electron solid
local infus = elements.allocate("custom", "INFUS")
elements.element(infus, elements.element(elements.DEFAULT_PT_METL))  -- Based on METL (solid)

-- Properties of the new element
elements.property(infus, "Name", "INFUS")
elements.property(infus, "Description", "ULTRA infused-constant-electron solid that regenerates using electrons and photons.")
elements.property(infus, "Color", 0x00FFFF)  -- Cyan to represent the electron-infused state
elements.property(infus, "Weight", 150)      -- Medium weight, solid material
elements.property(infus, "Hardness", 750)    -- Strong, but not indestructible
elements.property(infus, "HeatConduct", 100) -- Moderate heat conductivity
elements.property(infus, "Temperature", 295.15) -- Room temperature

-- Custom properties for subframe regeneration and photosynthesis
local REGEN_CHANCE = 50          -- Chance of subframe regeneration in percent
local ELEC_GENERATION_RATE = 5   -- Number of electrons generated per frame
local PHOT_ABSORPTION_RATE = 10  -- Number of photons absorbed per frame
local UNSTABLE_BEHAVIOR_CHANCE = 20 -- Chance of unstable behavior per frame

-- Function to handle interaction with photons (PHOT) and electrons (ELEC)
local function handle_phot_elec(i, x, y)
    -- Regenerate when photons are nearby (photosynthesis-like effect)
    for r in sim.neighbors(x, y, 1, 1) do
        local type_r = sim.partProperty(r, "type")
        if type_r == elements.DEFAULT_PT_PHOT then
            -- Absorb photons and regenerate
            sim.partProperty(i, "life", math.min(999, sim.partProperty(i, "life") + PHOT_ABSORPTION_RATE))
            sim.partProperty(r, "life", 0) -- Destroy the photon
        end
    end

    -- Constantly generate electrons inside the material
    for _ = 1, ELEC_GENERATION_RATE do
        local elec_x = x + math.random(-1, 1)
        local elec_y = y + math.random(-1, 1)
        sim.partCreate(-1, elec_x, elec_y, elements.DEFAULT_PT_ELEC)  -- Create electrons
    end
end

-- Subframe regeneration function
local function subframe_regen(i, x, y)
    if math.random(0, 100) < REGEN_CHANCE then
        sim.partProperty(i, "life", 999) -- Max out life (indicating regeneration)
        sim.partProperty(i, "dcolor", 0x00FFFF) -- Bright cyan when fully regenerated
    end
end

-- Unstable per-frame behavior: random variations
local function unstable_behavior(i)
    if math.random(0, 100) < UNSTABLE_BEHAVIOR_CHANCE then
        -- Randomly modify particle properties each frame
        local vx = math.random(-5, 5)
        local vy = math.random(-5, 5)
        sim.partProperty(i, "vx", vx)
        sim.partProperty(i, "vy", vy)

        -- Flash the color randomly to indicate instability
        sim.partProperty(i, "dcolor", math.random(0x000000, 0xFFFFFF))
    end
end

-- Main update function for the infused solid
local function update_infus(i, x, y, s, n)
    -- Handle interactions with photons and electrons (photosynthesis-like regeneration)
    handle_phot_elec(i, x, y)

    -- Perform subframe regeneration
    subframe_regen(i, x, y)

    -- Unstable behavior per frame
    unstable_behavior(i)
end

-- Assign the update function to the new element
elements.property(infus, "Update", update_infus)

-- Enable the element to be solid and not flow like powder
elements.property(infus, "State", elements.ST_SOLID)

-- Make the element non-explosive and highly durable
elements.property(infus, "Explosive", 0)  -- Not explosive
elements.property(infus, "Loss", 0)       -- No loss of material over time