A small note: Lua 5.4 changed the way random happens.

Its now based on xoshiro256**.

Thats still not crytographically secure, but it is vastly faster.