Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Exit 8
- math.randomseed(os.clock())
- local anomalies = {}
- local curAnom = 1
- local function shuffle(tbl)
- for i = #tbl, 2, -1 do
- local j = math.random(i)
- tbl[i], tbl[j] = tbl[j], tbl[i]
- end
- return tbl
- end
- local function nextAnomaly()
- curAnom++
- if (curAnom > #anomalies) then
- anomalies = shuffle(anomalies)
- curAnom = 1
- end
- end
- local function loadAnomaly() {
- game.ServerStorage
- }
- local function newRoom()
- local weirdness = 0.5
- if (math.random() < weirdness) then
- loadAnomaly()
- nextAnomaly()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement