Run it
Copy the script and paste it into your executor.
().VoxelMini_Cleanup
(().VoxelMini_Cleanup)
().VoxelMini_Cleanup =
Players = :()
UIS = :()
RS = :()
WS = :()
TweenService = :()
StarterGui = :()
(()
StarterGui:(.CoreGuiType.Backpack, )
StarterGui:(.CoreGuiType.PlayerList, )
)
lp = Players.LocalPlayer
cam = WS.CurrentCamera
pg = lp:()
BLOCK_SIZE =
REACH =
loadGui = .()
loadGui.Name =
loadGui.IgnoreGuiInset =
loadGui.DisplayOrder =
loadGui.Parent = pg
loadBg = .()
loadBg.Size = .(, )
loadBg.BackgroundColor3 = .(, , )
loadBg.BorderSizePixel =
loadBg.Parent = loadGui
loadText = .()
loadText.Size = .(, )
loadText.BackgroundTransparency =
loadText.Font = .Font.Arcade
loadText.TextSize =
loadText.TextColor3 = .(, , )
loadText.Text =
loadText.Parent = loadBg
.()
loadText.Text =
.()
TweenService:(loadBg, TweenInfo.(), {BackgroundTransparency = }):()
TweenService:(loadText, TweenInfo.(), {TextTransparency = }):()
.()
loadGui:()
ITEMS = {}
itemIndex = {}
(name, color, mat, kind, damage)
.(ITEMS, {name=name, color=color, mat=mat, kind=kind , damage=damage })
itemIndex[name] = #ITEMS
baseBlocks = {
{, .(, , ), .Material.Grass},
{, .(, , ), .Material.Ground},
{, .(, , ), .Material.Slate},
{, .(, , ), .Material.Cobblestone},
{, .(, , ), .Material.Slate},
{, .(, , ), .Material.Sand},
{, .(, , ), .Material.Sand},
{, .(, , ), .Material.Glass},
{, .(, , ), .Material.Slate},
{, .(, , ), .Material.Slate},
{, .(, , ), .Material.SmoothPlastic},
{, .(, , ), .Material.Slate},
{, .(, , ), .Material.Sand},
{, .(, , ), .Material.Sand}
}
_, b (baseBlocks) (b[], b[], b[])
logs = {, , , , , , , }
woodColors = {.(, , ), .(, , ), .(, , ), .(, , ), .(, , ), .(, , ), .(, , ), .(, , )}
i, name (logs)
(name.., woodColors[i], .Material.Wood)
(name.., woodColors[i]:(.(,,), ), .Material.WoodPlanks)
ores = {, , , , , , , }
oreColors = {.(,,), .(,,), .(,,), .(,,), .(,,), .(,,), .(,,), .(,,)}
i, ore (ores)
(ore.., oreColors[i], .Material.Slate)
(ore.., oreColors[i], .Material.Metal)
colors = {
{, , }, {, , }, {, , }, {, , },
{, , }, {, , }, {, , }, {, , },
{, , }, {, , }, {, , }, {, , },
{, , }, {, , }, {, , }, {, , }
}
i, c (colors)
col = .(c[], c[], c[])
(..i, col, .Material.Fabric)
(..i, col, .Material.Concrete)
(..i, col:(.(,,), ), .Material.Brick)
(, .(, , ), .Material.Wood, , )
(, .(, , ), .Material.Slate, , )
(, .(, , ), .Material.Metal, , )
(, .(, , ), .Material.Glass, , )
hotbarInv = {
itemIndex[],
itemIndex[],
itemIndex[],
itemIndex[],
itemIndex[],
itemIndex[],
itemIndex[],
itemIndex[],
itemIndex[]
}
conns, instances = {}, {}
(c) .(conns, c); c
(i) .(instances, i); i
world = (.())
world.Name =
world.Parent = WS
mobsFolder = (.())
mobsFolder.Name =
mobsFolder.Parent = WS
(pos)
half = BLOCK_SIZE /
.(
.((pos.X - half) / BLOCK_SIZE + ) * BLOCK_SIZE + half,
.((pos.Y - half) / BLOCK_SIZE + ) * BLOCK_SIZE + half,
.((pos.Z - half) / BLOCK_SIZE + ) * BLOCK_SIZE + half
)
grid = {}
(pos)
half = BLOCK_SIZE /
gx = .((pos.X - half) / BLOCK_SIZE + )
gy = .((pos.Y - half) / BLOCK_SIZE + )
gz = .((pos.Z - half) / BLOCK_SIZE + )
.(, gx, gy, gz)
xi = -,
zi = -,
p = .()
p.Size = .(BLOCK_SIZE, BLOCK_SIZE, BLOCK_SIZE)
p.Position = .(xi * BLOCK_SIZE + BLOCK_SIZE/, -BLOCK_SIZE/, zi * BLOCK_SIZE + BLOCK_SIZE/)
p.Anchored =
p.Color = ITEMS[].color
p.Material = ITEMS[].mat
p.Parent = world
grid[(p.Position)] = p
ghost = (.())
ghost.Name =
ghost.Size = .(BLOCK_SIZE, BLOCK_SIZE, BLOCK_SIZE)
ghost.Anchored =
ghost.CanCollide =
ghost.CanQuery =
ghost.CanTouch =
ghost.Transparency =
ghost.Material = .Material.SmoothPlastic
ghost.Parent = WS
box = (.())
box.Adornee = ghost
box.LineThickness =
box.Color3 = .(, , )
box.Parent = WS
rayParams = RaycastParams.()
rayParams.FilterType = .RaycastFilterType.Exclude
rayParams.FilterDescendantsInstances = {ghost}
(parent, size, pos)
f = (.())
f.Size = size
f.Position = pos
f.BackgroundColor3 = .(, , )
f.BorderSizePixel =
f.BorderColor3 = .(, , )
f.ClipsDescendants =
f.ZIndex =
f.Parent = parent
stroke = (.())
stroke.Color = .(, , )
stroke.Thickness =
stroke.ApplyStrokeMode = .ApplyStrokeMode.Border
stroke.Parent = f
f
(parent, itemId)
_, child (parent:())
child.Name == child.Name ==
child:()
itemId
b = ITEMS[itemId]
ic = .()
ic.Name =
ic.Size = .(, )
ic.Position = .(, )
ic.BackgroundColor3 = b.color
ic.BorderSizePixel =
ic.ZIndex =
ic.Active =
ic.Parent = parent
itemId > b.kind ~=
vp = .()
vp.Name =
vp.Size = .(, )
vp.BackgroundTransparency =
vp.Ambient = .(, , )
vp.LightColor = .(, , )
vp.ZIndex =
vp.Active =
vp.Parent = parent
part = .()
part.Material = .Material.SmoothPlastic
b.kind ==
part.Size = .(, , )
part.Size = .(, , )
part.Color = b.color
part.Anchored =
part.Parent = vp
cam3d = .()
cam3d.Parent = vp
vp.CurrentCamera = cam3d
b.kind ==
cam3d.CFrame = .(.(, , ), .(, , ))
cam3d.CFrame = .(.(, , ), .(, , ))
gui = (.())
gui.Name =
gui.ResetOnSpawn =
gui.IgnoreGuiInset =
gui.DisplayOrder =
gui.Parent = pg
hudFrame = (.())
hudFrame.Size = .(, )
hudFrame.Position = .(, , , -)
hudFrame.AnchorPoint = .(, )
hudFrame.BackgroundTransparency =
hudFrame.ZIndex =
hudFrame.Parent = gui
heartsFrame = (.())
heartsFrame.Size = .(, )
heartsFrame.Position = .(, )
heartsFrame.BackgroundTransparency =
heartsFrame.ZIndex =
heartsFrame.Parent = hudFrame
hearts = {}
i = ,
heart = (.())
heart.Size = .(, )
heart.Position = .((i-) * , )
heart.BackgroundTransparency =
heart.Font = .Font.Arcade
heart.TextSize =
heart.TextColor3 = .(, , )
heart.TextStrokeTransparency =
heart.Text =
heart.ZIndex =
heart.Parent = heartsFrame
hearts[i] = heart
hotbar = (hudFrame, .( * + , ), .(, ))
hotbar.BackgroundColor3 = .(, , )
hotbar.ZIndex =
hotbarSlots = {}
i = ,
slot = (hotbar, .(, ), .( + (i-)*, ))
slot.ZIndex =
(slot, hotbarInv[i])
num = (.())
num.Size = .(, )
num.Position = .(, )
num.BackgroundTransparency =
num.Font = .Font.Arcade
num.TextSize =
num.TextColor3 = .(,,)
num.TextStrokeTransparency =
num.Text = (i)
num.ZIndex =
num.Parent = slot
hotbarSlots[i] = slot
invGui = (.())
invGui.Size = .(, )
invGui.Position = .(, )
invGui.AnchorPoint = .(, )
invGui.BackgroundColor3 = .(, , )
invGui.BorderSizePixel =
invGui.BorderColor3 = .(, , )
invGui.Visible =
invGui.ZIndex =
invGui.Parent = gui
tabBg = (invGui, .(, ), .(, -))
tabBg.ZIndex =
tabTitle = (.())
tabTitle.Size = .(,)
tabTitle.BackgroundTransparency =
tabTitle.Font = .Font.Arcade
tabTitle.TextSize =
tabTitle.TextColor3 = .(,,)
tabTitle.Text =
tabTitle.ZIndex =
tabTitle.Parent = tabBg
closeBtn = (invGui, .(, ), .(, -, , -))
closeBtn.BackgroundColor3 = .(, , )
closeBtn.ZIndex =
closeLbl = (.())
closeLbl.Size = .(,)
closeLbl.BackgroundTransparency =
closeLbl.Font = .Font.Arcade
closeLbl.TextSize =
closeLbl.TextColor3 = .(,,)
closeLbl.Text =
closeLbl.ZIndex =
closeLbl.Parent = closeBtn
leftPanel = (invGui, .(, ), .(, ))
leftPanel.BackgroundColor3 = .(, , )
leftPanel.ZIndex =
scrollFrame = (.())
scrollFrame.Size = .(, -, , -)
scrollFrame.Position = .(, )
scrollFrame.BackgroundTransparency =
scrollFrame.BorderSizePixel =
scrollFrame.ScrollBarThickness =
scrollFrame.AutomaticCanvasSize = .AutomaticSize.Y
scrollFrame.ZIndex =
scrollFrame.Parent = leftPanel
gridLayout = (.())
gridLayout.CellSize = .(, )
gridLayout.CellPadding = .(, )
gridLayout.SortOrder = .SortOrder.LayoutOrder
gridLayout.Parent = scrollFrame
selectedCraftItem =
craftSlots = {}
craftItems = {, , , }
outputSlot =
outputItem =
rightPanel = (invGui, .(, ), .(, ))
rightPanel.BackgroundColor3 = .(, , )
rightPanel.ZIndex =
craftTitle = (.())
craftTitle.Size = .(, )
craftTitle.Position = .(, )
craftTitle.BackgroundTransparency =
craftTitle.Font = .Font.Arcade
craftTitle.TextSize =
craftTitle.TextColor3 = .(,,)
craftTitle.Text =
craftTitle.ZIndex =
craftTitle.Parent = rightPanel
craftGrid = (.())
craftGrid.Size = .(, )
craftGrid.Position = .(, )
craftGrid.BackgroundTransparency =
craftGrid.ZIndex =
craftGrid.Parent = rightPanel
cx = ,
cy = ,
idx = cy * + cx +
cs = (craftGrid, .(, ), .(cx*, cy*))
cs.ZIndex =
craftSlots[idx] = cs
btn = (.())
btn.Size = .(,)
btn.BackgroundTransparency =
btn.Text =
btn.ZIndex =
btn.Parent = cs
(btn.MouseButton1Click:(()
selectedCraftItem
craftItems[idx] = selectedCraftItem
(cs, selectedCraftItem)
()
))
arrow = (.())
arrow.Size = .(, )
arrow.Position = .(, )
arrow.BackgroundTransparency =
arrow.Font = .Font.Arcade
arrow.TextSize =
arrow.TextColor3 = .(,,)
arrow.Text =
arrow.ZIndex =
arrow.Parent = rightPanel
outputSlot = (rightPanel, .(, ), .(, ))
outputSlot.ZIndex =
outBtn = (.())
outBtn.Size = .(,)
outBtn.BackgroundTransparency =
outBtn.Text =
outBtn.ZIndex =
outBtn.Parent = outputSlot
(outBtn.MouseButton1Click:(()
outputItem
hotbarInv[selected] = outputItem
(hotbarSlots[selected], outputItem)
i=,
craftItems[i] =
_, child (craftSlots[i]:())
child.Name == child.Name == child:()
outputItem =
_, child (outputSlot:())
child.Name == child.Name == child:()
))
spawnMobBtn = (rightPanel, .(, ), .(, ))
spawnMobBtn.BackgroundColor3 = .(, , )
spawnMobBtn.ZIndex =
smText = (.())
smText.Size = .(,)
smText.BackgroundTransparency =
smText.Font = .Font.Arcade
smText.TextSize =
smText.TextColor3 = .(,,)
smText.Text =
smText.ZIndex =
smText.Parent = spawnMobBtn
smBtn = (.())
smBtn.Size = .(,)
smBtn.BackgroundTransparency =
smBtn.Text =
smBtn.ZIndex =
smBtn.Parent = spawnMobBtn
i, b (ITEMS)
s = (scrollFrame, .(, ), .(,))
s.LayoutOrder = i
s.ZIndex =
(s, i)
btn = (.())
btn.Size = .(,)
btn.BackgroundTransparency =
btn.Text =
btn.ZIndex =
btn.Parent = s
(btn.MouseButton1Click:(()
selectedCraftItem = i
hotbarInv[selected] = i
(hotbarSlots[selected], i)
_, child (scrollFrame:())
child:()
child.BorderColor3 = .(,,)
s.BorderColor3 = .(, , )
))
()
c = craftItems
outputItem =
_, child (outputSlot:())
child.Name == child.Name == child:()
c[] c[] c[] c[]
logId = itemIndex[]
c[] == logId c[] == logId c[] == logId c[] == logId outputItem = itemIndex[]
outputItem (outputSlot, outputItem)
(closeBtn.InputBegan:((input)
input.UserInputType == .UserInputType.MouseButton1 invGui.Visible =
))
selected =
()
i, slot (hotbarSlots)
slot.BorderSizePixel = (i == selected)
slot.BorderColor3 = (i == selected) .(,,) .(,,)
()
(n)
selected = .(n, , )
()
(hum)
ratio = hum.Health / .(hum.MaxHealth, )
fullHearts = .(ratio * )
i = , hearts[i].TextTransparency = (i <= fullHearts)
(char)
hum = char:()
(hum.HealthChanged:(() (hum) ))
(hum)
lp.Character (lp.Character)
(lp.CharacterAdded:(bindHealth))
()
char = lp.Character
hrp = char char:()
hrp
pos = hrp.Position + hrp.CFrame.LookVector * + .(, , )
model = .()
model.Name =
model.Parent = mobsFolder
head = .()
head.Size = .(,,)
head.Color = .(, , )
head.Position = pos
head.Parent = model
torso = .()
torso.Size = .(,,)
torso.Color = .(, , )
torso.Position = pos - .(, , )
torso.Parent = model
hum = .()
hum.Parent = model
model.PrimaryPart = torso
lastAttack =
followConn = RS.Heartbeat:(()
char char.Parent followConn:()
myHrp = char:()
myHrp
dir = (myHrp.Position - torso.Position).Unit
torso.CFrame = .(torso.Position + dir * , torso.Position + dir)
head.Position = torso.Position + .(, , )
(torso.Position - myHrp.Position).Magnitude <
.() - lastAttack >
lastAttack = .()
hp = char:()
hp hp.Health -=
)
(followConn)
(pos)
boom = .()
boom.Size = .(,,)
boom.Position = pos
boom.Anchored =
boom.CanCollide =
boom.Transparency =
boom.Color = .(, , )
boom.Material = .Material.Neon
boom.Parent = WS
:():(boom, )
_, mob (mobsFolder:())
hrp = mob:()
hrp (hrp.Position - pos).Magnitude <
hp = mob:()
hp hp.Health =
key, part (grid)
part (part.Position - pos).Magnitude <
grid[key] =
part:()
noclip =
flyBV =
()
noclip = noclip
char = lp.Character
hrp = char char:()
noclip hrp
flyBV = .()
flyBV.Name =
flyBV.MaxForce = .(,,)
flyBV.Velocity = .zero
flyBV.Parent = hrp
hrp
old = hrp:()
old old:()
(RS.Stepped:(()
noclip lp.Character
_, v (lp.Character:())
v:() v.CanCollide =
))
(RS.RenderStepped:(()
flyBV
look = cam.CFrame.LookVector
flyBV.Velocity = look *
))
currentHit =
ghostPos =
(RS.RenderStepped:(()
filter = {ghost, mobsFolder}
lp.Character .(filter, lp.Character)
rayParams.FilterDescendantsInstances = filter
m = UIS:()
ray = cam:(m.X, m.Y)
result = WS:(ray.Origin, ray.Direction * REACH, rayParams)
hitPos, hitNormal
result
currentHit = result
n = result.Normal
ax, ay, az = .(n.X), .(n.Y), .(n.Z)
ax > ay ax > az n = .(.(n.X), , )
ay > ax ay > az n = .(, .(n.Y), )
n = .(, , .(n.Z))
hitPos = result.Position
hitNormal = n
currentHit =
hitPos = ray.Origin + ray.Direction *
hitNormal = .(, , )
targetPos = (hitPos + hitNormal * (BLOCK_SIZE / ))
grid[(targetPos)]
char = lp.Character
hrp = char char:()
hrp (hrp.Position - targetPos).Magnitude < BLOCK_SIZE *
ghostPos =
ghost.Transparency =
box.Visible =
ghostPos = targetPos
ghost.Position = targetPos
b = ITEMS[hotbarInv[selected]]
ghost.Color = b.color
ghost.Material = b.mat
ghost.Transparency =
box.Visible = (b.kind ~= )
ghostPos =
ghost.Transparency =
box.Visible =
))
(UIS.InputBegan:((input, gameProcessed)
gameProcessed
input.KeyCode == .KeyCode.One ()
input.KeyCode == .KeyCode.Two ()
input.KeyCode == .KeyCode.Three ()
input.KeyCode == .KeyCode.Four ()
input.KeyCode == .KeyCode.Five ()
input.KeyCode == .KeyCode.Six ()
input.KeyCode == .KeyCode.Seven ()
input.KeyCode == .KeyCode.Eight ()
input.KeyCode == .KeyCode.Nine ()
input.KeyCode == .KeyCode.E invGui.Visible = invGui.Visible
input.KeyCode == .KeyCode.F ()
input.KeyCode == .KeyCode.M ()
invGui.Visible
input.UserInputType == .UserInputType.MouseButton1
currentHit currentHit.Instance
currentHit.Instance.Parent == world
currentHit.Instance.Name ==
(currentHit.Instance.Position)
grid[(currentHit.Instance.Position)] =
currentHit.Instance:()
grid[(currentHit.Instance.Position)] =
currentHit.Instance:()
currentHit.Instance.Parent == mobsFolder
mob = currentHit.Instance.Parent
hp = mob:()
hp
b = ITEMS[hotbarInv[selected]]
dmg = (b.kind == ) b.damage
hp.Health -= dmg
hp.Health <= mob:()
input.UserInputType == .UserInputType.MouseButton2
ghostPos
b = ITEMS[hotbarInv[selected]]
b.kind ==
p = .()
p.Name = b.name
p.Size = .(BLOCK_SIZE, BLOCK_SIZE, BLOCK_SIZE)
p.Position = ghostPos
p.Anchored =
p.Color = b.color
p.Material = b.mat
p.Parent = world
grid[(p.Position)] = p
))
(smBtn.MouseButton1Click:(spawnMob))
(UIS.InputChanged:((input, gameProcessed)
gameProcessed
input.UserInputType ~= .UserInputType.MouseWheel
invGui.Visible
d = input.Position.Z
d ==
(selected + (d > -))
))
().VoxelMini_Cleanup = ()
_, c (conns) (() c:() )
_, i (instances) (() i:() )
(()
StarterGui:(.CoreGuiType.Backpack, )
StarterGui:(.CoreGuiType.PlayerList, )
)
lp.Character
hrp = lp.Character:()
hrp
old = hrp:()
old old:()
_, v (lp.Character:())
v:() v.CanCollide =
()minecraft in roblox

Universal