null nil 0 true RBX1 0 0 0 0 1 0 0 0 1 0 0 0 1 Workspace null true true -0.5 0.5 0 0 -0.5 0.5 4 0 199 -632 6.5999999 4361 -1 0 -0 -0 1 -0 -0 0 -1 true 0 true false 0.5 1 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 false 256 Instructions9 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 3 0 1 0 0 0 true 1 24 13.2000008 2 2 Decal 20 0 http://www.roblox.com/asset/?id=8303313 true true -0.5 0.5 0 0 -0.5 0.5 4 0 199 -551 6.5999999 4363 -1 0 -0 -0 1 -0 -0 0 -1 true 0 true false 0.5 1 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 false 256 Instructions8 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 3 0 1 0 0 0 true 1 24 13.2000008 2 2 Decal 20 0 http://www.roblox.com/asset/?id=8303310 true true -0.5 0.5 0 0 -0.5 0.5 4 0 199 -466 6.5999999 4362 -1 0 -0 -0 1 -0 -0 0 -1 true 0 true false 0.5 1 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 false 256 Instructions7 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 3 0 1 0 0 0 true 1 24 13.2000008 2 2 Decal 20 0 http://www.roblox.com/asset/?id=8303306 true true -0.5 0.5 0 0 -0.5 0.5 4 0 199 -367 6.5999999 4355 -1 0 -0 -0 1 -0 -0 0 -1 true 0 true false 0.5 1 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 false 256 Instructions6 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 3 0 1 0 0 0 true 1 24 13.2000008 2 2 Decal 20 0 http://www.roblox.com/asset/?id=8303300 true true -0.5 0.5 0 0 -0.5 0.5 4 0 199 -271 6.5999999 4352 -1 0 -0 -0 1 -0 -0 0 -1 true 0 true false 0.5 1 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 false 256 Instructions5 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 3 0 1 0 0 0 true 1 24 13.2000008 2 2 Decal 20 0 http://www.roblox.com/asset/?id=8303296 true true -0.5 0.5 0 0 -0.5 0.5 4 0 199 -191 6.5999999 4345 -1 0 -0 -0 1 -0 -0 0 -1 true 0 true false 0.5 1 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 false 256 Instructions4 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 3 0 1 0 0 0 true 1 24 13.2000008 2 2 Decal 20 0 http://www.roblox.com/asset/?id=8303292 true true -0.5 0.5 0 0 -0.5 0.5 4 0 199 -124 6.5999999 4337 -1 0 -0 -0 1 -0 -0 0 -1 true 0 true false 0.5 1 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 false 256 Instructions3 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 3 0 1 0 0 0 true 1 24 13.2000008 2 2 Decal 20 0 http://www.roblox.com/asset/?id=8303290 true true -0.5 0.5 0 0 -0.5 0.5 4 0 199 -64 6.5999999 4334 -1 0 -0 -0 1 -0 -0 0 -1 true 0 true false 0.5 1 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 false 256 Instructions2 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 3 0 1 0 0 0 true 1 24 13.2000008 2 2 Decal 20 0 http://www.roblox.com/asset/?id=8303285 true null 0 366.746704 7.04333591 -4.02886105 -0.00256466656 0.0038508994 -0.999989271 5.36325921e-013 0.999992549 0.00385091198 0.999996722 9.87630483e-006 -0.00256464747 378 7 -4 -0.00256466027 0.00385088311 -0.999989271 1.194845e-014 0.999992549 0.00385089568 0.999996722 9.87623935e-006 -0.00256464118 Camera true false Matrix.h _G.Matrix = {} --[[ //////////////////////////////////////// //// Rotation Constructors ////// ////////////////////////////////////// ]] function Matrix.rotationY(angle) return CFrame.new(0, 0, 0, math.cos(angle), 0, -math.sin(angle), 0, 1, 0, math.sin(angle), 0, math.cos(angle) ) end function Matrix.rotationX(angle) return CFrame.new(0, 0, 0, 1, 0, 0, 0, math.cos(angle), -math.sin(angle), 0, math.sin(angle), math.cos(angle)) end function Matrix.rotationZ(angle) return CFrame.new(0, 0, 0, math.cos(angle), -math.sin(angle), 0, math.sin(angle), math.cos(angle), 0, 0, 0, 1) end --[[ //////////////////////////////////////// /////// string.explode /////////// ////////////////////////////////////// takes a string and breaks it down using "ch" as a separator, where "ch" is not one of the magic characters ( * ^ % [ ] $ . + and - ) EG: string.explode("lol,hax , 1337stuff, 8", ",") would give you the table: { lol hax 1337stuff 8 } ]] function string.explode(str, ch) local tb = {} std:gsub("[^"..ch.."]*%a+[^"..ch.."]*", function(a) table.insert(tb, a) end) return tb end --[[ ////////////////////////////////////////////////////////// //// multiplication of a CFrame by a point ////// ///////////////////////////////////////////////////////// EG: if you have an arbitrarily rotated 1x1x1 cube, and you used this code: local pos = Matrix.VectorByMatrix( Vector3.new(0.5, 0.5, 0.5), [part].CFrame ) pos would be the position of one vertex of the cube (at an offset of <0.5, 0.5, 0.5>)... ]] function Matrix.VectorByMatrix(disp, rotation) local tb = tostring(rotation):explode(",") local vec = Vector3.new( tb[4]*disp.x + tb[5]*disp.y + tb[6]*disp.z, tb[7]*disp.x + tb[8]*disp.y + tb[9]*disp.z, tb[10]*disp.x + tb[11]*disp.y + tb[12]*disp.z) return vec end --[[function reflectionX(cf) local mx = {} (" "..tostring(cf)):gsub("[- ] end]] true false Join.h _G._Players = {} function AddStat(player, type, name, val) if not player:FindFirstChild("leaderstats") then local b = Instance.new("IntValue") b.Name = "leaderstats" b.Parent = player end local a = Instance.new(type) a.Name = name a.Value = val a.Parent = player.leaderstats end game.Players.ChildAdded:connect(function(p) AddStat(p, "IntValue", "Bricks", 0) AddStat(p, "IntValue", "BricksAllowed", 100) local s = Instance.new("ObjectValue") s.Name = "Selection" s.Parent = p for i = 1, 600 do wait() if p.Character then break end end for _, t in ipairs(p.Backpack:GetChildren()) do t.Parent = nil end game.Lighting.Instructions:clone().Parent = p.Backpack game.Lighting.CamFocus:clone().Parent = p.Backpack p.Character.Parent = game.Lighting --_Players[p.Name] = {} --table of all parts belonging to player end) game.Players.ChildRemoved:connect(function(player) --print("game.Players."..p.Name, "-> Leave()") --print("Bricks owned:", #(_Players[p.Name])) for _, p in pairs(game.Workspace:GetChildren()) do if p:FindFirstChild("Block") then if p.Block.Value == player or not game.Players[p.Block.Value.Name] then p:remove() end elseif p:FindFirstChild("Owner") then if p.Owner.Value == player or not game.Players[p.Owner.Value.Name] then p:remove() end end end --_Players[p.Name] = nil end) --[[game.Workspace.DescendantAdded:connect(function(p) if p.className ~= "Part" then return end if p:FindFirstChild("Block") then print(p.Block.Value, "-> Instance(",p,")") table.insert(_Players[p.Block.Value.Name], p) end end) game.Workspace.DescendantRemoving:connect(function(p) print(p, "-> Remove()") if p.className ~= "Part" then return end if p:FindFirstChild("Block") then if not game.Players:FindFirstChild(p.Block.Value.Name) then return end for k, v in pairs(_Players[p.Block.Value.Name]) do if v == p then table.remove(_Players[p.Block.Value.Name], k) return end end end end)]] true true -0.5 0.5 0 0 -0.5 0.5 4 0 26 0.5 0.200000003 0.5 1 0 0 0 1 0 0 0 1 true 0 true false 0.5 2 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 false 256 Base 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 3 0 0 0 0 0 true 1 500 0.400000006 500 false -0.5 0.5 0 0 -0.5 0.5 4 0 199 378 7 -4 0 0 -1 0 1 -0 1 0 -0 true 0 true false 0.5 1 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 false 256 Thumb 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 3 0 0 0 0 0 true 1 24 13.2000008 2 2 Decal 20 0 http://www.roblox.com/asset/?id=8302641 true true -0.5 0.5 0 0 -0.5 0.5 4 0 199 0 7.00000477 4334 -1 0 0 0 1 0 0 0 -1 true 0 true false 0.5 1 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 false 256 Instructions1 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 3 0 1 0 0 0 true 1 24 13.2000008 2 2 Decal 20 0 http://www.roblox.com/asset/?id=8303283 true Run Service true RBX26 RBX27 Instance true 6 Players true StarterPack true 0 R_Move true false _main local player = script.Parent.Parent.Parent local tl = script.Parent local resource_part = Instance.new("Part") local mouse_isdown function Selection(a) if a then player.Selection.Value = a else return player.Selection.Value end end local last_func = function() end local last_func_select = nil local move_dist = 1 local h = Instance.new("Hint") function mkarrow(color) local a = game.Lighting.Arrow:clone() a.BrickColor = BrickColor.new(color) a.Owner.Value = player return a end function round(a) a = a/move_dist if math.abs(math.ceil(a) - a) > math.abs(math.floor(a) - a) then a = math.floor(a) else a = math.ceil(a) end return a*move_dist end local selection_hud = { {o = mkarrow(21), d = Vector3.new(0, 0, -1), rf = function(p) p.CFrame = p.CFrame * CFrame.new(0, 0, -move_dist) end}, {o = mkarrow(21), d = Vector3.new(0, 0, 1), rf = function(p) p.CFrame = p.CFrame * CFrame.new(0, 0, move_dist) end}, {o = mkarrow(23), d = Vector3.new(1, 0, 0), rf = function(p) p.CFrame = p.CFrame * CFrame.new(move_dist, 0, 0) end}, {o = mkarrow(23), d = Vector3.new(-1, 0, 0), rf = function(p) p.CFrame = p.CFrame * CFrame.new(-move_dist, 0, 0) end}, {o = mkarrow(28), d = Vector3.new(0, 1, 0), rf = function(p) p.CFrame = p.CFrame * CFrame.new(0, move_dist, 0) end}, {o = mkarrow(28), d = Vector3.new(0, -1, 0), rf = function(p) p.CFrame = p.CFrame * CFrame.new(0, -move_dist, 0) end} } function Apply_Function(target) for _, tb in pairs(selection_hud) do if tb.o == target then tb.rf(Selection()) last_func = tb.rf last_func_select = Selection() return true end end return false end function Apply_Hud(part) for _, tb in pairs(selection_hud) do tb.o.Parent = game.Workspace tb.o.CFrame = part.CFrame * CFrame.new(tb.d.x * (part.Size.x/2 + 1), tb.d.y * (part.Size.y/2 + 1), tb.d.z * (part.Size.z/2 + 1)) end end function Remove_Hud() for _, tb in pairs(selection_hud) do tb.o.Parent = nil end end function Apply_Text() if Selection() then h.Text = "Selection's position : < "..round(Selection().Position.x).." , "..round(Selection().Position.y).." , "..round(Selection().Position.z).." > Interval distance : "..move_dist else h.Text = "Selection's position : [ No selection ] Interval distance : "..move_dist end end tl.Selected:connect(function(m) h.Parent = player Apply_Text() if Selection() then Apply_Hud(Selection()) end m.Button1Down:connect(function() if not m.Target or m.Target == Selection() then return end if Apply_Function(m.Target) then Apply_Text() Apply_Hud(Selection()) return end if m.Target:FindFirstChild("Block") then if m.Target.Block.Value == player then --ownership, add later if Selection() then Selection().Transparency = 0 Selection().Parent = game.Workspace end Selection(m.Target) Selection().Transparency = 0.5 Selection().Parent= player.Character else h.Text = "*ERROR* permission insufficient to edit this part" if Selection() then Selection().Transparency = 0 Selection().Parent = game.Workspace end player.Selection.Value = nil wait(1.5) Apply_Text() end else if Selection() then Selection().Transparency = 0 Selection().Parent = game.Workspace end player.Selection.Value = nil end Apply_Text() if Selection() then Apply_Hud(Selection()) else Remove_Hud() end end) m.KeyDown:connect(function(k_id) print(k_id:byte()) if k_id:byte() == 13 then --enter key if Selection() and Selection() == last_func_select then last_func(Selection()) Apply_Text() Apply_Hud(Selection()) else if Selection() then h.Text = "*ERROR* Selection has changed" wait(1.5) Apply_Text() else h.Text = "*ERROR* No selection" wait(1.5) Apply_Text() end end elseif k_id:byte() == 27 then if Selection() then Selection().Transparency = 0 Selection().Parent = game.Workspace end player.Selection.Value = nil Remove_Hud() h.Text = "*DESELECTED*" wait(1.5) Apply_Text() elseif k_id == "q" then if move_dist == 5 then move_dist = 2 elseif move_dist == 2 then move_dist = 1 elseif move_dist == 1 then move_dist = 0.5 elseif move_dist == 0.5 then move_dist = 0.1 elseif move_dist ==0.1 then move_dist = 5 end Apply_Text() elseif k_id == "e" then if move_dist == 0.1 then move_dist = 0.5 elseif move_dist == 0.5 then move_dist = 1 elseif move_dist == 1 then move_dist = 2 elseif move_dist == 2 then move_dist = 5 elseif move_dist == 5 then move_dist = 0.1 end Apply_Text() end end) m.Move:connect(function() m.Icon = "http://www.roblox.com/asset/?id=8301486" local a = (m.Target or game):FindFirstChild("Owner") if a then if a.Value == player then m.Icon = "http://www.roblox.com/asset/?id=8301491" end end end) m.Idle:connect(function() m.Icon = "http://www.roblox.com/asset/?id=8301486" local a = (m.Target or game):FindFirstChild("Owner") if a then if a.Value == player then m.Icon = "http://www.roblox.com/asset/?id=8301491" end end end) end) tl.Deselected:connect(function() Remove_Hud() h.Parent = nil end) true 0 Create true false _main local player = script.Parent.Parent.Parent local tl = script.Parent local h = Instance.new("Hint") move_dist = 1 function round(a) a = a/move_dist if math.abs(math.ceil(a) - a) > math.abs(math.floor(a) - a) then a = math.floor(a) else a = math.ceil(a) end return a*move_dist end tl.Selected:connect(function(m) m.Button1Down:connect(function() if player.Selection.Value then player.Selection.Value.Parent = game.Workspace end if m.Target then local pm = m.Target:FindFirstChild("Block") if pm then if pm.Value == player then --deselect old part if player.Selection.Value then player.Selection.Value.Transparency = 0 player.Selection.Value.Parent = game.Workspace end player.Selection.Value = nil --clone part if player.leaderstats.Bricks.Value >= player.leaderstats.BricksAllowed.Value then return end player.leaderstats.Bricks.Value = player.leaderstats.Bricks.Value + 1 local p = m.Target:clone() p.CFrame = m.Target.CFrame * CFrame.new(0, m.Target.Size.y, 0) p.Parent = game.Workspace p.Block.Value = player --select part player.Selection.Value = p player.Selection.Value.Transparency = 0.5 end else --deselect old part if player.Selection.Value then player.Selection.Value.Transparency = 0 player.Selection.Value.Parent = game.Workspace end player.Selection.Value = nil --make new part if player.leaderstats.Bricks.Value >= player.leaderstats.BricksAllowed.Value then return end player.leaderstats.Bricks.Value = player.leaderstats.Bricks.Value + 1 local p = game.Lighting.Part:clone() p.Block.Value = player p.CFrame = CFrame.new(round(m.Hit.p.x), round(m.Hit.p.y), round(m.Hit.p.z)) p.Parent = game.Workspace --select part player.Selection.Value = p player.Selection.Value.Transparency = 0.5 end end if player.Selection.Value then player.Selection.Value.Parent = player.Character end end) m.Move:connect(function() if player.Selection.Value then player.Selection.Value.Parent = game.Workspace end m.Icon = "http://www.roblox.com/asset/?id=8301486" local t = m.Target if player.Selection.Value then player.Selection.Value.Parent = player.Character end local val = (t or game):FindFirstChild("Block") if t and val then if val.Value == player then --clone m.Icon = "http://www.roblox.com/asset/?id=8301913" else --create m.Icon = "http://www.roblox.com/asset/?id=8301906" end elseif t then --create m.Icon = "http://www.roblox.com/asset/?id=8301906" end end) m.Idle:connect(function() if player.Selection.Value then player.Selection.Value.Parent = game.Workspace end m.Icon = "http://www.roblox.com/asset/?id=8301486" local t = m.Target if player.Selection.Value then player.Selection.Value.Parent = player.Character end local val = (t or game):FindFirstChild("Block") if val then if val.Value == player then --clone m.Icon = "http://www.roblox.com/asset/?id=8301913" else --create m.Icon = "http://www.roblox.com/asset/?id=8301906" end elseif t then --create m.Icon = "http://www.roblox.com/asset/?id=8301906" end end) end) true 0 Resize true false _main local player = script.Parent.Parent.Parent local tl = script.Parent local resource_part = Instance.new("Part") local mouse_isdown function Selection(a) if a then player.Selection.Value = a else return player.Selection.Value end end local last_func = function() end local last_func_select = nil local size_change = 1 local size_mode = 1 --increase = 1/decrease = -1 size local h = Instance.new("Hint") function mkarrow(color) local a = game.Lighting.Arrow:clone() a.BrickColor = BrickColor.new(color) a.Owner.Value = player return a end function round(a) a = a/size_change if math.abs(math.ceil(a) - a) > math.abs(math.floor(a) - a) then a = math.floor(a) else a = math.ceil(a) end return a*size_change end local selection_hud = { {o = mkarrow(21), d = Vector3.new(0, 0, -1), rf = function(p) local cf = p.CFrame p.Size = Vector3.new(p.Size.x, p.Size.y, p.Size.z + size_change) p.CFrame = cf * CFrame.new(0, 0, -size_change*0.5) end}, {o = mkarrow(21), d = Vector3.new(0, 0, 1), rf = function(p) local cf = p.CFrame p.Size = Vector3.new(p.Size.x, p.Size.y, p.Size.z + size_change) p.CFrame = cf * CFrame.new(0, 0, size_change*0.5) end}, {o = mkarrow(23), d = Vector3.new(1, 0, 0), rf = function(p) local cf = p.CFrame p.Size = Vector3.new(p.Size.x + size_change, p.Size.y, p.Size.z) p.CFrame = cf * CFrame.new(size_change*0.5, 0, 0) end}, {o = mkarrow(23), d = Vector3.new(-1, 0, 0), rf = function(p) local cf = p.CFrame p.Size = Vector3.new(p.Size.x + size_change, p.Size.y, p.Size.z) p.CFrame = cf * CFrame.new(-size_change*0.5, 0, 0) end}, {o = mkarrow(28), d = Vector3.new(0, 1, 0), rf = function(p) local cf = p.CFrame p.Size = Vector3.new(p.Size.x, p.Size.y + size_change, p.Size.z) p.CFrame = cf * CFrame.new(0, size_change*0.5, 0) end}, {o = mkarrow(28), d = Vector3.new(0, -1, 0), rf = function(p) local cf = p.CFrame p.Size = Vector3.new(p.Size.x, p.Size.y + size_change, p.Size.z) p.CFrame = cf * CFrame.new(0, -size_change*0.5, 0) end} } function Apply_Function(target) for _, tb in pairs(selection_hud) do if tb.o == target then tb.rf(Selection()) last_func = tb.rf last_func_select = Selection() return true end end return false end function Apply_Hud(part) for _, tb in pairs(selection_hud) do tb.o.Parent = game.Workspace tb.o.CFrame = part.CFrame * CFrame.new(tb.d.x * (part.Size.x/2 + 1), tb.d.y * (part.Size.y/2 + 1), tb.d.z * (part.Size.z/2 + 1)) end end function Remove_Hud() for _, tb in pairs(selection_hud) do tb.o.Parent = nil end end function Apply_Text() if Selection() then h.Text = "Selection's size : < "..round(Selection().Size.x).." , "..round(Selection().Size.y).." , "..round(Selection().Size.z).." > " if size_change > 0 then h.Text = h.Text.." Mode : Make [ Larger ] by "..size_change.." studs" else h.Text = h.Text.." Mode : Make [ Smaller ] by "..math.abs(size_change).." studs" end else h.Text = " Selection's size : [ No selection ] " if size_change > 0 then h.Text = h.Text.." Mode : Make [ Larger ] by "..size_change.." studs" else h.Text = h.Text.." Mode : Make [ Smaller ] by "..math.abs(size_change).." studs" end end end tl.Selected:connect(function(m) h.Parent = player Apply_Text() if Selection() then Apply_Hud(Selection()) end m.Button1Down:connect(function() if not m.Target or m.Target == Selection() then return end if Apply_Function(m.Target) then Apply_Text() Apply_Hud(Selection()) return end if m.Target:FindFirstChild("Block") then if m.Target.Block.Value == player then --ownership, add later if Selection() then Selection().Transparency = 0 Selection().Parent = game.Workspace end Selection(m.Target) Selection().Transparency = 0.5 Selection().Parent= player.Character else h.Text = "*ERROR* permission insufficient to edit this part" if Selection() then Selection().Transparency = 0 Selection().Parent = game.Workspace end player.Selection.Value = nil wait(1.5) Apply_Text() end else if Selection() then Selection().Transparency = 0 Selection().Parent = game.Workspace end player.Selection.Value = nil end Apply_Text() if Selection() then Apply_Hud(Selection()) else Remove_Hud() end end) m.KeyDown:connect(function(k_id) print(k_id:byte()) if k_id:byte() == 13 then --enter key if Selection() and Selection() == last_func_select then last_func(Selection()) Apply_Text() Apply_Hud(Selection()) else if Selection() then h.Text = "*ERROR* Selection has changed" wait(1.5) Apply_Text() else h.Text = "*ERROR* No selection" wait(1.5) Apply_Text() end end elseif k_id:byte() == 27 then if Selection() then Selection().Transparency = 0 Selection().Parent = game.Workspace end player.Selection.Value = nil Remove_Hud() h.Text = "*DESELECTED*" wait(1.5) Apply_Text() elseif k_id == "q" then size_change = size_change - 1 if size_change == 0 then size_change = -1 end Apply_Text() elseif k_id == "e" then size_change = size_change + 1 if size_change == 0 then size_change = 1 end Apply_Text() end end) m.Move:connect(function() m.Icon = "http://www.roblox.com/asset/?id=8301486" local a = (m.Target or game):FindFirstChild("Owner") if a then if a.Value == player then m.Icon = "http://www.roblox.com/asset/?id=8301491" end end end) m.Idle:connect(function() m.Icon = "http://www.roblox.com/asset/?id=8301486" local a = (m.Target or game):FindFirstChild("Owner") if a then if a.Value == player then m.Icon = "http://www.roblox.com/asset/?id=8301491" end end end) end) tl.Deselected:connect(function() Remove_Hud() h.Parent = nil end) true 0 G_Move true false _main local player = script.Parent.Parent.Parent local tl = script.Parent local resource_part = Instance.new("Part") local mouse_isdown function Selection(a) if a then player.Selection.Value = a else return player.Selection.Value end end local last_func = function() end local last_func_select = nil local move_dist = 1 local h = Instance.new("Hint") function mkarrow(color) local a = game.Lighting.Arrow:clone() a.BrickColor = BrickColor.new(color) a.Owner.Value = player return a end function round(a) a = a/move_dist if math.abs(math.ceil(a) - a) > math.abs(math.floor(a) - a) then a = math.floor(a) else a = math.ceil(a) end return a*move_dist end local selection_hud = { {o = mkarrow(21), d = Vector3.new(0, 0, -1), rf = function(p) p.CFrame = p.CFrame + Vector3.new(0, 0, -move_dist) end}, {o = mkarrow(21), d = Vector3.new(0, 0, 1), rf = function(p) p.CFrame = p.CFrame + Vector3.new(0, 0, move_dist) end}, {o = mkarrow(23), d = Vector3.new(1, 0, 0), rf = function(p) p.CFrame = p.CFrame + Vector3.new(move_dist, 0, 0) end}, {o = mkarrow(23), d = Vector3.new(-1, 0, 0), rf = function(p) p.CFrame = p.CFrame + Vector3.new(-move_dist, 0, 0) end}, {o = mkarrow(28), d = Vector3.new(0, 1, 0), rf = function(p) p.CFrame = p.CFrame + Vector3.new(0, move_dist, 0) end}, {o = mkarrow(28), d = Vector3.new(0, -1, 0), rf = function(p) p.CFrame = p.CFrame + Vector3.new(0, -move_dist, 0) end} } function Apply_Function(target) for _, tb in pairs(selection_hud) do if tb.o == target then tb.rf(Selection()) last_func = tb.rf last_func_select = Selection() return true end end return false end function Apply_Hud(part) local rot = (part.CFrame - part.CFrame.p) local sx, sy, sz = part.Size.x, part.Size.y, part.Size.z --calculate 3 verticies local a, b, c = (rot*CFrame.new(-sx/2, sy/2, sz/2)).p, (rot*CFrame.new(sx/2, -sy/2, sz/2)).p, (rot*CFrame.new(sx/2, sy/2, -sz/2)).p --calculate extent box local eb = Vector3.new(math.max(a.x, b.x, c.x), math.max(a.y, b.y, c.y), math.max(a.z, b.z, c.z)) for _, tb in pairs(selection_hud) do tb.o.Parent = game.Workspace print("Old size : <", part.Size, "> New size : <", eb*2, ">") tb.o.CFrame = part.CFrame + Vector3.new(tb.d.x * (eb.x + 1), tb.d.y * (eb.y + 1), tb.d.z * (eb.z + 1)) end end function Remove_Hud() for _, tb in pairs(selection_hud) do tb.o.Parent = nil end end function Apply_Text() if Selection() then h.Text = "Selection's position : < "..round(Selection().Position.x).." , "..round(Selection().Position.y).." , "..round(Selection().Position.z).." > Interval distance : "..move_dist else h.Text = "Selection's position : [ No selection ] Interval distance : "..move_dist end end tl.Selected:connect(function(m) h.Parent = player Apply_Text() if Selection() then Apply_Hud(Selection()) end m.Button1Down:connect(function() if not m.Target or m.Target == Selection() then return end if Apply_Function(m.Target) then Apply_Text() Apply_Hud(Selection()) return end if m.Target:FindFirstChild("Block") then if m.Target.Block.Value == player then if Selection() then Selection().Transparency = 0 Selection().Parent = game.Workspace end Selection(m.Target) Selection().Transparency = 0.5 Selection().Parent= player.Character else h.Text = "*ERROR* permission insufficient to edit this part" if Selection() then Selection().Transparency = 0 Selection().Parent = game.Workspace end player.Selection.Value = nil wait(1.5) Apply_Text() end else if Selection() then Selection().Transparency = 0 Selection().Parent = game.Workspace end player.Selection.Value = nil end Apply_Text() if Selection() then Apply_Hud(Selection()) else Remove_Hud() end end) m.KeyDown:connect(function(k_id) print(k_id:byte()) if k_id:byte() == 13 then --enter key if Selection() and Selection() == last_func_select then last_func(Selection()) Apply_Text() Apply_Hud(Selection()) else if Selection() then h.Text = "*ERROR* Selection has changed" wait(1.5) Apply_Text() else h.Text = "*ERROR* No selection" wait(1.5) Apply_Text() end end elseif k_id:byte() == 27 then if Selection() then Selection().Transparency = 0 Selection().Parent = game.Workspace end player.Selection.Value = nil Remove_Hud() h.Text = "*DESELECTED*" wait(1.5) Apply_Text() elseif k_id == "q" then if move_dist == 5 then move_dist = 2 elseif move_dist == 2 then move_dist = 1 elseif move_dist == 1 then move_dist = 0.5 elseif move_dist == 0.5 then move_dist = 0.1 elseif move_dist ==0.1 then move_dist = 5 end Apply_Text() elseif k_id == "e" then if move_dist == 0.1 then move_dist = 0.5 elseif move_dist == 0.5 then move_dist = 1 elseif move_dist == 1 then move_dist = 2 elseif move_dist == 2 then move_dist = 5 elseif move_dist == 5 then move_dist = 0.1 end Apply_Text() end end) m.Move:connect(function() m.Icon = "http://www.roblox.com/asset/?id=8301486" local a = (m.Target or game):FindFirstChild("Owner") if a then if a.Value == player then m.Icon = "http://www.roblox.com/asset/?id=8301491" end end end) m.Idle:connect(function() m.Icon = "http://www.roblox.com/asset/?id=8301486" local a = (m.Target or game):FindFirstChild("Owner") if a then if a.Value == player then m.Icon = "http://www.roblox.com/asset/?id=8301491" end end end) end) tl.Deselected:connect(function() Remove_Hud() h.Parent = nil end) true 0 Remove true false _main local player = script.Parent.Parent.Parent local tl = script.Parent local h = Instance.new("Hint") move_dist = 1 function round(a) a = a/move_dist if math.abs(math.ceil(a) - a) > math.abs(math.floor(a) - a) then a = math.floor(a) else a = math.ceil(a) end return a*move_dist end tl.Selected:connect(function(m) m.Button1Down:connect(function() if player.Selection.Value then player.Selection.Value.Parent = game.Workspace end if m.Target then local pm = m.Target:FindFirstChild("Block") if pm then if pm.Value == player then if player.Selection.Value == m.Target then player.Selection.Value = nil end m.Target.Parent = nil player.leaderstats.Bricks.Value = player.leaderstats.Bricks.Value - 1 end end end if player.Selection.Value then player.Selection.Value.Parent = player.Character end end) m.Move:connect(function() if player.Selection.Value then player.Selection.Value.Parent = game.Workspace end m.Icon = "http://www.roblox.com/asset/?id=8301486" local t = m.Target if player.Selection.Value then player.Selection.Value.Parent = player.Character end local val = (t or game):FindFirstChild("Block") if val then if val.Value == player then --remove m.Icon = "http://www.roblox.com/asset/?id=8302217" end end end) m.Idle:connect(function() if player.Selection.Value then player.Selection.Value.Parent = game.Workspace end m.Icon = "http://www.roblox.com/asset/?id=8301486" local t = m.Target if player.Selection.Value then player.Selection.Value.Parent = player.Character end local val = (t or game):FindFirstChild("Block") if val then if val.Value == player then --remove m.Icon = "http://www.roblox.com/asset/?id=8302217" end end end) end) true 0 10 1 Soundscape 1 true RBX42 RBX43 RBX44 RBX45 RBX46 RBX47 RBX48 RBX49 RBX50 RBX51 RBX52 RBX53 RBX54 RBX55 PhysicsService true RBX57 Selection true RBX59 4287664272 1 4278190080 4278190080 41.7332993 Lighting 4291019720 14:00:00 true true -0.5 0.5 0 0 -0.5 0.5 0 0 21 0 2.4000001 0 1 0 0 0 1 0 0 0 1 true 0 true false 0.5 0 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 false 256 A 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 true 1 1 1 1 0.5 0 0 2 2 Mesh 0 0 0 1 1 1 1 1 1 true true -0.5 0.5 0 0 -0.5 0.5 0 0 21 0 2.4000001 0 1 0 0 0 1 0 0 0 1 true 0 true false 0.5 0 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 false 256 Arrow 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 true 1 1 1 1 2 2 3 Mesh 0 0 0 0.5 0.5 0.5 1 1 1 true Owner null true true -0.5 0.5 0 0 -0.5 0.5 0 0 194 0 2.4000001 0 1 0 0 0 1 0 0 0 1 true 0 true false 0.5 0 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 false 256 Part 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 true 1 1 1 1 Block null true false CamFocus game.Workspace.CurrentCamera.CameraType = 1 game.Workspace.CurrentCamera.CameraSubject = game.Workspace.Instructions1 true 0 Instructions true false _main local tl = script.Parent local player = script.Parent.Parent.Parent local view = { game.Workspace.Instructions1, game.Workspace.Instructions2, game.Workspace.Instructions3, game.Workspace.Instructions4, game.Workspace.Instructions5, game.Workspace.Instructions6, game.Workspace.Instructions7, game.Workspace.Instructions8, game.Workspace.Instructions9 } local viewnum = 1 tl.Selected:connect(function(m) game.Workspace.CurrentCamera.CameraType = 1 game.Workspace.CurrentCamera.CameraSubject = view[viewnum] m.Button1Down:connect(function() if m.Target == view[viewnum] then viewnum = viewnum + 1 if viewnum > #view then player.Character.Parent = game.Workspace game.Workspace.CurrentCamera.CameraSubject = player.Character.Humanoid player.Character.Humanoid.Health = 0 end game.Workspace.CurrentCamera.CameraSubject = view[viewnum] end end) end) true Instance true ChangeHistoryService true