Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function round(x)
- if x%2 ~= 0.5 then
- return math.floor(x+0.5)
- end
- return x-0.5
- end
- function putTexture(part, frontF, backF, topF, bottomF, leftF, rightF, className)
- local faces = {"Front", "Back", "Top", "Bottom", "Left", "Right"}
- for i,f in pairs(faces) do
- local decal = Instance.new(className, part)
- decal.StudsPerTileU = 2.6
- decal.StudsPerTileV = 2.6
- if i == 1 then decal.Texture = frontF decal.Name = f end
- if i == 2 then decal.Texture = backF or frontF decal.Name = f end
- if i == 3 then decal.Texture = topF or frontF decal.Name = f end
- if i == 4 then decal.Texture = bottomF or frontF decal.Name = f end
- if i == 5 then decal.Texture = leftF or frontF decal.Name = f end
- if i == 6 then decal.Texture = rightF or frontF decal.Name = f end
- decal.Face = f
- end
- return part
- end
- local x1 = 60
- local z1 = 5
- local y1 = 60
- local RS = game:GetService("RunService").RenderStepped
- for x = 1, y1 do
- for z = 1, x1 do
- for y = 1, z1 do
- local block = Instance.new("Part", workspace)
- block.Material = "Fabric"
- block.Anchored = true
- block.Size = Vector3.new(2.6, 2.6, 2.6)
- block.CFrame = CFrame.new((x1/2) + x * 2.6, (round((math.noise(x/12, 0.154, z/12)*26) / 2.6) * 2.6) - (y * 2.6), (z1/2) + z * 2.6)
- if y == 1 then
- putTexture(block, "rbxassetid://96430337", "rbxassetid://96430337",
- "rbxassetid://96430265", "rbxassetid://179655033",
- "rbxassetid://96430337", "rbxassetid://96430337", "Texture")
- elseif y == 2 then
- putTexture(block, "rbxassetid://179655033", "rbxassetid://179655033",
- "rbxassetid://179655033", "rbxassetid://179655033",
- "rbxassetid://179655033", "rbxassetid://179655033", "Texture")
- elseif y >= 3 then
- putTexture(block, "rbxassetid://75880927", "rbxassetid://75880927",
- "rbxassetid://75880927", "rbxassetid://75880927",
- "rbxassetid://75880927", "rbxassetid://75880927", "Texture")
- end
- end
- end
- RS:wait()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement