Mr_3242

Voxels [🛠️] (game) ultimate Griefer (NEW)

Aug 2nd, 2026 (edited)
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 26.40 KB | Gaming | 0 0
  1. --// CLEAN RE-EXECUTE
  2. if getgenv().GrieferUnload then
  3.     pcall(getgenv().GrieferUnload)
  4. end
  5.  
  6. -- Load Rayfield
  7. local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
  8.  
  9. -- Create Window
  10. local Window = Rayfield:CreateWindow({
  11.     Name = "Voxels [🛠️]",
  12.     LoadingTitle = "Ultimate Griefer",
  13.     LoadingSubtitle = "Follow me on TikTok Mr_3242",
  14.     ConfigurationSaving = { Enabled = false },
  15.     Discord = { Enabled = false },
  16.     KeySystem = false
  17. })
  18.  
  19. --// FILTER NOTIFICATIONS
  20. local oldNotify = Rayfield.Notify
  21. if oldNotify then
  22.     Rayfield.Notify = function(self, data)
  23.         if data and data.Title then
  24.             local t = tostring(data.Title)
  25.             if t:find("Rayfield") or t:find("Interface") then return end
  26.         end
  27.         return oldNotify(self, data)
  28.     end
  29. end
  30.  
  31. --// NOTIFY
  32. local function Notify(t, c)
  33.     if getgenv().VoxelsUnloaded then return end
  34.     Rayfield:Notify({
  35.         Title = t,
  36.         Content = c,
  37.         Duration = 3,
  38.         Image = 4483362458
  39.     })
  40. end
  41.  
  42. -- Services
  43. local Players = game:GetService("Players")
  44. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  45. local RunService = game:GetService("RunService")
  46.  
  47. local remote = ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("PlaceBlock")
  48. local BlockStorage = ReplicatedStorage:WaitForChild("BlockStorage")
  49.  
  50. -- Player / Character
  51. local player = Players.LocalPlayer
  52. local character
  53. local humanoidRootPart
  54. local characterConnection
  55.  
  56. local function setupCharacter(char)
  57.     character = char
  58.     humanoidRootPart = nil
  59.     local hrp = char:WaitForChild("HumanoidRootPart", 10)
  60.     if hrp and hrp.Parent == char then
  61.         humanoidRootPart = hrp
  62.     end
  63. end
  64.  
  65. if player.Character then
  66.     setupCharacter(player.Character)
  67. end
  68. characterConnection = player.CharacterAdded:Connect(setupCharacter)
  69.  
  70. -- ====================
  71. -- CONFIGURATION
  72. -- ====================
  73. local BuilderConfig = {
  74.     selectedBlock = "Oak Log",
  75.     blockType = "Oak Log",
  76.     material = Enum.NormalId.Top,
  77.     previewEnabled = true,
  78.     previewTransparency = 0.45,
  79.     isPlacing = false,
  80.     fillSize = 5,
  81.     showFillPreview = false,
  82.     customFillSize = 10,
  83.     currentOperationId = 0
  84. }
  85.  
  86. -- ====================
  87. -- PREVIEW STATE
  88. -- ====================
  89. local previewParts = {}
  90. local fillPreviewParts = {}
  91. local previewConnection = nil
  92. local lastPreviewPos = nil
  93. local lastFillSize = nil
  94. local lastSelectedBlock = nil
  95.  
  96. -- ====================
  97. -- AVAILABLE BLOCKS (built once at startup)
  98. -- ====================
  99. local AvailableBlocks = {}
  100. for _, block in ipairs(BlockStorage:GetChildren()) do
  101.     if block:IsA("BasePart") then
  102.         table.insert(AvailableBlocks, block.Name)
  103.     end
  104. end
  105.  
  106. -- Validate / set default block
  107. do
  108.     local default = BlockStorage:FindFirstChild("Oak Log")
  109.     if default and default:IsA("BasePart") then
  110.         BuilderConfig.selectedBlock = "Oak Log"
  111.         BuilderConfig.blockType = "Oak Log"
  112.     elseif #AvailableBlocks > 0 then
  113.         BuilderConfig.selectedBlock = AvailableBlocks[1]
  114.         BuilderConfig.blockType = AvailableBlocks[1]
  115.     else
  116.         BuilderConfig.selectedBlock = ""
  117.         BuilderConfig.blockType = ""
  118.     end
  119. end
  120.  
  121. local function updateSelectedBlock(blockName)
  122.     BuilderConfig.selectedBlock = blockName
  123.     BuilderConfig.blockType = blockName
  124.     lastSelectedBlock = blockName
  125.     lastPreviewPos = nil
  126. end
  127.  
  128. -- ====================
  129. -- SHARED GRID HELPERS
  130. -- ====================
  131. local function getGridCenter(worldPos)
  132.     return Vector3.new(
  133.         math.floor(worldPos.X / 4) * 4 + 2,
  134.         math.floor(worldPos.Y / 4) * 4 + 2,
  135.         math.floor(worldPos.Z / 4) * 4 + 2
  136.     )
  137. end
  138.  
  139. local function getStartOffset(size)
  140.     return -math.floor((size - 1) / 2)
  141. end
  142.  
  143. local function calculateFillPositions(center, size)
  144.     local positions = {}
  145.     local startOffset = getStartOffset(size)
  146.  
  147.     for x = 0, size - 1 do
  148.         for y = 0, size - 1 do
  149.             for z = 0, size - 1 do
  150.                 table.insert(positions, Vector3.new(
  151.                     center.X + (startOffset + x) * 4,
  152.                     center.Y + (startOffset + y) * 4,
  153.                     center.Z + (startOffset + z) * 4
  154.                 ))
  155.             end
  156.         end
  157.     end
  158.  
  159.     return positions
  160. end
  161.  
  162. local function calculatePlatformPositions(center)
  163.     local positions = {}
  164.     local y = center.Y - 8
  165.     local startX = center.X - 18
  166.     local startZ = center.Z - 18
  167.  
  168.     for x = 0, 9 do
  169.         for z = 0, 9 do
  170.             table.insert(positions, Vector3.new(
  171.                 startX + x * 4,
  172.                 y,
  173.                 startZ + z * 4
  174.             ))
  175.         end
  176.     end
  177.  
  178.     return positions
  179. end
  180.  
  181. -- ====================
  182. -- PREVIEW SYSTEM
  183. -- ====================
  184. local function createTexturedPreview(position)
  185.     local source = BlockStorage:FindFirstChild(BuilderConfig.blockType)
  186.     if not source or not source:IsA("BasePart") then
  187.         local part = Instance.new("Part")
  188.         part.Size = Vector3.new(4, 4, 4)
  189.         part.Position = position
  190.         part.Anchored = true
  191.         part.CanCollide = false
  192.         part.Transparency = BuilderConfig.previewTransparency
  193.         part.Material = Enum.Material.Neon
  194.         part.Color = Color3.fromRGB(200, 200, 200)
  195.         part.Parent = workspace
  196.         return part
  197.     end
  198.  
  199.     local preview = source:Clone()
  200.     preview.Name = "BlockPreview"
  201.     preview.Size = Vector3.new(4, 4, 4)
  202.     preview.Position = position
  203.     preview.Anchored = true
  204.     preview.CanCollide = false
  205.     preview.CanQuery = false
  206.     preview.CanTouch = false
  207.     preview.CastShadow = false
  208.     preview.Transparency = BuilderConfig.previewTransparency
  209.  
  210.     for _, child in ipairs(preview:GetDescendants()) do
  211.         if child:IsA("Texture") or child:IsA("Decal") then
  212.             child.Transparency = BuilderConfig.previewTransparency
  213.         elseif child:IsA("Script") or child:IsA("LocalScript") then
  214.             child:Destroy()
  215.         end
  216.     end
  217.  
  218.     preview.Parent = workspace
  219.     return preview
  220. end
  221.  
  222. local function clearPreviews()
  223.     for _, part in ipairs(previewParts) do
  224.         if part and part.Parent then
  225.             part:Destroy()
  226.         end
  227.     end
  228.     table.clear(previewParts)
  229. end
  230.  
  231. local function clearFillPreview()
  232.     for _, part in ipairs(fillPreviewParts) do
  233.         if part and part.Parent then
  234.             part:Destroy()
  235.         end
  236.     end
  237.     table.clear(fillPreviewParts)
  238. end
  239.  
  240. local function applyTransparencyToExisting()
  241.     local t = BuilderConfig.previewTransparency
  242.     for _, part in ipairs(previewParts) do
  243.         if part and part.Parent then
  244.             part.Transparency = t
  245.             for _, child in ipairs(part:GetDescendants()) do
  246.                 if child:IsA("Texture") or child:IsA("Decal") then
  247.                     child.Transparency = t
  248.                 end
  249.             end
  250.         end
  251.     end
  252. end
  253.  
  254. -- ====================
  255. -- BLOCK PLACEMENT
  256. -- ====================
  257. local function placeBlockFixed(position, operationId, fixedBlock, fixedName)
  258.     if getgenv().VoxelsUnloaded then return false end
  259.     if operationId ~= BuilderConfig.currentOperationId then return false end
  260.     if not fixedBlock or not fixedBlock.Parent or not fixedBlock:IsA("BasePart") then return false end
  261.  
  262.     local success, err = pcall(function()
  263.         remote:FireServer(fixedBlock, BuilderConfig.material, position, fixedName)
  264.     end)
  265.  
  266.     if not success then
  267.         warn("[PlaceBlock Error]:", err)
  268.         return false
  269.     end
  270.     return true
  271. end
  272.  
  273. -- ====================
  274. -- SHARED PLACEMENT WORKER
  275. -- ====================
  276. local function runPlacementOperation(positions, fixedBlock, fixedName, operationName)
  277.     if BuilderConfig.isPlacing then
  278.         Notify("Busy", "An operation is already running")
  279.         return
  280.     end
  281.  
  282.     if not fixedBlock or not fixedBlock:IsA("BasePart") then
  283.         Notify("Error", "Selected block is missing or invalid")
  284.         return
  285.     end
  286.  
  287.     local expected = #positions
  288.     if expected == 0 then
  289.         Notify("Error", "No positions calculated")
  290.         return
  291.     end
  292.  
  293.     BuilderConfig.isPlacing = true
  294.     BuilderConfig.currentOperationId += 1
  295.     local thisOperation = BuilderConfig.currentOperationId
  296.  
  297.     clearFillPreview()
  298.  
  299.     task.spawn(function()
  300.         local successCount = 0
  301.         local failCount = 0
  302.         local result = "completed"
  303.  
  304.         local ok, err = pcall(function()
  305.             for i, pos in ipairs(positions) do
  306.                 if getgenv().VoxelsUnloaded then
  307.                     result = "unloaded"
  308.                     return
  309.                 end
  310.                 if thisOperation ~= BuilderConfig.currentOperationId then
  311.                     result = "cancelled"
  312.                     return
  313.                 end
  314.                 if not fixedBlock.Parent then
  315.                     result = "aborted"
  316.                     return
  317.                 end
  318.  
  319.                 local placed = placeBlockFixed(pos, thisOperation, fixedBlock, fixedName)
  320.                 if placed then
  321.                     successCount += 1
  322.                 else
  323.                     failCount += 1
  324.                 end
  325.  
  326.                 if i % 40 == 0 then
  327.                     if thisOperation ~= BuilderConfig.currentOperationId or getgenv().VoxelsUnloaded then
  328.                         result = "cancelled"
  329.                         return
  330.                     end
  331.                     task.wait()
  332.                 end
  333.             end
  334.         end)
  335.  
  336.         BuilderConfig.isPlacing = false
  337.  
  338.         if getgenv().VoxelsUnloaded then return end
  339.  
  340.         if not ok then
  341.             Notify(operationName .. " Error", "Unexpected error")
  342.             warn(err)
  343.             return
  344.         end
  345.  
  346.         if result == "cancelled" then
  347.             Notify(operationName .. " Cancelled", "Emergency Stop used")
  348.         elseif result == "aborted" then
  349.             Notify(operationName .. " Aborted", "Selected block was removed")
  350.         elseif result == "unloaded" then
  351.             -- silent
  352.         else
  353.             if failCount == 0 then
  354.                 Notify(operationName .. " Complete", successCount .. "/" .. expected .. " placed")
  355.             else
  356.                 Notify(operationName .. " Finished", successCount .. "/" .. expected .. " placed, " .. failCount .. " failed")
  357.             end
  358.         end
  359.     end)
  360. end
  361.  
  362. -- ====================
  363. -- FILL SYSTEM
  364. -- ====================
  365. local function showFillPreview(position, size)
  366.     clearFillPreview()
  367.     if not BuilderConfig.previewEnabled or not BuilderConfig.showFillPreview then return end
  368.  
  369.     local center = getGridCenter(position)
  370.     local positions = calculateFillPositions(center, size)
  371.  
  372.     if size > 5 then
  373.         local minX, minY, minZ = math.huge, math.huge, math.huge
  374.         local maxX, maxY, maxZ = -math.huge, -math.huge, -math.huge
  375.  
  376.         for _, pos in ipairs(positions) do
  377.             minX = math.min(minX, pos.X)
  378.             minY = math.min(minY, pos.Y)
  379.             minZ = math.min(minZ, pos.Z)
  380.             maxX = math.max(maxX, pos.X)
  381.             maxY = math.max(maxY, pos.Y)
  382.             maxZ = math.max(maxZ, pos.Z)
  383.         end
  384.  
  385.         local mid = Vector3.new((minX + maxX)/2, (minY + maxY)/2, (minZ + maxZ)/2)
  386.         local sizeVec = Vector3.new(maxX - minX + 4, maxY - minY + 4, maxZ - minZ + 4)
  387.         local thickness = 0.35
  388.         local col = Color3.fromRGB(0, 220, 255)
  389.         local trans = 0.4
  390.  
  391.         local function edge(cframe, size)
  392.             local p = Instance.new("Part")
  393.             p.Size = size
  394.             p.CFrame = cframe
  395.             p.Anchored = true
  396.             p.CanCollide = false
  397.             p.Material = Enum.Material.Neon
  398.             p.Color = col
  399.             p.Transparency = trans
  400.             p.CastShadow = false
  401.             p.Parent = workspace
  402.             table.insert(fillPreviewParts, p)
  403.         end
  404.  
  405.         local hx, hy, hz = sizeVec.X/2, sizeVec.Y/2, sizeVec.Z/2
  406.  
  407.         edge(CFrame.new(mid + Vector3.new(0, -hy, -hz)), Vector3.new(sizeVec.X, thickness, thickness))
  408.         edge(CFrame.new(mid + Vector3.new(0, -hy,  hz)), Vector3.new(sizeVec.X, thickness, thickness))
  409.         edge(CFrame.new(mid + Vector3.new(-hx, -hy, 0)), Vector3.new(thickness, thickness, sizeVec.Z))
  410.         edge(CFrame.new(mid + Vector3.new( hx, -hy, 0)), Vector3.new(thickness, thickness, sizeVec.Z))
  411.  
  412.         edge(CFrame.new(mid + Vector3.new(0,  hy, -hz)), Vector3.new(sizeVec.X, thickness, thickness))
  413.         edge(CFrame.new(mid + Vector3.new(0,  hy,  hz)), Vector3.new(sizeVec.X, thickness, thickness))
  414.         edge(CFrame.new(mid + Vector3.new(-hx,  hy, 0)), Vector3.new(thickness, thickness, sizeVec.Z))
  415.         edge(CFrame.new(mid + Vector3.new( hx,  hy, 0)), Vector3.new(thickness, thickness, sizeVec.Z))
  416.  
  417.         edge(CFrame.new(mid + Vector3.new(-hx, 0, -hz)), Vector3.new(thickness, sizeVec.Y, thickness))
  418.         edge(CFrame.new(mid + Vector3.new( hx, 0, -hz)), Vector3.new(thickness, sizeVec.Y, thickness))
  419.         edge(CFrame.new(mid + Vector3.new(-hx, 0,  hz)), Vector3.new(thickness, sizeVec.Y, thickness))
  420.         edge(CFrame.new(mid + Vector3.new( hx, 0,  hz)), Vector3.new(thickness, sizeVec.Y, thickness))
  421.         return
  422.     end
  423.  
  424.     local startOffset = getStartOffset(size)
  425.     for i, pos in ipairs(positions) do
  426.         local idx = i - 1
  427.         local x = idx % size
  428.         local y = math.floor(idx / size) % size
  429.         local z = math.floor(idx / (size * size))
  430.  
  431.         if x == 0 or x == size - 1 or y == 0 or y == size - 1 or z == 0 or z == size - 1 then
  432.             local p = createTexturedPreview(pos)
  433.             p.Transparency = 0.55
  434.             for _, t in ipairs(p:GetDescendants()) do
  435.                 if t:IsA("Texture") or t:IsA("Decal") then
  436.                     t.Transparency = 0.55
  437.                 end
  438.             end
  439.             table.insert(fillPreviewParts, p)
  440.         end
  441.     end
  442. end
  443.  
  444. local function fillArea(position, size)
  445.     local fixedName = BuilderConfig.selectedBlock
  446.     local fixedBlock = BlockStorage:FindFirstChild(fixedName)
  447.     if not fixedBlock or not fixedBlock:IsA("BasePart") then
  448.         Notify("Error", "Selected block is missing or invalid")
  449.         return
  450.     end
  451.  
  452.     local center = getGridCenter(position)
  453.     local positions = calculateFillPositions(center, size)
  454.  
  455.     local expected = size * size * size
  456.     if #positions ~= expected then
  457.         Notify("Error", "Position calculation mismatch")
  458.         return
  459.     end
  460.  
  461.     runPlacementOperation(positions, fixedBlock, fixedName, "Fill")
  462. end
  463.  
  464. -- ====================
  465. -- REAL-TIME PREVIEW
  466. -- ====================
  467. local function startPreviewSystem()
  468.     if previewConnection then
  469.         previewConnection:Disconnect()
  470.         previewConnection = nil
  471.     end
  472.  
  473.     if not BuilderConfig.previewEnabled then return end
  474.  
  475.     previewConnection = RunService.Heartbeat:Connect(function()
  476.         if getgenv().VoxelsUnloaded then return end
  477.         if BuilderConfig.isPlacing or not humanoidRootPart or not humanoidRootPart.Parent then
  478.             return
  479.         end
  480.  
  481.         local lookVector = humanoidRootPart.CFrame.LookVector
  482.         local previewPos = getGridCenter(humanoidRootPart.Position + (lookVector * 12))
  483.  
  484.         local sizeChanged = lastFillSize ~= BuilderConfig.fillSize
  485.         local posChanged = not lastPreviewPos or (previewPos - lastPreviewPos).Magnitude > 0.1
  486.         local blockChanged = lastSelectedBlock ~= BuilderConfig.selectedBlock
  487.  
  488.         if not posChanged and not sizeChanged and not blockChanged then
  489.             return
  490.         end
  491.  
  492.         lastPreviewPos = previewPos
  493.         lastFillSize = BuilderConfig.fillSize
  494.         lastSelectedBlock = BuilderConfig.selectedBlock
  495.  
  496.         clearPreviews()
  497.  
  498.         local preview = createTexturedPreview(previewPos)
  499.         table.insert(previewParts, preview)
  500.  
  501.         if BuilderConfig.showFillPreview then
  502.             showFillPreview(previewPos, BuilderConfig.fillSize)
  503.         end
  504.     end)
  505. end
  506.  
  507. -- ====================
  508. -- UI
  509. -- ====================
  510.  
  511. -- Block Selection
  512. local BlockTab = Window:CreateTab("Block Selection", 4483362458)
  513. BlockTab:CreateSection("Choose Block Type")
  514.  
  515. for _, block in ipairs(BlockStorage:GetChildren()) do
  516.     if block:IsA("BasePart") then
  517.         BlockTab:CreateButton({
  518.             Name = block.Name,
  519.             Callback = function()
  520.                 updateSelectedBlock(block.Name)
  521.                 Notify("Block Selected", block.Name)
  522.             end
  523.         })
  524.     end
  525. end
  526.  
  527. -- Instant Build
  528. local BuildTab = Window:CreateTab("Instant Build", 4483362458)
  529. BuildTab:CreateSection("Building")
  530.  
  531. BuildTab:CreateButton({
  532.     Name = "Place Block",
  533.     Callback = function()
  534.         if not humanoidRootPart or not humanoidRootPart.Parent then
  535.             Notify("Unavailable", "Character is not ready")
  536.             return
  537.         end
  538.  
  539.         local placePos = getGridCenter(humanoidRootPart.Position + (humanoidRootPart.CFrame.LookVector * 10))
  540.  
  541.         local fixedBlock = BlockStorage:FindFirstChild(BuilderConfig.blockType)
  542.         if fixedBlock and fixedBlock:IsA("BasePart") then
  543.             placeBlockFixed(placePos, BuilderConfig.currentOperationId, fixedBlock, BuilderConfig.selectedBlock)
  544.         else
  545.             Notify("Error", "Selected block is missing or invalid")
  546.         end
  547.     end
  548. })
  549.  
  550. BuildTab:CreateButton({
  551.     Name = "Instant 10x10 Platform",
  552.     Callback = function()
  553.         if not humanoidRootPart or not humanoidRootPart.Parent then
  554.             Notify("Unavailable", "Character is not ready")
  555.             return
  556.         end
  557.  
  558.         local fixedName = BuilderConfig.selectedBlock
  559.         local fixedBlock = BlockStorage:FindFirstChild(fixedName)
  560.         if not fixedBlock or not fixedBlock:IsA("BasePart") then
  561.             Notify("Error", "Selected block missing or invalid")
  562.             return
  563.         end
  564.  
  565.         local center = getGridCenter(humanoidRootPart.Position)
  566.         local positions = calculatePlatformPositions(center)
  567.  
  568.         if #positions ~= 100 then
  569.             Notify("Error", "Platform calculation mismatch")
  570.             return
  571.         end
  572.  
  573.         runPlacementOperation(positions, fixedBlock, fixedName, "Platform")
  574.     end
  575. })
  576.  
  577. -- Fill Tool
  578. local FillTab = Window:CreateTab("Fill Tool", 4483362458)
  579. FillTab:CreateSection("Custom Size Filling (Unlimited)")
  580.  
  581. local function setFillSize(size)
  582.     if type(size) ~= "number" or size ~= size or size == math.huge or size == -math.huge then
  583.         Notify("Invalid", "Enter a valid positive number")
  584.         return
  585.     end
  586.     size = math.floor(size)
  587.     if size < 1 then
  588.         Notify("Invalid", "Size must be at least 1")
  589.         return
  590.     end
  591.  
  592.     BuilderConfig.fillSize = size
  593.     BuilderConfig.customFillSize = size
  594.     lastFillSize = nil
  595.     lastPreviewPos = nil
  596.     clearFillPreview()
  597.     Notify("Fill Size", size .. " blocks per axis")
  598. end
  599.  
  600. FillTab:CreateInput({
  601.     Name = "Custom Fill Size",
  602.     PlaceholderText = "Any whole number (unlimited)",
  603.     RemoveTextAfterFocusLost = false,
  604.     Callback = function(txt)
  605.         local size = tonumber(txt)
  606.         if size then
  607.             setFillSize(size)
  608.         else
  609.             Notify("Invalid", "Please enter a number")
  610.         end
  611.     end
  612. })
  613.  
  614. FillTab:CreateButton({ Name = "Small (3×3×3)", Callback = function() setFillSize(3) end })
  615. FillTab:CreateButton({ Name = "Medium (7×7×7)", Callback = function() setFillSize(7) end })
  616. FillTab:CreateButton({ Name = "Large (15×15×15)", Callback = function() setFillSize(15) end })
  617. FillTab:CreateButton({ Name = "Massive (25×25×25)", Callback = function() setFillSize(25) end })
  618.  
  619. FillTab:CreateToggle({
  620.     Name = "Show Fill Preview",
  621.     CurrentValue = false,
  622.     Callback = function(state)
  623.         BuilderConfig.showFillPreview = state
  624.         if not state then
  625.             clearFillPreview()
  626.         else
  627.             lastFillSize = nil
  628.             lastPreviewPos = nil
  629.         end
  630.     end
  631. })
  632.  
  633. FillTab:CreateButton({
  634.     Name = "Fill at Cursor",
  635.     Callback = function()
  636.         if not humanoidRootPart or not humanoidRootPart.Parent then
  637.             Notify("Unavailable", "Character is not ready")
  638.             return
  639.         end
  640.         local fillPos = humanoidRootPart.Position + (humanoidRootPart.CFrame.LookVector * 15)
  641.         fillArea(fillPos, BuilderConfig.fillSize)
  642.     end
  643. })
  644.  
  645. FillTab:CreateButton({
  646.     Name = "Fill Below",
  647.     Callback = function()
  648.         if not humanoidRootPart or not humanoidRootPart.Parent then
  649.             Notify("Unavailable", "Character is not ready")
  650.             return
  651.         end
  652.         local pos = humanoidRootPart.Position
  653.         fillArea(Vector3.new(pos.X, pos.Y - 8, pos.Z), BuilderConfig.fillSize)
  654.     end
  655. })
  656.  
  657. FillTab:CreateButton({
  658.     Name = "Fill Around",
  659.     Callback = function()
  660.         if not humanoidRootPart or not humanoidRootPart.Parent then
  661.             Notify("Unavailable", "Character is not ready")
  662.             return
  663.         end
  664.         fillArea(humanoidRootPart.Position, BuilderConfig.fillSize)
  665.     end
  666. })
  667.  
  668. -- Preview
  669. local PreviewTab = Window:CreateTab("Preview", 4483362458)
  670. PreviewTab:CreateSection("Visual Settings")
  671.  
  672. PreviewTab:CreateToggle({
  673.     Name = "Enable Preview",
  674.     CurrentValue = true,
  675.     Callback = function(state)
  676.         BuilderConfig.previewEnabled = state
  677.         if state then
  678.             startPreviewSystem()
  679.         else
  680.             if previewConnection then
  681.                 previewConnection:Disconnect()
  682.                 previewConnection = nil
  683.             end
  684.             clearPreviews()
  685.             clearFillPreview()
  686.             lastPreviewPos = nil
  687.             lastFillSize = nil
  688.         end
  689.     end
  690. })
  691.  
  692. PreviewTab:CreateSlider({
  693.     Name = "Preview Transparency",
  694.     Range = {20, 80},
  695.     Increment = 5,
  696.     Suffix = "%",
  697.     CurrentValue = 45,
  698.     Callback = function(value)
  699.         BuilderConfig.previewTransparency = value / 100
  700.         applyTransparencyToExisting()
  701.     end
  702. })
  703.  
  704. -- Keybinds
  705. local KeyTab = Window:CreateTab("Keybinds", 4483362458)
  706. KeyTab:CreateSection("Instant Controls")
  707.  
  708. KeyTab:CreateKeybind({
  709.     Name = "INSTANT Place",
  710.     CurrentKeybind = "E",
  711.     HoldToInteract = false,
  712.     Callback = function()
  713.         if not humanoidRootPart or not humanoidRootPart.Parent then return end
  714.         local placePos = getGridCenter(humanoidRootPart.Position + (humanoidRootPart.CFrame.LookVector * 10))
  715.  
  716.         local fixedBlock = BlockStorage:FindFirstChild(BuilderConfig.blockType)
  717.         if fixedBlock and fixedBlock:IsA("BasePart") then
  718.             placeBlockFixed(placePos, BuilderConfig.currentOperationId, fixedBlock, BuilderConfig.selectedBlock)
  719.         else
  720.             Notify("Error", "Selected block is missing or invalid")
  721.         end
  722.     end
  723. })
  724.  
  725. KeyTab:CreateKeybind({
  726.     Name = "INSTANT Fill",
  727.     CurrentKeybind = "F",
  728.     HoldToInteract = false,
  729.     Callback = function()
  730.         if not humanoidRootPart or not humanoidRootPart.Parent then return end
  731.         local fillPos = humanoidRootPart.Position + (humanoidRootPart.CFrame.LookVector * 15)
  732.         fillArea(fillPos, BuilderConfig.customFillSize)
  733.     end
  734. })
  735.  
  736. KeyTab:CreateKeybind({
  737.     Name = "Toggle UI",
  738.     CurrentKeybind = "RightShift",
  739.     HoldToInteract = false,
  740.     Callback = function()
  741.         pcall(function() Rayfield:Toggle() end)
  742.     end
  743. })
  744.  
  745. KeyTab:CreateKeybind({
  746.     Name = "Cycle Block",
  747.     CurrentKeybind = "Q",
  748.     HoldToInteract = false,
  749.     Callback = function()
  750.         if #AvailableBlocks == 0 then return end
  751.  
  752.         local currentIndex = table.find(AvailableBlocks, BuilderConfig.selectedBlock) or 1
  753.         local nextIndex = (currentIndex % #AvailableBlocks) + 1
  754.         updateSelectedBlock(AvailableBlocks[nextIndex])
  755.         Notify("Block Cycled", AvailableBlocks[nextIndex])
  756.     end
  757. })
  758.  
  759. -- Utilities
  760. local UtilTab = Window:CreateTab("Utilities", 4483362458)
  761. UtilTab:CreateSection("Tools")
  762.  
  763. UtilTab:CreateButton({
  764.     Name = "Clear All Previews",
  765.     Callback = function()
  766.         clearPreviews()
  767.         clearFillPreview()
  768.         lastPreviewPos = nil
  769.         lastFillSize = nil
  770.         Notify("Previews", "Cleared")
  771.     end
  772. })
  773.  
  774. UtilTab:CreateButton({
  775.     Name = "Emergency Stop",
  776.     Callback = function()
  777.         if not BuilderConfig.isPlacing then
  778.             Notify("Emergency Stop", "No operation is running")
  779.             return
  780.         end
  781.         BuilderConfig.currentOperationId += 1
  782.         clearPreviews()
  783.         clearFillPreview()
  784.         lastPreviewPos = nil
  785.         lastFillSize = nil
  786.         Notify("Emergency Stop", "Cancelling current operation...")
  787.     end
  788. })
  789.  
  790. UtilTab:CreateParagraph({
  791.     Title = "Settings Info",
  792.     Content = "Positions pre-calculated before placement\nYielding every ~40 blocks"
  793. })
  794.  
  795. -- Credits
  796. local CreditsTab = Window:CreateTab("Credits", 4483362458)
  797.  
  798. CreditsTab:CreateParagraph({
  799.     Title = "Credits",
  800.     Content = "Script created by Mr_3242\nThanks for using the script!"
  801. })
  802.  
  803. CreditsTab:CreateButton({
  804.     Name = "Copy TikTok Link",
  805.     Callback = function()
  806.         setclipboard("https://www.tiktok.com/@Mr_3242")
  807.         Notify("Copied", "TikTok link copied")
  808.     end
  809. })
  810.  
  811. CreditsTab:CreateButton({
  812.     Name = "Copy YouTube Link",
  813.     Callback = function()
  814.         setclipboard("https://www.youtube.com/@Mr_3242.")
  815.         Notify("Copied", "YouTube link copied")
  816.     end
  817. })
  818.  
  819. CreditsTab:CreateButton({
  820.     Name = "Copy Twitch Link",
  821.     Callback = function()
  822.         setclipboard("https://m.twitch.tv/quantumx_42/home")
  823.         Notify("Copied", "Twitch link copied")
  824.     end
  825. })
  826.  
  827. -- Unload
  828. local UnloadTab = Window:CreateTab("Unload", 4483362458)
  829.  
  830. getgenv().GrieferUnload = function()
  831.     getgenv().VoxelsUnloaded = true
  832.     BuilderConfig.currentOperationId += 1
  833.     BuilderConfig.isPlacing = false
  834.     BuilderConfig.previewEnabled = false
  835.     BuilderConfig.showFillPreview = false
  836.  
  837.     if previewConnection then
  838.         previewConnection:Disconnect()
  839.         previewConnection = nil
  840.     end
  841.  
  842.     if characterConnection then
  843.         characterConnection:Disconnect()
  844.         characterConnection = nil
  845.     end
  846.  
  847.     clearPreviews()
  848.     clearFillPreview()
  849.     lastPreviewPos = nil
  850.     lastFillSize = nil
  851.  
  852.     pcall(function() Rayfield:Destroy() end)
  853.     getgenv().GrieferUnload = nil
  854. end
  855.  
  856. UnloadTab:CreateButton({
  857.     Name = "Unload Script",
  858.     Callback = function()
  859.         getgenv().GrieferUnload()
  860.     end
  861. })
  862.  
  863. -- Init
  864. getgenv().VoxelsUnloaded = false
  865. BuilderConfig.fillSize = BuilderConfig.customFillSize
  866. startPreviewSystem()
Tags: delta
Advertisement
Add Comment
Please, Sign In to add comment