-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlockstest.lua
More file actions
47 lines (36 loc) · 1.07 KB
/
Copy pathBlockstest.lua
File metadata and controls
47 lines (36 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
local Blocks = {}
local BasePlate do
local x, y, z
local axis = { x = 200, y = 200, z = 1 } -- The Base limit
local area = axis.x * axis.y
function SetLimits(LimitX, LimitY, LimitZ)
local LimitX = math.max(200)
local LimitY = math.max(200)
local LimitZ = math.max(1)
local function BlockOnSpawn()
local StartingPos = 0
local RandomSpawnPoisition = math.random(StartingPos, area)
end
return BlockOnSpawn()
end
end
local function GetBlock()
local BlockTypes = { "Coal", "Iron", "Gold", "Diamond", "Emerald", "Redstone", "Lapis", "Quartz" }
for Blocks, Times in pairs(BlockTypes) do
local Times = 1
local Blocks = BlockTypes[math.random(1, #BlockTypes)]
return Blocks, Times
end
end
local function TimeToSpawn(Time)
local Time = 15
while Time > 0 do
Time = Time - 1
if Time == 0 then
local BLOCK_TYPE = GetBlock()
table.insert(Blocks, BLOCK_TYPE)
end
end
end
TimeToSpawn(10)
print(Blocks[1])