Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- download JAR from https://db.tt/xz74eYUa --
- local image = require(169714428):Get()
- local origin = CFrame.new(0, 5, 0)
- local scale = 0.2
- function makeVoxel(pos, color, trans)
- if trans == 255 then return end
- local v = Instance.new("Part", Workspace.Base)
- v.Anchored = true
- v.CanCollide = false
- v.Size = Vector3.new(1, 1, 1)
- v.TopSurface = 0
- v.Transparency = 1 - (trans / 255)
- v.BottomSurface = 0
- v.CFrame = origin * CFrame.new(-(#image / 4), 0, -(#image[1] / 4)) * CFrame.new(pos.X / 2, pos.Y, pos.Z / 2)
- local sm = Instance.new("SpecialMesh", v)
- sm.MeshId = "http://www.roblox.com/asset/?id=9856898"
- sm.TextureId = "http://www.roblox.com/asset/?id=48358980"
- sm.Scale = Vector3.new(scale, scale, scale)
- sm.VertexColor = color
- end
- for y = 1, #image[1] do
- for x = #image, 1, -1 do
- makeVoxel(CFrame.new(x * scale, 0, y * scale), Vector3.new(image[x][y][1], image[x][y][2], image[x][y][3]) / 255, image[x][y][4])
- end
- wait()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement