Advertisement
KrYn0MoRe

mc build v3

Jun 9th, 2020 (edited)
446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 35.17 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(plr.UserId .. 'blockfolder')
  163.  
  164. if not blockfolder then
  165.     blockfolder = Instance.new("Folder")
  166.     blockfolder.Name = (plr.UserId .. '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.     spawn(function()
  312.     local Info = TweenInfo.new(.25,Enum.EasingStyle.Linear)
  313.     game:GetService("TweenService"):Create(textbox,Info,{TextTransparency = 0}):Play()
  314.     end)
  315.     wait(amount)
  316.     spawn(function()
  317.     local Info = TweenInfo.new(.25,Enum.EasingStyle.Linear)
  318.     game:GetService("TweenService"):Create(textbox,Info,{TextTransparency = 1}):Play()
  319.     wait(.25)
  320.     textbox:Destroy()
  321.     end)
  322.     end)
  323.     return textbox
  324. end
  325.  
  326. if currentnotify then
  327.     currentnotify.Visible = false
  328. end
  329. currentnotify = Notify("Successfully loaded KrY's MC Build script!",3)
  330.  
  331. function round(n)
  332.     return ((n + 0.5) - (n + 0.5) % 1)
  333. end
  334.  
  335. function checkcoords(pos)
  336.     local canplace = true
  337.     for i,v in pairs(workspace:GetDescendants()) do
  338.         if v:IsA("BasePart") and v:FindFirstChild("mcblock") and v.Position == pos then
  339.             canplace = false
  340.         end
  341.     end
  342.     return canplace
  343. end
  344.  
  345. function place(pos,mag,ts,t)
  346.     if t then else return end
  347.     local largest = t.Size.X
  348.     local cango = true
  349.     for i,v in pairs(workspace:GetDescendants()) do
  350.         if v:IsA("BasePart") and v.Name == "Baseplate" and v:FindFirstChild("owner") then
  351.             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
  352.                 cango = false
  353.             end
  354.         end
  355.     end
  356.     if t.Size.Y > largest then
  357.         largest = t.Size.Y
  358.         if t.Size.Z > largest then
  359.             largest = t.Size.Z
  360.         end
  361.     end
  362.     if 10 >= mag and t ~= nil then
  363.         local function round(Num)
  364.             return math.floor(Num + 0.5)
  365.         end
  366.         if t.Name == "Base" or t.Name == "Baseplate" then
  367.             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)
  368.         else
  369.             if ts == "Top" then
  370.                 pos = t.CFrame * CFrame.new(0,block_properties.BlockSize.Y,0)
  371.             elseif ts == "Left" then
  372.                 pos = t.CFrame * CFrame.new(-block_properties.BlockSize.X,0,0)
  373.             elseif ts == "Right" then
  374.                 pos = t.CFrame * CFrame.new(block_properties.BlockSize.X,0,0)
  375.             elseif ts == "Front" then
  376.                 pos = t.CFrame * CFrame.new(0,0,-block_properties.BlockSize.Z)
  377.             elseif ts == "Back" then
  378.                 pos = t.CFrame * CFrame.new(0,0,block_properties.BlockSize.Z)
  379.             elseif ts == "Bottom" then
  380.                 pos = t.CFrame * CFrame.new(0,-block_properties.BlockSize.Y,0)
  381.             end
  382.             pos = pos.Position;
  383.             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)
  384.         end
  385.         if checkcoords(pos) == true and cango then
  386.             local block
  387.             if (blockType == "Observer") then
  388.                 block = create_observer()
  389.                 block.Parent = blockfolder
  390.             end
  391.             block = block or Instance.new("Part",blockfolder)
  392.             block.Name = "block"
  393.             block.Size = block_properties.BlockSize
  394.             block.Position = pos
  395.             block.Orientation = rot
  396.             block.Material = blockdatas[blockType]['Material']
  397.             local bval = Instance.new("StringValue")
  398.             bval.Name = 'blocktype'
  399.             bval.Value = blockType
  400.             bval.Parent = block
  401.             local cval = Instance.new("NumberValue")
  402.             cval.Name = 'colorid'
  403.             cval.Value = colorid
  404.             cval.Parent = block
  405.             if colors[colorid] == 'Default' then
  406.                 block.BrickColor = blockdatas[blockType]['BrickColor']
  407.             else
  408.                 block.BrickColor = colors[colorid]
  409.             end
  410.             block.Transparency = blockdatas[blockType]['Transparency']
  411.             block.Reflectance = blockdatas[blockType]['Reflectance']
  412.             block.Anchored = true
  413.             block.CanCollide = true
  414.         end
  415.     end
  416. end
  417.  
  418. function delete(pos,mag,ts,t)
  419.     if t and t.Parent and ((string.match(t.Parent.Name,'blockfolder') and t.Parent:IsA("Folder")) or t:IsDescendantOf(blockfolder)) then
  420.         t:Destroy()
  421.     end
  422. end
  423.  
  424. function change(pos,mag,ts,t)
  425.     if t and t.Parent and ((string.match(t.Parent.Name,'blockfolder') and t.Parent:IsA("Folder")) or t:IsDescendantOf(blockfolder)) then
  426.         blockType = t['blocktype'].Value
  427.         colorid = t['colorid'].Value
  428.         if currentnotify then
  429.             currentnotify.Visible = false
  430.         end
  431.         currentnotify = Notify("Block: " ..blockType,2)
  432.     end
  433. end
  434.  
  435. local remote = Instance.new("RemoteEvent")
  436. remote.Parent = plr['PlayerGui']
  437. local sv = Instance.new("ObjectValue")
  438. sv.Name = 'script'
  439. sv.Value = script
  440. sv.Parent = remote
  441.  
  442. ls = [[
  443. plr = game:GetService("Players").LocalPlayer
  444. mouse = plr:GetMouse()
  445. remote = script.Parent
  446. sv = remote:FindFirstChild("script").Value
  447. local last_data = {pos = Vector3.new(),mag = 0,'Front',nil}
  448. local blockType = 'Grass'
  449. local rot = Vector3.new()
  450. local colorid = 1
  451. local blockmode = 1
  452. local totalblocks = 0
  453. local selectmode = 1
  454. local currentnotify
  455.  
  456. local preplace = nil
  457. local preplacepart = nil
  458. local highlight = nil
  459. local placing = true
  460. local lastmpos = nil
  461. local lasttarget = nil
  462. local block_properties = {
  463.     ['S'] = 4,
  464.     ["BlockSize"] = Vector3.new(4,4,4),
  465. }
  466.  
  467. local blockdatas = ({
  468.     ["Grass"]={
  469.         ["Material"]=Enum.Material.Grass,
  470.         ["BrickColor"]=BrickColor.new(52/255, 142/255, 64/255),
  471.         ["Transparency"]=0,
  472.         ["Reflectance"]=0,
  473.     },
  474.     ["Wood"]={
  475.         ["Material"]=Enum.Material.WoodPlanks,
  476.         ["BrickColor"]=BrickColor.new(218/255, 134/255, 122/255),
  477.         ["Transparency"]=0,
  478.         ["Reflectance"]=0,
  479.     },
  480.     ["Stone"]={
  481.         ["Material"]=Enum.Material.Concrete,
  482.         ["BrickColor"]=BrickColor.new(163/255, 162/255, 165/255),
  483.         ["Transparency"]=0,
  484.         ["Reflectance"]=0,
  485.     },
  486.     ["Glass"]={
  487.         ["Material"]=Enum.Material.Glass,
  488.         ["BrickColor"]=BrickColor.new("Institutional white"),
  489.         ["Transparency"]=0.6,
  490.         ["Reflectance"]=1,
  491.     },
  492.     ["Sand"]={
  493.         ["Material"]=Enum.Material.Sand,
  494.         ["BrickColor"]=BrickColor.new(255/255, 204/255, 153/255),
  495.         ["Transparency"]=0,
  496.         ["Reflectance"]=0,
  497.     },
  498.     ["Gravel"]={
  499.         ["Material"]=Enum.Material.Pebble,
  500.         ["BrickColor"]=BrickColor.new(99/255, 95/255, 98/255),
  501.         ["Transparency"]=0,
  502.         ["Reflectance"]=0,
  503.     },
  504.     ["Foil"]={
  505.         ["Material"]=Enum.Material.Foil,
  506.         ["BrickColor"]=BrickColor.new(1, 1, 1),
  507.         ["Transparency"]=0,
  508.         ["Reflectance"]=0,
  509.     },
  510.     ["Neon"]={
  511.         ["Material"]=Enum.Material.Neon,
  512.         ["BrickColor"]=BrickColor.new(1, 1, 1),
  513.         ["Transparency"]=0,
  514.         ["Reflectance"]=0,
  515.     },
  516.     ["Bedrock"]={
  517.         ["Material"]=Enum.Material.Metal,
  518.         ["BrickColor"]=BrickColor.new("Really black"),
  519.         ["Transparency"]=0,
  520.         ["Reflectance"]=0,
  521.     },
  522.     ["Observer"]={
  523.         ["Material"]=Enum.Material.Metal,
  524.         ["BrickColor"]=BrickColor.new("Really black"),
  525.         ["Transparency"]=0,
  526.         ["Reflectance"]=0,
  527.     },
  528. }) --[blockType]
  529. local BlockReference = {}
  530. for i, v in pairs(blockdatas) do
  531.     table.insert(BlockReference, i)
  532.     local id = #BlockReference
  533.     v.Id = id
  534. end
  535. for i,v in pairs(blockdatas) do
  536.     totalblocks = totalblocks + 1
  537. end
  538.  
  539. local colors = {
  540.     'Default',
  541.     BrickColor.new("Institutional white"),
  542.     BrickColor.new("Ghost grey"),
  543.     BrickColor.new("Fossil"),
  544.     BrickColor.new("Smoky grey"),
  545.     BrickColor.new("Black"),
  546.     BrickColor.new("Really black"),
  547.     BrickColor.new("Really blue"),
  548.     BrickColor.new("Really red"),
  549.     BrickColor.new("Lime green"),
  550.     BrickColor.new("Bright green"),
  551.     BrickColor.new("Bright yellow"),
  552.     BrickColor.new("New Yeller"),
  553.     BrickColor.new("Bright orange"),
  554.     BrickColor.new("Brown"),
  555.     BrickColor.new("Royal purple"),
  556.     BrickColor.new("Alder"),
  557.     BrickColor.new("Cyan"),
  558.     BrickColor.new("Pink"),
  559.     BrickColor.new("Crimson"),
  560.     BrickColor.new("Brown"),
  561. }
  562. function update_build()
  563.     if not blockfolder or not blockfolder.Parent then
  564.         blockfolder = Instance.new("Folder")
  565.         blockfolder.Name = (plr.UserId .. 'blockfolder')
  566.         blockfolder.Parent = workspace
  567.     end
  568.     if placing then
  569.     if not preplacepart or not preplacepart.Parent or not preplace or not preplace.Parent or not highlight or not highlight.Parent then
  570.         if preplace then preplace:Destroy() end
  571.         preplacepart = Instance.new("Part")
  572.         preplace = Instance.new("BlockMesh")
  573.         preplacepart.Parent = sv
  574.         preplacepart.CFrame = CFrame.new(0,0,0)
  575.         preplacepart.Transparency = 0.5
  576.         preplacepart.Size = Vector3.new(0, 0, 0)
  577.         preplacepart.Anchored = true
  578.         preplacepart.CanCollide = false
  579.         highlight = Instance.new("SelectionBox")
  580.         highlight.Adornee = nil -- preplacepart
  581.         highlight.LineThickness = 0.1
  582.         highlight.Parent = preplacepart
  583.         local BillboardGui0 = Instance.new("BillboardGui")
  584.         local TextBox1 = Instance.new("TextBox")
  585.         BillboardGui0.Parent = preplacepart
  586.         BillboardGui0.Size = UDim2.new(0, 200, 1, 0)
  587.         BillboardGui0.Active = true
  588.         BillboardGui0.ClipsDescendants = true
  589.         BillboardGui0.AlwaysOnTop = true
  590.         TextBox1.Parent = BillboardGui0
  591.         TextBox1.Size = UDim2.new(1, 0, 1, 0)
  592.         TextBox1.BackgroundColor = BrickColor.new("Institutional white")
  593.         TextBox1.BackgroundColor3 = Color3.new(1, 1, 1)
  594.         TextBox1.BackgroundTransparency = 1
  595.         TextBox1.BorderSizePixel = 0
  596.         TextBox1.ZIndex = 2
  597.         TextBox1.Font = Enum.Font.SourceSansBold
  598.         TextBox1.FontSize = Enum.FontSize.Size14
  599.         TextBox1.Text = plr.Name
  600.         TextBox1.TextColor = BrickColor.new("Institutional white")
  601.         TextBox1.TextColor3 = Color3.new(1, 1, 1)
  602.         TextBox1.TextScaled = true
  603.         TextBox1.TextSize = 14
  604.         TextBox1.TextStrokeTransparency = 0
  605.         TextBox1.TextWrap = true
  606.         TextBox1.TextWrapped = true
  607.         if selectmode == 1 then
  608.             preplacepart.Material = blockdatas[blockType]['Material']
  609.             if colors[colorid] == 'Default' then
  610.                 preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  611.             else
  612.                 preplacepart.BrickColor = colors[colorid]
  613.             end
  614.             preplacepart.Reflectance = blockdatas[blockType]['Reflectance']
  615.             highlight.Color3 = Color3.fromRGB(49, 255, 26)
  616.         elseif selectmode == 2 then
  617.             preplacepart.Material = Enum.Material.Neon
  618.             preplacepart.BrickColor = BrickColor.new("Really red")
  619.             highlight.Color3 = Color3.fromRGB(255, 0, 0)
  620.         elseif selectmode == 3 then
  621.             preplacepart.Material = Enum.Material.Neon
  622.             preplacepart.BrickColor = BrickColor.new("New Yeller")
  623.             highlight.Color3 = Color3.fromRGB(255, 255, 0)
  624.         end
  625.         preplace.Parent = preplacepart
  626.         local S = block_properties.S*2*10
  627.         preplace.Scale = Vector3.new(S,S,S)
  628.     end
  629.     --pcall(function()
  630.     if preplacepart and preplacepart.Parent then
  631.         local pos,mag,ts,t = last_data.pos,last_data.mag,last_data.ts,last_data.t
  632.         local largest = t.Size.X
  633.         local cango = true
  634.         for i,v in pairs(workspace:GetDescendants()) do
  635.             if v:IsA("BasePart") and v.Name == "Baseplate" and v:FindFirstChild("owner") then
  636.                 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
  637.                     cango = false
  638.                 end
  639.             end
  640.         end
  641.         if t.Size.Y > largest then
  642.             largest = t.Size.Y
  643.             if t.Size.Z > largest then
  644.                 largest = t.Size.Z
  645.             end
  646.         end
  647.         if 10 >= mag and t ~= nil then
  648.             local function round(Num)
  649.                 return math.floor(Num + 0.5)
  650.             end
  651.             if t.Name == "Base" or t.Name == "Baseplate" then
  652.                 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)
  653.             else
  654.                 if ts == "Top" then
  655.                     pos = t.CFrame * CFrame.new(0,block_properties.BlockSize.Y,0)
  656.                 elseif ts == "Left" then
  657.                     pos = t.CFrame * CFrame.new(-block_properties.BlockSize.X,0,0)
  658.                 elseif ts == "Right" then
  659.                     pos = t.CFrame * CFrame.new(block_properties.BlockSize.X,0,0)
  660.                 elseif ts == "Front" then
  661.                     pos = t.CFrame * CFrame.new(0,0,-block_properties.BlockSize.Z)
  662.                 elseif ts == "Back" then
  663.                     pos = t.CFrame * CFrame.new(0,0,block_properties.BlockSize.Z)
  664.                 elseif ts == "Bottom" then
  665.                     pos = t.CFrame * CFrame.new(0,-block_properties.BlockSize.Y,0)
  666.                 end
  667.                 pos = pos.Position;
  668.                 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)
  669.             end
  670.             if (selectmode == 2 or selectmode == 3) and ((string.match(t.Parent.Name,'blockfolder') and t.Parent:IsA("Folder")) or t:IsDescendantOf(blockfolder)) then
  671.                 preplacepart.Position = t.Position
  672.             else
  673.                 preplacepart.Position = pos
  674.             end
  675.             preplacepart.Orientation = rot
  676.         end
  677.     end
  678.     --end)
  679.     end
  680. end
  681. mouse.KeyDown:Connect(function(key)
  682.     local pos = mouse.Hit.p
  683.     local mag = 0 -- (plr.Character.HumanoidRootPart.Position - pos).magnitude
  684.     local ts = mouse.TargetSurface.Name
  685.     local t = mouse.Target
  686.     last_data = {pos = pos,mag = mag,ts = ts,t = t}
  687.     if key == "q" or key == "e" then
  688.         if placing then
  689.             if key == 'e' and selectmode == 1 then
  690.                 if blockmode == totalblocks then
  691.                     blockmode = 1
  692.                     blockType = BlockReference[blockmode]
  693.                     if preplacepart then
  694.                         preplacepart.Material = blockdatas[blockType]['Material']
  695.                         preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  696.                     end
  697.                 else
  698.                     blockmode = blockmode + 1
  699.                     blockType = BlockReference[blockmode]
  700.                     if preplacepart then
  701.                         preplacepart.Material = blockdatas[blockType]['Material']
  702.                         preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  703.                     end
  704.                 end
  705.             elseif key == 'q' and selectmode == 1 then
  706.                 if blockmode == 1 then
  707.                     blockmode = totalblocks
  708.                     blockType = BlockReference[blockmode]
  709.                     if preplacepart then
  710.                         preplacepart.Material = blockdatas[blockType]['Material']
  711.                         preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  712.                     end
  713.                 else
  714.                     blockmode = blockmode - 1
  715.                     blockType = BlockReference[blockmode]
  716.                     if preplacepart then
  717.                         preplacepart.Material = blockdatas[blockType]['Material']
  718.                         preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  719.                     end
  720.                 end
  721.             end
  722.         end
  723.         remote:FireServer(last_data,2,key)
  724.     end
  725.     if key == "v" then
  726.         placing = not placing
  727.         if not placing then
  728.             if preplace then
  729.                 preplace:Destroy()
  730.             end
  731.             if preplacepart then
  732.                 preplacepart:Destroy()
  733.             end
  734.         end
  735.         remote:FireServer(last_data,3)
  736.     end
  737.     if key == "f" then
  738.         if placing then
  739.             selectmode = selectmode + 1
  740.             if selectmode > 3 then
  741.                 selectmode = 1
  742.             end
  743.             if selectmode == 1 and preplacepart and preplacepart.Parent and highlight and highlight.Parent then
  744.                 preplacepart.Material = blockdatas[blockType]['Material']
  745.                 if colors[colorid] == 'Default' then
  746.                     preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  747.                 else
  748.                     preplacepart.BrickColor = colors[colorid]
  749.                 end
  750.                 preplacepart.Reflectance = blockdatas[blockType]['Reflectance']
  751.                 highlight.Color3 = Color3.fromRGB(49, 255, 26)
  752.             elseif selectmode == 2 and preplacepart and preplacepart.Parent and highlight and highlight.Parent then
  753.                 if preplacepart.Parent then
  754.                     preplacepart.Material = Enum.Material.Neon
  755.                     preplacepart.BrickColor = BrickColor.new("Really red")
  756.                     highlight.Color3 = Color3.fromRGB(255, 0, 0)
  757.                 end
  758.             elseif selectmode == 3 and preplacepart and preplacepart.Parent and highlight and highlight.Parent then
  759.                 if preplacepart.Parent then
  760.                     preplacepart.Material = Enum.Material.Neon
  761.                     preplacepart.BrickColor = BrickColor.new("New Yeller")
  762.                     highlight.Color3 = Color3.fromRGB(255, 255, 0)
  763.                 end
  764.             end
  765.         end
  766.         remote:FireServer(last_data,4)
  767.     end
  768.     if key == "g" or key == "h" then
  769.         if selectmode == 1 and placing then
  770.             if key == 'g' then
  771.                 colorid = colorid - 1
  772.                 if 1 > colorid then
  773.                     colorid = #colors
  774.                 end
  775.             elseif key == 'h' then
  776.                 colorid = colorid + 1
  777.                 if colorid > #colors then
  778.                     colorid = 1
  779.                 end
  780.             end
  781.             if colors[colorid] == 'Default' then
  782.                 preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  783.             else
  784.                 preplacepart.BrickColor = colors[colorid]
  785.             end
  786.         end
  787.         remote:FireServer(last_data,6,key)
  788.     end
  789.     if key == "r" or key == "t" or key == "y" then
  790.         if selectmode == 1 and placing then
  791.             if key == 't' then
  792.                 rot = rot + Vector3.new(90,0,0)
  793.             elseif key == 'r' then
  794.                 rot = rot + Vector3.new(0,90,0)
  795.             elseif key == 'y' then
  796.                 rot = rot + Vector3.new(0,0,90)
  797.             end
  798.         end
  799.         remote:FireServer(last_data,7,key)
  800.     end
  801. end)
  802. mouse.Button1Down:Connect(function()
  803.     local pos = mouse.Hit.p
  804.     local mag = 0 -- (plr.Character.HumanoidRootPart.Position - pos).magnitude
  805.     local ts = mouse.TargetSurface.Name
  806.     local t = mouse.Target
  807.     last_data = {pos = pos,mag = mag,ts = ts,t = t}
  808.     remote:FireServer(last_data,1)
  809. end)
  810. mouse.Button1Up:Connect(function()
  811.     local pos = mouse.Hit.p
  812.     local mag = 0 -- (plr.Character.HumanoidRootPart.Position - pos).magnitude
  813.     local ts = mouse.TargetSurface.Name
  814.     local t = mouse.Target
  815.     last_data = {pos = pos,mag = mag,ts = ts,t = t}
  816.     remote:FireServer(last_data,5)
  817. end)
  818. game:GetService("RunService").RenderStepped:Connect(function()
  819.     local pos = mouse.Hit.p
  820.     local mag = 0 -- (plr.Character.HumanoidRootPart.Position - pos).magnitude
  821.     local ts = mouse.TargetSurface.Name
  822.     local t = mouse.Target
  823.     last_data = {pos = pos,mag = mag,ts = ts,t = t}
  824.     update_build()
  825.     remote:FireServer(last_data,0)
  826. end)
  827. ]]
  828.  
  829. NLS(ls,remote)
  830.  
  831. local last_data = {pos = Vector3.new(),mag = 0,'Front',nil}
  832.  
  833. function update_build()
  834.     if not blockfolder or not blockfolder.Parent then
  835.         blockfolder = Instance.new("Folder")
  836.         blockfolder.Name = (plr.UserId .. 'blockfolder')
  837.         blockfolder.Parent = workspace
  838.     end
  839.     if placing then
  840.     if not preplacepart or not preplacepart.Parent or not preplace or not preplace.Parent or not highlight or not highlight.Parent then
  841.         if preplace then preplace:Destroy() end
  842.         preplacepart = Instance.new("Part")
  843.         preplace = Instance.new("BlockMesh")
  844.         preplacepart.Parent = script
  845.         preplacepart.CFrame = CFrame.new(0,0,0)
  846.         preplacepart.Transparency = 0.5
  847.         preplacepart.Size = Vector3.new(0, 0, 0)
  848.         preplacepart.Anchored = true
  849.         preplacepart.CanCollide = false
  850.         highlight = Instance.new("SelectionBox")
  851.         highlight.Adornee = nil -- preplacepart
  852.         highlight.LineThickness = 0.1
  853.         highlight.Parent = preplacepart
  854.         local BillboardGui0 = Instance.new("BillboardGui")
  855.         local TextBox1 = Instance.new("TextBox")
  856.         BillboardGui0.Parent = preplacepart
  857.         BillboardGui0.Size = UDim2.new(0, 200, 1, 0)
  858.         BillboardGui0.Active = true
  859.         BillboardGui0.ClipsDescendants = true
  860.         BillboardGui0.AlwaysOnTop = true
  861.         TextBox1.Parent = BillboardGui0
  862.         TextBox1.Size = UDim2.new(1, 0, 1, 0)
  863.         TextBox1.BackgroundColor = BrickColor.new("Institutional white")
  864.         TextBox1.BackgroundColor3 = Color3.new(1, 1, 1)
  865.         TextBox1.BackgroundTransparency = 1
  866.         TextBox1.BorderSizePixel = 0
  867.         TextBox1.ZIndex = 2
  868.         TextBox1.Font = Enum.Font.SourceSansBold
  869.         TextBox1.FontSize = Enum.FontSize.Size14
  870.         TextBox1.Text = plr.Name
  871.         TextBox1.TextColor = BrickColor.new("Institutional white")
  872.         TextBox1.TextColor3 = Color3.new(1, 1, 1)
  873.         TextBox1.TextScaled = true
  874.         TextBox1.TextSize = 14
  875.         TextBox1.TextStrokeTransparency = 0
  876.         TextBox1.TextWrap = true
  877.         TextBox1.TextWrapped = true
  878.         if selectmode == 1 then
  879.             preplacepart.Material = blockdatas[blockType]['Material']
  880.             if colors[colorid] == 'Default' then
  881.                 preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  882.             else
  883.                 preplacepart.BrickColor = colors[colorid]
  884.             end
  885.             preplacepart.Reflectance = blockdatas[blockType]['Reflectance']
  886.             highlight.Color3 = Color3.fromRGB(49, 255, 26)
  887.         elseif selectmode == 2 then
  888.             preplacepart.Material = Enum.Material.Neon
  889.             preplacepart.BrickColor = BrickColor.new("Really red")
  890.             highlight.Color3 = Color3.fromRGB(255, 0, 0)
  891.         elseif selectmode == 3 then
  892.             preplacepart.Material = Enum.Material.Neon
  893.             preplacepart.BrickColor = BrickColor.new("New Yeller")
  894.             highlight.Color3 = Color3.fromRGB(255, 255, 0)
  895.         end
  896.         preplace.Parent = preplacepart
  897.         local S = block_properties.S*2*10
  898.         preplace.Scale = Vector3.new(S,S,S)
  899.     end
  900.     --pcall(function()
  901.     if preplacepart and preplacepart.Parent then
  902.         local pos,mag,ts,t = last_data.pos,last_data.mag,last_data.ts,last_data.t
  903.         local largest = t.Size.X
  904.         local cango = true
  905.         for i,v in pairs(workspace:GetDescendants()) do
  906.             if v:IsA("BasePart") and v.Name == "Baseplate" and v:FindFirstChild("owner") then
  907.                 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
  908.                     cango = false
  909.                 end
  910.             end
  911.         end
  912.         if t.Size.Y > largest then
  913.             largest = t.Size.Y
  914.             if t.Size.Z > largest then
  915.                 largest = t.Size.Z
  916.             end
  917.         end
  918.         if 10 >= mag and t ~= nil then
  919.             local function round(Num)
  920.                 return math.floor(Num + 0.5)
  921.             end
  922.             if t.Name == "Base" or t.Name == "Baseplate" then
  923.                 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)
  924.             else
  925.                 if ts == "Top" then
  926.                     pos = t.CFrame * CFrame.new(0,block_properties.BlockSize.Y,0)
  927.                 elseif ts == "Left" then
  928.                     pos = t.CFrame * CFrame.new(-block_properties.BlockSize.X,0,0)
  929.                 elseif ts == "Right" then
  930.                     pos = t.CFrame * CFrame.new(block_properties.BlockSize.X,0,0)
  931.                 elseif ts == "Front" then
  932.                     pos = t.CFrame * CFrame.new(0,0,-block_properties.BlockSize.Z)
  933.                 elseif ts == "Back" then
  934.                     pos = t.CFrame * CFrame.new(0,0,block_properties.BlockSize.Z)
  935.                 elseif ts == "Bottom" then
  936.                     pos = t.CFrame * CFrame.new(0,-block_properties.BlockSize.Y,0)
  937.                 end
  938.                 pos = pos.Position;
  939.                 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)
  940.             end
  941.             if (selectmode == 2 or selectmode == 3) and ((string.match(t.Parent.Name,'blockfolder') and t.Parent:IsA("Folder")) or t:IsDescendantOf(blockfolder)) then
  942.                 preplacepart.Position = t.Position
  943.             else
  944.                 preplacepart.Position = pos
  945.             end
  946.             preplacepart.Orientation = rot
  947.         end
  948.     end
  949.     --end)
  950.     end
  951. end
  952.  
  953. spawn(function()
  954.     while remote do
  955.         update_observers()
  956.         --update_build()
  957.         wait()
  958.     end
  959.     script:Destroy()
  960. end)
  961.  
  962. warn([[
  963. == CONTROLS ==
  964. Q or E - Change Block
  965. G or H - Change Color
  966. R,T,Y - Orientate Block
  967. F - Toggle Place,Break,EyeDropper
  968. V - Disable Building
  969. Click(Hold) - Place or Destroy
  970. ]])
  971.  
  972. remote.OnServerEvent:Connect(function(lplr,data,mode,key)
  973.     if plr == lplr then else return end
  974.     if data then
  975.         last_data = data
  976.     end
  977.     if mode == 1 and placing then
  978.         clickid = clickid + 1
  979.         _clickid = clickid
  980.         holding = true
  981.         if selectmode == 1 and blockfolder and blockfolder.Parent then
  982.             place(last_data.pos,last_data.mag,last_data.ts,last_data.t)
  983.         elseif selectmode == 2 --[[(preplace and preplacepart)]] then
  984.             delete(last_data.pos,last_data.mag,last_data.ts,last_data.t)
  985.         elseif selectmode == 3 then
  986.             change(last_data.pos,last_data.mag,last_data.ts,last_data.t)
  987.         end
  988.         spawn(function()
  989.             wait(0.1)
  990.             while holding and (clickid == _clickid) do
  991.                 wait(0.1)
  992.                 if holding and (clickid == _clickid) then
  993.                     if selectmode == 1 and blockfolder and blockfolder.Parent then
  994.                         place(last_data.pos,last_data.mag,last_data.ts,last_data.t)
  995.                     elseif selectmode == 2 --[[(preplace and preplacepart)]] then
  996.                         delete(last_data.pos,last_data.mag,last_data.ts,last_data.t)
  997.                     elseif selectmode == 3 then
  998.                         change(last_data.pos,last_data.mag,last_data.ts,last_data.t)
  999.                     end
  1000.                 end
  1001.             end
  1002.         end)
  1003.     elseif mode == 2 and placing then
  1004.         if key == 'e' and selectmode == 1 then
  1005.             if blockmode == totalblocks then
  1006.                 blockmode = 1
  1007.                 blockType = BlockReference[blockmode]
  1008.                 if preplacepart then
  1009.                     preplacepart.Material = blockdatas[blockType]['Material']
  1010.                     preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  1011.                 end
  1012.             else
  1013.                 blockmode = blockmode + 1
  1014.                 blockType = BlockReference[blockmode]
  1015.                 if preplacepart then
  1016.                     preplacepart.Material = blockdatas[blockType]['Material']
  1017.                     preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  1018.                 end
  1019.             if currentnotify then
  1020.                 currentnotify.Visible = false
  1021.             end
  1022.             currentnotify = Notify("Block: " ..BlockReference[blockmode],2)
  1023.             end
  1024.         elseif key == 'q' and selectmode == 1 then
  1025.             if blockmode == 1 then
  1026.                 blockmode = totalblocks
  1027.                 blockType = BlockReference[blockmode]
  1028.                 if preplacepart then
  1029.                     preplacepart.Material = blockdatas[blockType]['Material']
  1030.                     preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  1031.                 end
  1032.             else
  1033.                 blockmode = blockmode - 1
  1034.                 blockType = BlockReference[blockmode]
  1035.                 if preplacepart then
  1036.                     preplacepart.Material = blockdatas[blockType]['Material']
  1037.                     preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  1038.                 end
  1039.             end
  1040.             if currentnotify then
  1041.                 currentnotify.Visible = false
  1042.             end
  1043.             currentnotify = Notify("Block: " ..BlockReference[blockmode],2)
  1044.         end
  1045.     elseif mode == 3 then
  1046.         if currentnotify then
  1047.             currentnotify.Visible = false
  1048.         end
  1049.         placing = not placing
  1050.         if not placing then
  1051.             currentnotify = Notify("Mode: Disabled",2)
  1052.         else
  1053.             currentnotify = Notify("Mode: Enabled",2)
  1054.         end
  1055.         if not placing then
  1056.             if preplace then
  1057.                 preplace:Destroy()
  1058.             end
  1059.             if preplacepart then
  1060.                 preplacepart:Destroy()
  1061.             end
  1062.         end
  1063.     elseif mode == 4 and placing then
  1064.         selectmode = selectmode + 1
  1065.         if selectmode > 3 then
  1066.             selectmode = 1
  1067.         end
  1068.         if currentnotify then
  1069.             currentnotify.Visible = false
  1070.         end
  1071.         if selectmode == 1 and preplacepart and preplacepart.Parent and highlight and highlight.Parent then
  1072.             preplacepart.Material = blockdatas[blockType]['Material']
  1073.             if colors[colorid] == 'Default' then
  1074.                 preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  1075.             else
  1076.                 preplacepart.BrickColor = colors[colorid]
  1077.             end
  1078.             preplacepart.Reflectance = blockdatas[blockType]['Reflectance']
  1079.             highlight.Color3 = Color3.fromRGB(49, 255, 26)
  1080.             currentnotify = Notify("Mode: Place",2)
  1081.         elseif selectmode == 2 and preplacepart and preplacepart.Parent and highlight and highlight.Parent then
  1082.             if preplacepart.Parent then
  1083.                 preplacepart.Material = Enum.Material.Neon
  1084.                 preplacepart.BrickColor = BrickColor.new("Really red")
  1085.                 highlight.Color3 = Color3.fromRGB(255, 0, 0)
  1086.             end
  1087.             currentnotify = Notify("Mode: Delete",2)
  1088.         elseif selectmode == 3 and preplacepart and preplacepart.Parent and highlight and highlight.Parent then
  1089.             if preplacepart.Parent then
  1090.                 preplacepart.Material = Enum.Material.Neon
  1091.                 preplacepart.BrickColor = BrickColor.new("New Yeller")
  1092.                 highlight.Color3 = Color3.fromRGB(255, 255, 0)
  1093.             end
  1094.             currentnotify = Notify("Mode: EyeDropper",2)
  1095.         end
  1096.     elseif mode == 5 then
  1097.         holding = false
  1098.         clickid = clickid + 1
  1099.     elseif mode == 6 and selectmode == 1 and placing then
  1100.         if key == 'g' then
  1101.             colorid = colorid - 1
  1102.             if 1 > colorid then
  1103.                 colorid = #colors
  1104.             end
  1105.         elseif key == 'h' then
  1106.             colorid = colorid + 1
  1107.             if colorid > #colors then
  1108.                 colorid = 1
  1109.             end
  1110.         end
  1111.         if currentnotify then
  1112.             currentnotify.Visible = false
  1113.         end
  1114.         if preplacepart then
  1115.             if colors[colorid] == 'Default' then
  1116.                 preplacepart.BrickColor = blockdatas[blockType]['BrickColor']
  1117.             else
  1118.                 preplacepart.BrickColor = colors[colorid]
  1119.             end
  1120.         end
  1121.         currentnotify = Notify("Color: " ..tostring(colors[colorid]),2)
  1122.     elseif mode == 7 and selectmode == 1 and placing then
  1123.         if key == 't' then
  1124.             rot = rot + Vector3.new(90,0,0)
  1125.         elseif key == 'r' then
  1126.             rot = rot + Vector3.new(0,90,0)
  1127.         elseif key == 'y' then
  1128.             rot = rot + Vector3.new(0,0,90)
  1129.         end
  1130.     end
  1131. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement