Advertisement
KrYn0MoRe

mc build v3.2

Dec 10th, 2020 (edited)
1,195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 35.94 KB | None | 0 0
  1. local plr = owner
  2.  
  3. local blockType = 'Grass'
  4. local rot = Vector3.new()
  5. local colorid = 1
  6. local clickid = 1
  7. local _clickid = 1
  8. local blockmode = 1
  9. local totalblocks = 0
  10. local selectmode = 1
  11. local currentnotify
  12.  
  13. local preplace = nil
  14. local preplacepart = nil
  15. local highlight = nil
  16. local placing = true
  17. local holding = false
  18. local lastmpos = nil
  19. local lasttarget = nil
  20. do
  21.     --//=================================\\
  22.     --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  23.     --\\=================================//
  24.      
  25.     ArtificialHB = Instance.new("BindableEvent", script)
  26.     ArtificialHB.Name = "ArtificialHB"
  27.      
  28.     script:WaitForChild("ArtificialHB")
  29.      
  30.     frame = (1/60)
  31.     tf = 0
  32.     allowframeloss = false
  33.     tossremainder = false
  34.     lastframe = tick()
  35.     script.ArtificialHB:Fire()
  36.      
  37.     game:GetService("RunService").Heartbeat:connect(function(s, p)
  38.         tf = tf + s
  39.         if tf >= frame then
  40.             if allowframeloss then
  41.                 script.ArtificialHB:Fire()
  42.                 lastframe = tick()
  43.             else
  44.                 for i = 1, math.floor(tf / frame) do
  45.                     script.ArtificialHB:Fire()
  46.                 end
  47.             lastframe = tick()
  48.             end
  49.             if tossremainder then
  50.                 tf = 0
  51.             else
  52.                 tf = tf - frame * math.floor(tf / frame)
  53.             end
  54.         end
  55.     end)
  56.      
  57.     function Swait(NUMBER)
  58.         if NUMBER == 0 or NUMBER == nil then
  59.             ArtificialHB.Event:wait()
  60.         else
  61.             for i = 1, NUMBER do
  62.                 ArtificialHB.Event:wait()
  63.             end
  64.         end
  65.     end
  66.      
  67.     --//=================================\\
  68.     --\\=================================//
  69.    
  70.     local pf = Instance.new("Folder")
  71.     pf.Parent = script
  72.    
  73.     local _s = 4
  74.     local s = Vector3.new(_s,_s,_s)
  75.    
  76.     local observers = {}
  77.    
  78.     function create_ray(p1,p2,v)
  79.         local r = workspace:FindPartOnRay(Ray.new(p1,(p2-p1).Unit*(_s+_s/2)),v)
  80.         return r
  81.     end
  82.    
  83.     function check(p)
  84.         local r = false
  85.         if p and string.match(p.Name:lower(),'block') then
  86.             r = true
  87.         end
  88.         return r
  89.     end
  90.    
  91.     local observersStatus = {}
  92.     function create_observer(pos)
  93.         local p = Instance.new("Part")
  94.         p.Name = 'block'
  95.         p.Color = Color3.fromRGB(255, 0, 85)
  96.         p.Material = Enum.Material.SmoothPlastic
  97.         p.Anchored = true
  98.         p.CanCollide = true
  99.         p.Locked = false
  100.         p.Position = pos or Vector3.new()
  101.         p.Size = Vector3.new(_s,_s,_s)
  102.         p.Parent = pf
  103.         local look2 = Instance.new("Handles")
  104.         look2.Faces = Faces.new(Enum.NormalId.Front)
  105.         look2.Color3 = Color3.fromRGB(255, 255, 0)
  106.         look2.Adornee = p
  107.         look2.Parent = p
  108.         local back2 = Instance.new("Handles")
  109.         back2.Faces = Faces.new(Enum.NormalId.Back)
  110.         back2.Color3 = Color3.fromRGB(255, 0, 0)
  111.         back2.Adornee = p
  112.         back2.Parent = p
  113.         local activated = Instance.new("BoolValue")
  114.         activated.Name = 'active'
  115.         activated.Value = false
  116.         activated.Parent = p
  117.         table.insert(observers,1,p)
  118.         observersStatus[p] = {nil, tick(), nil}
  119.         return p
  120.     end
  121.    
  122.     function update_observers()
  123.         for i,v in pairs(observers) do
  124.             if v and v.Parent then
  125.                 local block = create_ray(v.CFrame.Position,v.CFrame.Position+v.CFrame.lookVector,v)
  126.                 if (check(block) == false) then
  127.                     block = nil
  128.                 end
  129.                 local status = observersStatus[v]
  130.                 if (block ~= status[1] or (block and status[4] ~= tostring(block.BrickColor))) then
  131.                     status[2] = tick()
  132.                 end
  133.                 status[1] = block
  134.                 if (block) then
  135.                     status[4] = tostring(block.BrickColor)
  136.                 end
  137.                 local actualStatus = tick()-status[2] < .1
  138.                 if (actualStatus == status[3]) then
  139.                     continue
  140.                 end
  141.                 status[3] = actualStatus
  142.                 if actualStatus then
  143.                     v.Color = Color3.fromRGB(0, 255, 85)
  144.                 else
  145.                     v.Color = Color3.fromRGB(255, 0, 85)
  146.                 end
  147.                 Swait()
  148.             else
  149.                 table.remove(observers,i)
  150.                 observersStatus[v] = nil
  151.             end
  152.         end
  153.     end
  154.     --[[
  155.     _G.check = function()
  156.         local r = 0
  157.         for i,v in pairs(observers) do r = r + 1 end
  158.         return r
  159.     end
  160.     ]]
  161. end
  162. local blockfolder = workspace:FindFirstChild('blockfolder')
  163.  
  164. if not blockfolder then
  165.     blockfolder = Instance.new("Folder")
  166.     blockfolder.Name = ('blockfolder')
  167.     blockfolder.Parent = workspace
  168. end
  169.  
  170. local mainGUI = Instance.new("ScreenGui")
  171. local Mode = Instance.new("Frame")
  172. local example = Instance.new("TextLabel")
  173. mainGUI.Name = "mainGUI"
  174. mainGUI.Parent = plr.PlayerGui
  175. Mode.Name = "Mode"
  176. Mode.Parent = mainGUI
  177. Mode.Position = UDim2.new(0, 0, 1, -40)
  178. Mode.Size = UDim2.new(1, 0, 0, 20)
  179. Mode.BackgroundColor = BrickColor.new("Dark grey metallic")
  180. Mode.BackgroundColor3 = Color3.new(0.352941, 0.352941, 0.352941)
  181. Mode.BackgroundTransparency = 1
  182. Mode.ZIndex = 10
  183. example.Name = "example"
  184. example.Parent = Mode
  185. example.Position = UDim2.new(0, 0, -2.3499999, 0)
  186. example.Visible = false
  187. example.Size = UDim2.new(1, 0, 2.5999999, 0)
  188. example.BackgroundColor = BrickColor.new("Institutional white")
  189. example.BackgroundColor3 = Color3.new(1, 1, 1)
  190. example.BackgroundTransparency = 1
  191. example.ZIndex = 10
  192. example.Font = Enum.Font.Code
  193. example.FontSize = Enum.FontSize.Size36
  194. example.Text = ""
  195. example.TextColor = BrickColor.new("Institutional white")
  196. example.TextColor3 = Color3.new(1, 1, 1)
  197. example.TextScaled = true
  198. example.TextSize = 36
  199. example.TextStrokeColor3 = Color3.new(0.745098, 0.745098, 0.745098)
  200. example.TextTransparency = 1
  201. example.TextWrap = true
  202. example.TextWrapped = true
  203.  
  204. local block_properties = {
  205.     ['S'] = 4,
  206.     ["BlockSize"] = Vector3.new(4,4,4),
  207. }
  208.  
  209. local blockdatas = ({
  210.     ["Grass"]={
  211.         ["Material"]=Enum.Material.Grass,
  212.         ["BrickColor"]=BrickColor.new(52/255, 142/255, 64/255),
  213.         ["Transparency"]=0,
  214.         ["Reflectance"]=0,
  215.     },
  216.     ["Wood"]={
  217.         ["Material"]=Enum.Material.WoodPlanks,
  218.         ["BrickColor"]=BrickColor.new(218/255, 134/255, 122/255),
  219.         ["Transparency"]=0,
  220.         ["Reflectance"]=0,
  221.     },
  222.     ["Stone"]={
  223.         ["Material"]=Enum.Material.Concrete,
  224.         ["BrickColor"]=BrickColor.new(163/255, 162/255, 165/255),
  225.         ["Transparency"]=0,
  226.         ["Reflectance"]=0,
  227.     },
  228.     ["Glass"]={
  229.         ["Material"]=Enum.Material.Glass,
  230.         ["BrickColor"]=BrickColor.new("Institutional white"),
  231.         ["Transparency"]=0.6,
  232.         ["Reflectance"]=1,
  233.     },
  234.     ["Sand"]={
  235.         ["Material"]=Enum.Material.Sand,
  236.         ["BrickColor"]=BrickColor.new(255/255, 204/255, 153/255),
  237.         ["Transparency"]=0,
  238.         ["Reflectance"]=0,
  239.     },
  240.     ["Gravel"]={
  241.         ["Material"]=Enum.Material.Pebble,
  242.         ["BrickColor"]=BrickColor.new(99/255, 95/255, 98/255),
  243.         ["Transparency"]=0,
  244.         ["Reflectance"]=0,
  245.     },
  246.     ["Foil"]={
  247.         ["Material"]=Enum.Material.Foil,
  248.         ["BrickColor"]=BrickColor.new(1, 1, 1),
  249.         ["Transparency"]=0,
  250.         ["Reflectance"]=0,
  251.     },
  252.     ["Neon"]={
  253.         ["Material"]=Enum.Material.Neon,
  254.         ["BrickColor"]=BrickColor.new(1, 1, 1),
  255.         ["Transparency"]=0,
  256.         ["Reflectance"]=0,
  257.     },
  258.     ["Bedrock"]={
  259.         ["Material"]=Enum.Material.Metal,
  260.         ["BrickColor"]=BrickColor.new("Really black"),
  261.         ["Transparency"]=0,
  262.         ["Reflectance"]=0,
  263.     },
  264.     ["Observer"]={
  265.         ["Material"]=Enum.Material.Metal,
  266.         ["BrickColor"]=BrickColor.new("Really black"),
  267.         ["Transparency"]=0,
  268.         ["Reflectance"]=0,
  269.     },
  270. }) --[blockType]
  271. local BlockReference = {}
  272. for i, v in pairs(blockdatas) do
  273.     table.insert(BlockReference, i)
  274.     local id = #BlockReference
  275.     v.Id = id
  276. end
  277. for i,v in pairs(blockdatas) do
  278.     totalblocks = totalblocks + 1
  279. end
  280.  
  281. local colors = {
  282.     'Default',
  283.     BrickColor.new("Institutional white"),
  284.     BrickColor.new("Ghost grey"),
  285.     BrickColor.new("Fossil"),
  286.     BrickColor.new("Smoky grey"),
  287.     BrickColor.new("Black"),
  288.     BrickColor.new("Really black"),
  289.     BrickColor.new("Really blue"),
  290.     BrickColor.new("Really red"),
  291.     BrickColor.new("Lime green"),
  292.     BrickColor.new("Bright green"),
  293.     BrickColor.new("Bright yellow"),
  294.     BrickColor.new("New Yeller"),
  295.     BrickColor.new("Bright orange"),
  296.     BrickColor.new("Brown"),
  297.     BrickColor.new("Royal purple"),
  298.     BrickColor.new("Alder"),
  299.     BrickColor.new("Cyan"),
  300.     BrickColor.new("Pink"),
  301.     BrickColor.new("Crimson"),
  302.     BrickColor.new("Brown"),
  303. }
  304.  
  305. local function Notify(text,amount)
  306.     local textbox = example:Clone()
  307.     textbox.Parent = example.Parent
  308.     textbox.Text = text
  309.     textbox.Visible = true
  310.     spawn(function()
  311.         game:GetService("TweenService"):Create(textbox,TweenInfo.new(0.25),{TextTransparency = 0}):Play()
  312.         wait(amount)
  313.         game:GetService("TweenService"):Create(textbox,TweenInfo.new(0.25),{TextTransparency = 1}):Play()
  314.         game:GetService("Debris"):AddItem(textbox,0.25)
  315.     end)
  316.     return textbox
  317. end
  318.  
  319. if currentnotify then
  320.     currentnotify.Visible = false
  321. end
  322. currentnotify = Notify("Successfully loaded KrY's MC Build script!",3)
  323.  
  324. function round(n)
  325.     return ((n + 0.5) - (n + 0.5) % 1)
  326. end
  327.  
  328. function checkcoords(pos)
  329.     local canplace = true
  330.     local r3 = Region3.new(pos-Vector3.new(5,5,5),pos+Vector3.new(5,5,5))
  331.     local parts = workspace:FindPartsInRegion3WithWhiteList(r3,{blockfolder},1/0)
  332.     for i,v in ipairs(parts) do
  333.         if v:IsA("BasePart") and v:FindFirstChild("mcblock") and v.Position == pos then
  334.             return false
  335.         end
  336.     end
  337.     return true
  338. end
  339.  
  340. function round(Num)
  341.     return math.floor(Num + 0.5)
  342. end
  343.  
  344. function place(pos,mag,ts,t)
  345.     if t then else return end
  346.     local largest = t.Size.X
  347.     local cango = true
  348.     local r3 = Region3.new(pos-Vector3.new(5,5,5),pos+Vector3.new(5,5,5))
  349.     local ph = Instance.new("Part")
  350.     local parts = workspace:FindPartsInRegion3(r3,ph,1/0)
  351.     for i,v in ipairs(parts) do
  352.         if v:IsA("BasePart") and v.Name == "Baseplate" and v:FindFirstChild("owner") then
  353.             if v.owner.Value ~= plr and Vector2.new(pos.X-v.Position.X).magnitude < v.range.Value and Vector2.new(pos.Z-v.Position.Z).magnitude < v.range.Value then
  354.                 cango = false  
  355.                 break
  356.             elseif v.Position == pos then
  357.                 cango = false
  358.                 break
  359.             end
  360.         end
  361.     end
  362.     if t.Size.Y > largest then
  363.         largest = t.Size.Y
  364.         if t.Size.Z > largest then
  365.             largest = t.Size.Z
  366.         end
  367.     end
  368.     if 10 >= mag and cango then
  369.         if t.Name == "Base" or t.Name == "Baseplate" then
  370.             pos = Vector3.new(round(pos.X/block_properties.S)*block_properties.S,round(pos.Y/block_properties.S)*block_properties.S,round(pos.Z/block_properties.S)*block_properties.S) + Vector3.new(0,block_properties.BlockSize.Y/2,0)
  371.         else
  372.             if ts == "Top" then
  373.                 pos = t.CFrame * CFrame.new(0,block_properties.BlockSize.Y,0)
  374.             elseif ts == "Left" then
  375.                 pos = t.CFrame * CFrame.new(-block_properties.BlockSize.X,0,0)
  376.             elseif ts == "Right" then
  377.                 pos = t.CFrame * CFrame.new(block_properties.BlockSize.X,0,0)
  378.             elseif ts == "Front" then
  379.                 pos = t.CFrame * CFrame.new(0,0,-block_properties.BlockSize.Z)
  380.             elseif ts == "Back" then
  381.                 pos = t.CFrame * CFrame.new(0,0,block_properties.BlockSize.Z)
  382.             elseif ts == "Bottom" then
  383.                 pos = t.CFrame * CFrame.new(0,-block_properties.BlockSize.Y,0)
  384.             end
  385.             pos = pos.Position;
  386.             pos = Vector3.new(round(pos.X/block_properties.S)*block_properties.S,round(pos.Y/block_properties.S)*block_properties.S,round(pos.Z/block_properties.S)*block_properties.S) + Vector3.new(0,-block_properties.BlockSize.Y/2,0)
  387.         end
  388.         if checkcoords(pos) == true and cango then
  389.             local block
  390.             if (blockType == "Observer") then
  391.                 block = create_observer()
  392.                 block.Parent = blockfolder
  393.             end
  394.             block = block or Instance.new("Part",blockfolder)
  395.             block.Name = "block"
  396.             block.Size = block_properties.BlockSize
  397.             block.Position = pos
  398.             block.Orientation = rot
  399.             block.Material = blockdatas[blockType]['Material']
  400.             local bval = Instance.new("StringValue")
  401.             bval.Name = 'blocktype'
  402.             bval.Value = blockType
  403.             bval.Parent = block
  404.             local cval = Instance.new("NumberValue")
  405.             cval.Name = 'colorid'
  406.             cval.Value = colorid
  407.             cval.Parent = block
  408.             if colors[colorid] == 'Default' then
  409.                 block.BrickColor = blockdatas[blockType]['BrickColor']
  410.             else
  411.                 block.BrickColor = colors[colorid]
  412.             end
  413.             block.Transparency = blockdatas[blockType]['Transparency']
  414.             block.Reflectance = blockdatas[blockType]['Reflectance']
  415.             block.Anchored = true
  416.             block.CanCollide = true
  417.         end
  418.     end
  419. end
  420.  
  421. function delete(pos,mag,ts,t)
  422.     if t and t.Parent and ((string.match(t.Parent.Name,'blockfolder') and t.Parent:IsA("Folder")) or t:IsDescendantOf(blockfolder)) then
  423.         t:Destroy()
  424.     end
  425. end
  426.  
  427. function change(pos,mag,ts,t)
  428.     if t and t.Parent and ((string.match(t.Parent.Name,'blockfolder') and t.Parent:IsA("Folder")) or t:IsDescendantOf(blockfolder)) then
  429.         blockType = t['blocktype'].Value
  430.         colorid = t['colorid'].Value
  431.         if currentnotify then
  432.             currentnotify.Visible = false
  433.         end
  434.         currentnotify = Notify("Block: " ..blockType,2)
  435.     end
  436. end
  437.  
  438. local remote = Instance.new("RemoteEvent")
  439. remote.Parent = plr['PlayerGui']
  440. local sv = Instance.new("ObjectValue")
  441. sv.Name = 'script'
  442. sv.Value = script
  443. sv.Parent = remote
  444.  
  445. ls = [[
  446. plr = game:GetService("Players").LocalPlayer
  447. mouse = plr:GetMouse()
  448. remote = script.Parent
  449. sv = remote:FindFirstChild("script").Value
  450. local last_data = {pos = Vector3.new(),mag = 0,'Front',nil}
  451. local blockType = 'Grass'
  452. local rot = Vector3.new()
  453. local colorid = 1
  454. local blockmode = 1
  455. local totalblocks = 0
  456. local selectmode = 1
  457. local currentnotify
  458.  
  459. local preplace = nil
  460. local preplacepart = nil
  461. local highlight = nil
  462. local placing = true
  463. local lastmpos = nil
  464. local lasttarget = nil
  465. local block_properties = {
  466.     ['S'] = 4,
  467.     ["BlockSize"] = Vector3.new(4,4,4),
  468. }
  469.  
  470. local blockdatas = ({
  471.     ["Grass"]={
  472.         ["Material"]=Enum.Material.Grass,
  473.         ["BrickColor"]=BrickColor.new(52/255, 142/255, 64/255),
  474.         ["Transparency"]=0,
  475.         ["Reflectance"]=0,
  476.     },
  477.     ["Wood"]={
  478.         ["Material"]=Enum.Material.WoodPlanks,
  479.         ["BrickColor"]=BrickColor.new(218/255, 134/255, 122/255),
  480.         ["Transparency"]=0,
  481.         ["Reflectance"]=0,
  482.     },
  483.     ["Stone"]={
  484.         ["Material"]=Enum.Material.Concrete,
  485.         ["BrickColor"]=BrickColor.new(163/255, 162/255, 165/255),
  486.         ["Transparency"]=0,
  487.         ["Reflectance"]=0,
  488.     },
  489.     ["Glass"]={
  490.         ["Material"]=Enum.Material.Glass,
  491.         ["BrickColor"]=BrickColor.new("Institutional white"),
  492.         ["Transparency"]=0.6,
  493.         ["Reflectance"]=1,
  494.     },
  495.     ["Sand"]={
  496.         ["Material"]=Enum.Material.Sand,
  497.         ["BrickColor"]=BrickColor.new(255/255, 204/255, 153/255),
  498.         ["Transparency"]=0,
  499.         ["Reflectance"]=0,
  500.     },
  501.     ["Gravel"]={
  502.         ["Material"]=Enum.Material.Pebble,
  503.         ["BrickColor"]=BrickColor.new(99/255, 95/255, 98/255),
  504.         ["Transparency"]=0,
  505.         ["Reflectance"]=0,
  506.     },
  507.     ["Foil"]={
  508.         ["Material"]=Enum.Material.Foil,
  509.         ["BrickColor"]=BrickColor.new(1, 1, 1),
  510.         ["Transparency"]=0,
  511.         ["Reflectance"]=0,
  512.     },
  513.     ["Neon"]={
  514.         ["Material"]=Enum.Material.Neon,
  515.         ["BrickColor"]=BrickColor.new(1, 1, 1),
  516.         ["Transparency"]=0,
  517.         ["Reflectance"]=0,
  518.     },
  519.     ["Bedrock"]={
  520.         ["Material"]=Enum.Material.Metal,
  521.         ["BrickColor"]=BrickColor.new("Really black"),
  522.         ["Transparency"]=0,
  523.         ["Reflectance"]=0,
  524.     },
  525.     ["Observer"]={
  526.         ["Material"]=Enum.Material.Metal,
  527.         ["BrickColor"]=BrickColor.new("Really black"),
  528.         ["Transparency"]=0,
  529.         ["Reflectance"]=0,
  530.     },
  531. }) --[blockType]
  532. local BlockReference = {}
  533. for i, v in pairs(blockdatas) do
  534.     table.insert(BlockReference, i)
  535.     local id = #BlockReference
  536.     v.Id = id
  537. end
  538. for i,v in pairs(blockdatas) do
  539.     totalblocks = totalblocks + 1
  540. end
  541.  
  542. local blockfolder = workspace:FindFirstChild('blockfolder')
  543.  
  544. local colors = {
  545.     'Default',
  546.     BrickColor.new("Institutional white"),
  547.     BrickColor.new("Ghost grey"),
  548.     BrickColor.new("Fossil"),
  549.     BrickColor.new("Smoky grey"),
  550.     BrickColor.new("Black"),
  551.     BrickColor.new("Really black"),
  552.     BrickColor.new("Really blue"),
  553.     BrickColor.new("Really red"),
  554.     BrickColor.new("Lime green"),
  555.     BrickColor.new("Bright green"),
  556.     BrickColor.new("Bright yellow"),
  557.     BrickColor.new("New Yeller"),
  558.     BrickColor.new("Bright orange"),
  559.     BrickColor.new("Brown"),
  560.     BrickColor.new("Royal purple"),
  561.     BrickColor.new("Alder"),
  562.     BrickColor.new("Cyan"),
  563.     BrickColor.new("Pink"),
  564.     BrickColor.new("Crimson"),
  565.     BrickColor.new("Brown"),
  566. }
  567. function update_build()
  568.     if not blockfolder or not blockfolder.Parent then
  569.         blockfolder = workspace:FindFirstChild('blockfolder')
  570.         return
  571.     end
  572.     if placing then
  573.     if not preplacepart or not preplacepart.Parent or not preplace or not preplace.Parent or not highlight or not highlight.Parent then
  574.         if preplace then preplace:Destroy() end
  575.         preplacepart = Instance.new("Part")
  576.         preplace = Instance.new("BlockMesh")
  577.         preplacepart.Parent = sv
  578.         preplacepart.CFrame = CFrame.new(0,0,0)
  579.         preplacepart.Transparency = 0.5
  580.         preplacepart.Size = Vector3.new(0, 0, 0)
  581.         preplacepart.Anchored = true
  582.         preplacepart.CanCollide = false
  583.         highlight = Instance.new("SelectionBox")
  584.         highlight.Adornee = nil -- preplacepart
  585.         highlight.LineThickness = 0.1
  586.         highlight.Parent = preplacepart
  587.         local BillboardGui0 = Instance.new("BillboardGui")
  588.         local TextBox1 = Instance.new("TextBox")
  589.         BillboardGui0.Parent = preplacepart
  590.         BillboardGui0.Size = UDim2.new(0, 200, 1, 0)
  591.         BillboardGui0.Active = true
  592.         BillboardGui0.ClipsDescendants = true
  593.         BillboardGui0.AlwaysOnTop = true
  594.         TextBox1.Parent = BillboardGui0
  595.         TextBox1.Size = UDim2.new(1, 0, 1, 0)
  596.         TextBox1.BackgroundColor = BrickColor.new("Institutional white")
  597.         TextBox1.BackgroundColor3 = Color3.new(1, 1, 1)
  598.         TextBox1.BackgroundTransparency = 1
  599.         TextBox1.BorderSizePixel = 0
  600.         TextBox1.ZIndex = 2
  601.         TextBox1.Font = Enum.Font.SourceSansBold
  602.         TextBox1.FontSize = Enum.FontSize.Size14
  603.         TextBox1.Text = plr.Name
  604.         TextBox1.TextColor = BrickColor.new("Institutional white")
  605.         TextBox1.TextColor3 = Color3.new(1, 1, 1)
  606.         TextBox1.TextScaled = true
  607.         TextBox1.TextSize = 14
  608.         TextBox1.TextStrokeTransparency = 0
  609.         TextBox1.TextWrap = true
  610.         TextBox1.TextWrapped = true
  611.         if selectmode == 1 then
  612.             preplacepart.Material = blockdatas[blockType]['Material']
  613.             if colors[colorid] == 'Default' then
  614.                 preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  615.             else
  616.                 preplacepart.BrickColor = colors[colorid]
  617.             end
  618.             preplacepart.Reflectance = blockdatas[blockType]['Reflectance']
  619.             highlight.Color3 = Color3.fromRGB(49, 255, 26)
  620.         elseif selectmode == 2 then
  621.             preplacepart.Material = Enum.Material.Neon
  622.             preplacepart.BrickColor = BrickColor.new("Really red")
  623.             highlight.Color3 = Color3.fromRGB(255, 0, 0)
  624.         elseif selectmode == 3 then
  625.             preplacepart.Material = Enum.Material.Neon
  626.             preplacepart.BrickColor = BrickColor.new("New Yeller")
  627.             highlight.Color3 = Color3.fromRGB(255, 255, 0)
  628.         end
  629.         preplace.Parent = preplacepart
  630.         local S = block_properties.S*2*10
  631.         preplace.Scale = Vector3.new(S,S,S)
  632.     end
  633.     --pcall(function()
  634.     if preplacepart and preplacepart.Parent then
  635.         local pos,mag,ts,t = last_data.pos,last_data.mag,last_data.ts,last_data.t
  636.         if t then else return end
  637.         local largest = t.Size.X
  638.         local cango = true
  639.         local r3 = Region3.new(pos-Vector3.new(5,5,5),pos+Vector3.new(5,5,5))
  640.         local ph = Instance.new("Part")
  641.         local parts = workspace:FindPartsInRegion3(r3,ph,1/0)
  642.         for i,v in ipairs(parts) do
  643.             if v:IsA("BasePart") and v.Name == "Baseplate" and v:FindFirstChild("owner") then
  644.                 if v.owner.Value ~= plr and Vector2.new(pos.X-v.Position.X).magnitude < v.range.Value and Vector2.new(pos.Z-v.Position.Z).magnitude < v.range.Value then
  645.                     cango = false  
  646.                     break
  647.                 elseif v.Position == pos then
  648.                     cango = false
  649.                     break
  650.                 end
  651.             end
  652.         end
  653.         if t.Size.Y > largest then
  654.             largest = t.Size.Y
  655.             if t.Size.Z > largest then
  656.                 largest = t.Size.Z
  657.             end
  658.         end
  659.         if 10 >= mag and t ~= nil then
  660.             local function round(Num)
  661.                 return math.floor(Num + 0.5)
  662.             end
  663.             if t.Name == "Base" or t.Name == "Baseplate" then
  664.                 pos = Vector3.new(round(pos.X/block_properties.S)*block_properties.S,round(pos.Y/block_properties.S)*block_properties.S,round(pos.Z/block_properties.S)*block_properties.S) + Vector3.new(0,block_properties.BlockSize.Y/2,0)
  665.             else
  666.                 if ts == "Top" then
  667.                     pos = t.CFrame * CFrame.new(0,block_properties.BlockSize.Y,0)
  668.                 elseif ts == "Left" then
  669.                     pos = t.CFrame * CFrame.new(-block_properties.BlockSize.X,0,0)
  670.                 elseif ts == "Right" then
  671.                     pos = t.CFrame * CFrame.new(block_properties.BlockSize.X,0,0)
  672.                 elseif ts == "Front" then
  673.                     pos = t.CFrame * CFrame.new(0,0,-block_properties.BlockSize.Z)
  674.                 elseif ts == "Back" then
  675.                     pos = t.CFrame * CFrame.new(0,0,block_properties.BlockSize.Z)
  676.                 elseif ts == "Bottom" then
  677.                     pos = t.CFrame * CFrame.new(0,-block_properties.BlockSize.Y,0)
  678.                 end
  679.                 pos = pos.Position;
  680.                 pos = Vector3.new(round(pos.X/block_properties.S)*block_properties.S,round(pos.Y/block_properties.S)*block_properties.S,round(pos.Z/block_properties.S)*block_properties.S) + Vector3.new(0,-block_properties.BlockSize.Y/2,0)
  681.             end
  682.             if (selectmode == 2 or selectmode == 3) and ((string.match(t.Parent.Name,'blockfolder') and t.Parent:IsA("Folder")) or t:IsDescendantOf(blockfolder)) then
  683.                 preplacepart.Position = t.Position
  684.             else
  685.                 preplacepart.Position = pos
  686.             end
  687.             preplacepart.Orientation = rot
  688.         end
  689.     end
  690.     --end)
  691.     end
  692. end
  693. mouse.KeyDown:Connect(function(key)
  694.     local pos = mouse.Hit.p
  695.     local mag = 0 -- (plr.Character.HumanoidRootPart.Position - pos).magnitude
  696.     local ts = mouse.TargetSurface.Name
  697.     local t = mouse.Target
  698.     last_data = {pos = pos,mag = mag,ts = ts,t = t}
  699.     if key == "q" or key == "e" then
  700.         if placing then
  701.             if key == 'e' and selectmode == 1 then
  702.                 if blockmode == totalblocks then
  703.                     blockmode = 1
  704.                     blockType = BlockReference[blockmode]
  705.                     if preplacepart then
  706.                         preplacepart.Material = blockdatas[blockType]['Material']
  707.                         preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  708.                     end
  709.                 else
  710.                     blockmode = blockmode + 1
  711.                     blockType = BlockReference[blockmode]
  712.                     if preplacepart then
  713.                         preplacepart.Material = blockdatas[blockType]['Material']
  714.                         preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  715.                     end
  716.                 end
  717.             elseif key == 'q' and selectmode == 1 then
  718.                 if blockmode == 1 then
  719.                     blockmode = totalblocks
  720.                     blockType = BlockReference[blockmode]
  721.                     if preplacepart then
  722.                         preplacepart.Material = blockdatas[blockType]['Material']
  723.                         preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  724.                     end
  725.                 else
  726.                     blockmode = blockmode - 1
  727.                     blockType = BlockReference[blockmode]
  728.                     if preplacepart then
  729.                         preplacepart.Material = blockdatas[blockType]['Material']
  730.                         preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  731.                     end
  732.                 end
  733.             end
  734.         end
  735.         remote:FireServer(last_data,2,key)
  736.     end
  737.     if key == "v" then
  738.         placing = not placing
  739.         if not placing then
  740.             if preplace then
  741.                 preplace:Destroy()
  742.             end
  743.             if preplacepart then
  744.                 preplacepart:Destroy()
  745.             end
  746.         end
  747.         remote:FireServer(last_data,3)
  748.     end
  749.     if key == "f" then
  750.         if placing then
  751.             selectmode = selectmode + 1
  752.             if selectmode > 3 then
  753.                 selectmode = 1
  754.             end
  755.             if selectmode == 1 and preplacepart and preplacepart.Parent and highlight and highlight.Parent then
  756.                 preplacepart.Material = blockdatas[blockType]['Material']
  757.                 if colors[colorid] == 'Default' then
  758.                     preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  759.                 else
  760.                     preplacepart.BrickColor = colors[colorid]
  761.                 end
  762.                 preplacepart.Reflectance = blockdatas[blockType]['Reflectance']
  763.                 highlight.Color3 = Color3.fromRGB(49, 255, 26)
  764.             elseif selectmode == 2 and preplacepart and preplacepart.Parent and highlight and highlight.Parent then
  765.                 if preplacepart.Parent then
  766.                     preplacepart.Material = Enum.Material.Neon
  767.                     preplacepart.BrickColor = BrickColor.new("Really red")
  768.                     highlight.Color3 = Color3.fromRGB(255, 0, 0)
  769.                 end
  770.             elseif selectmode == 3 and preplacepart and preplacepart.Parent and highlight and highlight.Parent then
  771.                 if preplacepart.Parent then
  772.                     preplacepart.Material = Enum.Material.Neon
  773.                     preplacepart.BrickColor = BrickColor.new("New Yeller")
  774.                     highlight.Color3 = Color3.fromRGB(255, 255, 0)
  775.                 end
  776.             end
  777.         end
  778.         remote:FireServer(last_data,4)
  779.     end
  780.     if key == "g" or key == "h" then
  781.         if selectmode == 1 and placing then
  782.             if key == 'g' then
  783.                 colorid = colorid - 1
  784.                 if 1 > colorid then
  785.                     colorid = #colors
  786.                 end
  787.             elseif key == 'h' then
  788.                 colorid = colorid + 1
  789.                 if colorid > #colors then
  790.                     colorid = 1
  791.                 end
  792.             end
  793.             if colors[colorid] == 'Default' then
  794.                 preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  795.             else
  796.                 preplacepart.BrickColor = colors[colorid]
  797.             end
  798.         end
  799.         remote:FireServer(last_data,6,key)
  800.     end
  801.     if key == "r" or key == "t" or key == "y" then
  802.         if selectmode == 1 and placing then
  803.             if key == 't' then
  804.                 rot = rot + Vector3.new(90,0,0)
  805.             elseif key == 'r' then
  806.                 rot = rot + Vector3.new(0,90,0)
  807.             elseif key == 'y' then
  808.                 rot = rot + Vector3.new(0,0,90)
  809.             end
  810.         end
  811.         remote:FireServer(last_data,7,key)
  812.     end
  813. end)
  814. mouse.Button1Down:Connect(function()
  815.     local pos = mouse.Hit.p
  816.     local mag = 0 -- (plr.Character.HumanoidRootPart.Position - pos).magnitude
  817.     local ts = mouse.TargetSurface.Name
  818.     local t = mouse.Target
  819.     last_data = {pos = pos,mag = mag,ts = ts,t = t}
  820.     remote:FireServer(last_data,1)
  821. end)
  822. mouse.Button1Up:Connect(function()
  823.     local pos = mouse.Hit.p
  824.     local mag = 0 -- (plr.Character.HumanoidRootPart.Position - pos).magnitude
  825.     local ts = mouse.TargetSurface.Name
  826.     local t = mouse.Target
  827.     last_data = {pos = pos,mag = mag,ts = ts,t = t}
  828.     remote:FireServer(last_data,5)
  829. end)
  830. game:GetService("RunService").RenderStepped:Connect(function()
  831.     local pos = mouse.Hit.p
  832.     local mag = 0 -- (plr.Character.HumanoidRootPart.Position - pos).magnitude
  833.     local ts = mouse.TargetSurface.Name
  834.     local t = mouse.Target
  835.     last_data = {pos = pos,mag = mag,ts = ts,t = t}
  836.     update_build()
  837.     remote:FireServer(last_data,0)
  838. end)
  839. ]]
  840.  
  841. NLS(ls,remote)
  842.  
  843. local last_data = {pos = Vector3.new(),mag = 0,'Front',nil}
  844.  
  845. function update_build()
  846.     if not blockfolder or not blockfolder.Parent then
  847.         blockfolder = Instance.new("Folder")
  848.         blockfolder.Name = ('blockfolder')
  849.         blockfolder.Parent = workspace
  850.     end
  851.     if true then return end -- ignore the rest of the client sided code
  852.     if placing then
  853.         if not preplacepart or not preplacepart.Parent or not preplace or not preplace.Parent or not highlight or not highlight.Parent then
  854.             if preplace then preplace:Destroy() end
  855.             preplacepart = Instance.new("Part")
  856.             preplace = Instance.new("BlockMesh")
  857.             preplacepart.Parent = script
  858.             preplacepart.CFrame = CFrame.new(0,0,0)
  859.             preplacepart.Transparency = 0.5
  860.             preplacepart.Size = Vector3.new(0, 0, 0)
  861.             preplacepart.Anchored = true
  862.             preplacepart.CanCollide = false
  863.             highlight = Instance.new("SelectionBox")
  864.             highlight.Adornee = nil -- preplacepart
  865.             highlight.LineThickness = 0.1
  866.             highlight.Parent = preplacepart
  867.             local BillboardGui0 = Instance.new("BillboardGui")
  868.             local TextBox1 = Instance.new("TextBox")
  869.             BillboardGui0.Parent = preplacepart
  870.             BillboardGui0.Size = UDim2.new(0, 200, 1, 0)
  871.             BillboardGui0.Active = true
  872.             BillboardGui0.ClipsDescendants = true
  873.             BillboardGui0.AlwaysOnTop = true
  874.             TextBox1.Parent = BillboardGui0
  875.             TextBox1.Size = UDim2.new(1, 0, 1, 0)
  876.             TextBox1.BackgroundColor = BrickColor.new("Institutional white")
  877.             TextBox1.BackgroundColor3 = Color3.new(1, 1, 1)
  878.             TextBox1.BackgroundTransparency = 1
  879.             TextBox1.BorderSizePixel = 0
  880.             TextBox1.ZIndex = 2
  881.             TextBox1.Font = Enum.Font.SourceSansBold
  882.             TextBox1.FontSize = Enum.FontSize.Size14
  883.             TextBox1.Text = plr.Name
  884.             TextBox1.TextColor = BrickColor.new("Institutional white")
  885.             TextBox1.TextColor3 = Color3.new(1, 1, 1)
  886.             TextBox1.TextScaled = true
  887.             TextBox1.TextSize = 14
  888.             TextBox1.TextStrokeTransparency = 0
  889.             TextBox1.TextWrap = true
  890.             TextBox1.TextWrapped = true
  891.             if selectmode == 1 then
  892.                 preplacepart.Material = blockdatas[blockType]['Material']
  893.                 if colors[colorid] == 'Default' then
  894.                     preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  895.                 else
  896.                     preplacepart.BrickColor = colors[colorid]
  897.                 end
  898.                 preplacepart.Reflectance = blockdatas[blockType]['Reflectance']
  899.                 highlight.Color3 = Color3.fromRGB(49, 255, 26)
  900.             elseif selectmode == 2 then
  901.                 preplacepart.Material = Enum.Material.Neon
  902.                 preplacepart.BrickColor = BrickColor.new("Really red")
  903.                 highlight.Color3 = Color3.fromRGB(255, 0, 0)
  904.             elseif selectmode == 3 then
  905.                 preplacepart.Material = Enum.Material.Neon
  906.                 preplacepart.BrickColor = BrickColor.new("New Yeller")
  907.                 highlight.Color3 = Color3.fromRGB(255, 255, 0)
  908.             end
  909.             preplace.Parent = preplacepart
  910.             local S = block_properties.S*2*10
  911.             preplace.Scale = Vector3.new(S,S,S)
  912.         end
  913.         if preplacepart and preplacepart.Parent then
  914.             local pos,mag,ts,t = last_data.pos,last_data.mag,last_data.ts,last_data.t
  915.             if t then else return end
  916.             local largest = t.Size.X
  917.             local cango = true
  918.             local r3 = Region3.new(pos-Vector3.new(5,5,5),pos+Vector3.new(5,5,5))
  919.             local ph = Instance.new("Part")
  920.             local parts = workspace:FindPartsInRegion3(r3,ph,1/0)
  921.             for i,v in ipairs(parts) do
  922.                 if v:IsA("BasePart") and v.Name == "Baseplate" and v:FindFirstChild("owner") then
  923.                     if v.owner.Value ~= plr and Vector2.new(pos.X-v.Position.X).magnitude < v.range.Value and Vector2.new(pos.Z-v.Position.Z).magnitude < v.range.Value then
  924.                         cango = false  
  925.                         break
  926.                     elseif v.Position == pos then
  927.                         cango = false
  928.                         break
  929.                     end
  930.                 end
  931.             end
  932.             if t.Size.Y > largest then
  933.                 largest = t.Size.Y
  934.                 if t.Size.Z > largest then
  935.                     largest = t.Size.Z
  936.                 end
  937.             end
  938.             if 10 >= mag and t ~= nil then
  939.                 local function round(Num)
  940.                     return math.floor(Num + 0.5)
  941.                 end
  942.                 if t.Name == "Base" or t.Name == "Baseplate" then
  943.                     pos = Vector3.new(round(pos.X/block_properties.S)*block_properties.S,round(pos.Y/block_properties.S)*block_properties.S,round(pos.Z/block_properties.S)*block_properties.S) + Vector3.new(0,block_properties.BlockSize.Y/2,0)
  944.                 else
  945.                     if ts == "Top" then
  946.                         pos = t.CFrame * CFrame.new(0,block_properties.BlockSize.Y,0)
  947.                     elseif ts == "Left" then
  948.                         pos = t.CFrame * CFrame.new(-block_properties.BlockSize.X,0,0)
  949.                     elseif ts == "Right" then
  950.                         pos = t.CFrame * CFrame.new(block_properties.BlockSize.X,0,0)
  951.                     elseif ts == "Front" then
  952.                         pos = t.CFrame * CFrame.new(0,0,-block_properties.BlockSize.Z)
  953.                     elseif ts == "Back" then
  954.                         pos = t.CFrame * CFrame.new(0,0,block_properties.BlockSize.Z)
  955.                     elseif ts == "Bottom" then
  956.                         pos = t.CFrame * CFrame.new(0,-block_properties.BlockSize.Y,0)
  957.                     end
  958.                     pos = pos.Position;
  959.                     pos = Vector3.new(round(pos.X/block_properties.S)*block_properties.S,round(pos.Y/block_properties.S)*block_properties.S,round(pos.Z/block_properties.S)*block_properties.S) + Vector3.new(0,-block_properties.BlockSize.Y/2,0)
  960.                 end
  961.                 if (selectmode == 2 or selectmode == 3) and ((string.match(t.Parent.Name,'blockfolder') and t.Parent:IsA("Folder")) or t:IsDescendantOf(blockfolder)) then
  962.                     preplacepart.Position = t.Position
  963.                 else
  964.                     preplacepart.Position = pos
  965.                 end
  966.                 preplacepart.Orientation = rot
  967.             end
  968.         end
  969.     end
  970. end
  971.  
  972. spawn(function()
  973.     while remote do
  974.         update_observers()
  975.         update_build()
  976.         wait()
  977.     end
  978.     script:Destroy()
  979. end)
  980.  
  981. warn([[
  982. == CONTROLS ==
  983. Q or E - Change Block
  984. G or H - Change Color
  985. R,T,Y - Orientate Block
  986. F - Toggle Place,Break,EyeDropper
  987. V - Disable Building
  988. Click(Hold) - Place or Destroy
  989. ]])
  990.  
  991. remote.OnServerEvent:Connect(function(lplr,data,mode,key)
  992.     if plr == lplr then else return end
  993.     if data then
  994.         last_data = data
  995.     end
  996.     if mode == 1 and placing then
  997.         clickid = clickid + 1
  998.         _clickid = clickid
  999.         holding = true
  1000.         if selectmode == 1 and blockfolder and blockfolder.Parent then
  1001.             place(last_data.pos,last_data.mag,last_data.ts,last_data.t)
  1002.         elseif selectmode == 2 --[[(preplace and preplacepart)]] then
  1003.             delete(last_data.pos,last_data.mag,last_data.ts,last_data.t)
  1004.         elseif selectmode == 3 then
  1005.             change(last_data.pos,last_data.mag,last_data.ts,last_data.t)
  1006.         end
  1007.         spawn(function()
  1008.             wait(0.1)
  1009.             while holding and (clickid == _clickid) do
  1010.                 wait(0.1)
  1011.                 if holding and (clickid == _clickid) then
  1012.                     if selectmode == 1 and blockfolder and blockfolder.Parent then
  1013.                         place(last_data.pos,last_data.mag,last_data.ts,last_data.t)
  1014.                     elseif selectmode == 2 --[[(preplace and preplacepart)]] then
  1015.                         delete(last_data.pos,last_data.mag,last_data.ts,last_data.t)
  1016.                     elseif selectmode == 3 then
  1017.                         change(last_data.pos,last_data.mag,last_data.ts,last_data.t)
  1018.                     end
  1019.                 end
  1020.             end
  1021.         end)
  1022.     elseif mode == 2 and placing then
  1023.         if key == 'e' and selectmode == 1 then
  1024.             if blockmode == totalblocks then
  1025.                 blockmode = 1
  1026.                 blockType = BlockReference[blockmode]
  1027.                 if preplacepart then
  1028.                     preplacepart.Material = blockdatas[blockType]['Material']
  1029.                     preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  1030.                 end
  1031.             else
  1032.                 blockmode = blockmode + 1
  1033.                 blockType = BlockReference[blockmode]
  1034.                 if preplacepart then
  1035.                     preplacepart.Material = blockdatas[blockType]['Material']
  1036.                     preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  1037.                 end
  1038.             if currentnotify then
  1039.                 currentnotify.Visible = false
  1040.             end
  1041.             currentnotify = Notify("Block: " ..BlockReference[blockmode],2)
  1042.             end
  1043.         elseif key == 'q' and selectmode == 1 then
  1044.             if blockmode == 1 then
  1045.                 blockmode = totalblocks
  1046.                 blockType = BlockReference[blockmode]
  1047.                 if preplacepart then
  1048.                     preplacepart.Material = blockdatas[blockType]['Material']
  1049.                     preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  1050.                 end
  1051.             else
  1052.                 blockmode = blockmode - 1
  1053.                 blockType = BlockReference[blockmode]
  1054.                 if preplacepart then
  1055.                     preplacepart.Material = blockdatas[blockType]['Material']
  1056.                     preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  1057.                 end
  1058.             end
  1059.             if currentnotify then
  1060.                 currentnotify.Visible = false
  1061.             end
  1062.             currentnotify = Notify("Block: " ..BlockReference[blockmode],2)
  1063.         end
  1064.     elseif mode == 3 then
  1065.         if currentnotify then
  1066.             currentnotify.Visible = false
  1067.         end
  1068.         placing = not placing
  1069.         if not placing then
  1070.             currentnotify = Notify("Mode: Disabled",2)
  1071.         else
  1072.             currentnotify = Notify("Mode: Enabled",2)
  1073.         end
  1074.         if not placing then
  1075.             if preplace then
  1076.                 preplace:Destroy()
  1077.             end
  1078.             if preplacepart then
  1079.                 preplacepart:Destroy()
  1080.             end
  1081.         end
  1082.     elseif mode == 4 and placing then
  1083.         selectmode = selectmode + 1
  1084.         if selectmode > 3 then
  1085.             selectmode = 1
  1086.         end
  1087.         if currentnotify then
  1088.             currentnotify.Visible = false
  1089.         end
  1090.         if selectmode == 1 then
  1091.             if preplacepart and preplacepart.Parent and highlight and highlight.Parent then
  1092.                 preplacepart.Material = blockdatas[blockType]['Material']
  1093.                 if colors[colorid] == 'Default' then
  1094.                     preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  1095.                 else
  1096.                     preplacepart.BrickColor = colors[colorid]
  1097.                 end
  1098.                 preplacepart.Reflectance = blockdatas[blockType]['Reflectance']
  1099.                 highlight.Color3 = Color3.fromRGB(49, 255, 26)
  1100.             end
  1101.             currentnotify = Notify("Mode: Place",2)
  1102.         elseif selectmode == 2 then
  1103.             if preplacepart and preplacepart.Parent and highlight and highlight.Parent then
  1104.                 preplacepart.Material = Enum.Material.Neon
  1105.                 preplacepart.BrickColor = BrickColor.new("Really red")
  1106.                 highlight.Color3 = Color3.fromRGB(255, 0, 0)
  1107.             end
  1108.             currentnotify = Notify("Mode: Delete",2)
  1109.         elseif selectmode == 3 then
  1110.             if preplacepart and preplacepart.Parent and highlight and highlight.Parent then
  1111.                 preplacepart.Material = Enum.Material.Neon
  1112.                 preplacepart.BrickColor = BrickColor.new("New Yeller")
  1113.                 highlight.Color3 = Color3.fromRGB(255, 255, 0)
  1114.             end
  1115.             currentnotify = Notify("Mode: EyeDropper",2)
  1116.         end
  1117.     elseif mode == 5 then
  1118.         holding = false
  1119.         clickid = clickid + 1
  1120.     elseif mode == 6 and selectmode == 1 and placing then
  1121.         if key == 'g' then
  1122.             colorid = colorid - 1
  1123.             if 1 > colorid then
  1124.                 colorid = #colors
  1125.             end
  1126.         elseif key == 'h' then
  1127.             colorid = colorid + 1
  1128.             if colorid > #colors then
  1129.                 colorid = 1
  1130.             end
  1131.         end
  1132.         if currentnotify then
  1133.             currentnotify.Visible = false
  1134.         end
  1135.         if preplacepart then
  1136.             if colors[colorid] == 'Default' then
  1137.                 preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  1138.             else
  1139.                 preplacepart.BrickColor = colors[colorid]
  1140.             end
  1141.         end
  1142.         currentnotify = Notify("Color: " ..tostring(colors[colorid]),2)
  1143.     elseif mode == 7 and selectmode == 1 and placing then
  1144.         if key == 't' then
  1145.             rot = rot + Vector3.new(90,0,0)
  1146.         elseif key == 'r' then
  1147.             rot = rot + Vector3.new(0,90,0)
  1148.         elseif key == 'y' then
  1149.             rot = rot + Vector3.new(0,0,90)
  1150.         end
  1151.     end
  1152. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement