-- Function to generate a random number between min and max local function rng(min, max) return math.random(min, max) end

math.randomseed(tick()) -- Initialize RNG

Here's a basic example of an RNG script in Lua: