Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local service = setmetatable({}, {__index = function(t, k) return game:GetService(k) end })
- local bpArt = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local ArtFrame = Instance.new("Frame")
- local ArtList = Instance.new("ScrollingFrame")
- local URL = Instance.new("TextBox")
- local Import = Instance.new("TextButton")
- local SpawnFrame = Instance.new("Frame")
- local TreeList = Instance.new("ScrollingFrame")
- local Spawn = Instance.new("TextButton")
- local Back = Instance.new("TextButton")
- local rotationLeft = Instance.new("TextButton")
- local rotationRight = Instance.new("TextButton")
- local offsetUp = Instance.new("TextButton")
- local offsetDown = Instance.new("TextButton")
- local offSetLabel = Instance.new("TextLabel")
- local rotationLabel = Instance.new("TextLabel")
- local TreeType = Instance.new("TextBox")
- local offSet = Instance.new("TextBox")
- local Close = Instance.new("TextButton")
- local Title = Instance.new("TextLabel")
- local Plot = Instance.new("TextButton")
- bpArt.Name = "bpArt"
- bpArt.Parent = game.CoreGui
- Frame.Parent = bpArt
- Frame.Active = true
- Frame.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame.BorderColor3 = Color3.new(0, 0, 0)
- Frame.Draggable = true
- Frame.Position = UDim2.new(0, 500, 0, 135)
- Frame.Selectable = true
- Frame.Size = UDim2.new(0, 345, 0, 230)
- ArtFrame.Name = "ArtFrame"
- ArtFrame.Parent = Frame
- ArtFrame.BackgroundColor3 = Color3.new(0.168627, 0.168627, 0.172549)
- ArtFrame.BorderColor3 = Color3.new(0, 0, 0)
- ArtFrame.Position = UDim2.new(0, 0, 0, 20)
- ArtFrame.Size = UDim2.new(0, 345, 0, 210)
- ArtList.Name = "ArtList"
- ArtList.Parent = ArtFrame
- ArtList.BackgroundColor3 = Color3.new(0, 0, 0)
- ArtList.BorderColor3 = Color3.new(0, 0, 0)
- ArtList.Position = UDim2.new(0, 10, 0, 10)
- ArtList.Size = UDim2.new(0, 325, 0, 135)
- URL.Name = "URL"
- URL.Parent = ArtFrame
- URL.BackgroundColor3 = Color3.new(0.403922, 0.403922, 0.403922)
- URL.Position = UDim2.new(0, 70, 0, 152)
- URL.Size = UDim2.new(0, 200, 0, 20)
- URL.Font = Enum.Font.Gotham
- URL.PlaceholderColor3 = Color3.new(0, 0, 0)
- URL.PlaceholderText = "Custom Art URL"
- URL.Text = ""
- URL.TextColor3 = Color3.new(0, 0, 0)
- URL.TextSize = 14
- Import.Name = "Import"
- Import.Parent = ArtFrame
- Import.BackgroundColor3 = Color3.new(1, 1, 1)
- Import.Position = UDim2.new(0, 70, 0, 175)
- Import.Size = UDim2.new(0, 200, 0, 30)
- Import.Style = Enum.ButtonStyle.RobloxButton
- Import.Font = Enum.Font.Gotham
- Import.Text = "Import Art"
- Import.TextColor3 = Color3.new(1, 1, 1)
- Import.TextSize = 14
- SpawnFrame.Name = "SpawnFrame"
- SpawnFrame.Parent = Frame
- SpawnFrame.BackgroundColor3 = Color3.new(0.168627, 0.168627, 0.172549)
- SpawnFrame.BorderColor3 = Color3.new(0, 0, 0)
- SpawnFrame.Position = UDim2.new(0, 0, 0, 20)
- SpawnFrame.Size = UDim2.new(0, 345, 0, 210)
- SpawnFrame.Visible = false
- TreeList.Name = "TreeList"
- TreeList.Parent = SpawnFrame
- TreeList.BackgroundColor3 = Color3.new(0, 0, 0)
- TreeList.BorderColor3 = Color3.new(0.168627, 0.168627, 0.172549)
- TreeList.Position = UDim2.new(0, 10, 0, 10)
- TreeList.Size = UDim2.new(0, 170, 0, 160)
- Spawn.Name = "Spawn"
- Spawn.Parent = SpawnFrame
- Spawn.BackgroundColor3 = Color3.new(1, 1, 1)
- Spawn.Position = UDim2.new(0, 15, 0, 175)
- Spawn.Size = UDim2.new(0, 155, 0, 30)
- Spawn.Style = Enum.ButtonStyle.RobloxButton
- Spawn.Font = Enum.Font.Gotham
- Spawn.Text = "Spawn Art"
- Spawn.TextColor3 = Color3.new(1, 1, 1)
- Spawn.TextSize = 14
- Back.Name = "Back"
- Back.Parent = SpawnFrame
- Back.BackgroundColor3 = Color3.new(1, 1, 1)
- Back.Position = UDim2.new(0, 175, 0, 175)
- Back.Size = UDim2.new(0, 155, 0, 30)
- Back.Style = Enum.ButtonStyle.RobloxButton
- Back.Font = Enum.Font.Gotham
- Back.Text = "Back"
- Back.TextColor3 = Color3.new(1, 1, 1)
- Back.TextSize = 14
- rotationLeft.Name = "rotationLeft"
- rotationLeft.Parent = SpawnFrame
- rotationLeft.BackgroundColor3 = Color3.new(1, 1, 1)
- rotationLeft.Position = UDim2.new(0, 215, 0, 80)
- rotationLeft.Size = UDim2.new(0, 35, 0, 30)
- rotationLeft.Style = Enum.ButtonStyle.RobloxButton
- rotationLeft.Font = Enum.Font.Gotham
- rotationLeft.Text = "◄"
- rotationLeft.TextColor3 = Color3.new(1, 1, 1)
- rotationLeft.TextSize = 14
- rotationRight.Name = "rotationRight"
- rotationRight.Parent = SpawnFrame
- rotationRight.BackgroundColor3 = Color3.new(1, 1, 1)
- rotationRight.Position = UDim2.new(0, 275, 0, 80)
- rotationRight.Size = UDim2.new(0, 35, 0, 30)
- rotationRight.Style = Enum.ButtonStyle.RobloxButton
- rotationRight.Font = Enum.Font.Gotham
- rotationRight.Text = "►"
- rotationRight.TextColor3 = Color3.new(1, 1, 1)
- rotationRight.TextSize = 14
- offsetUp.Name = "offsetUp"
- offsetUp.Parent = SpawnFrame
- offsetUp.BackgroundColor3 = Color3.new(1, 1, 1)
- offsetUp.Position = UDim2.new(0, 245, 0, 50)
- offsetUp.Size = UDim2.new(0, 35, 0, 30)
- offsetUp.Style = Enum.ButtonStyle.RobloxButton
- offsetUp.Font = Enum.Font.Gotham
- offsetUp.Text = "▲"
- offsetUp.TextColor3 = Color3.new(1, 1, 1)
- offsetUp.TextSize = 14
- offsetDown.Name = "offsetDown"
- offsetDown.Parent = SpawnFrame
- offsetDown.BackgroundColor3 = Color3.new(1, 1, 1)
- offsetDown.Position = UDim2.new(0, 245, 0, 110)
- offsetDown.Size = UDim2.new(0, 35, 0, 30)
- offsetDown.Style = Enum.ButtonStyle.RobloxButton
- offsetDown.Font = Enum.Font.Gotham
- offsetDown.Text = "▼"
- offsetDown.TextColor3 = Color3.new(1, 1, 1)
- offsetDown.TextSize = 14
- offSetLabel.Name = "offSetLabel"
- offSetLabel.Parent = SpawnFrame
- offSetLabel.BackgroundColor3 = Color3.new(1, 1, 1)
- offSetLabel.BackgroundTransparency = 1
- offSetLabel.Position = UDim2.new(0, 270, 0, 150)
- offSetLabel.Size = UDim2.new(0, 80, 0, 20)
- offSetLabel.Font = Enum.Font.Gotham
- offSetLabel.Text = "↑ Offset ↓"
- offSetLabel.TextColor3 = Color3.new(1, 1, 1)
- offSetLabel.TextSize = 12
- rotationLabel.Name = "rotationLabel"
- rotationLabel.Parent = SpawnFrame
- rotationLabel.BackgroundColor3 = Color3.new(1, 1, 1)
- rotationLabel.BackgroundTransparency = 1
- rotationLabel.Position = UDim2.new(0, 190, 0, 150)
- rotationLabel.Size = UDim2.new(0, 75, 0, 20)
- rotationLabel.Font = Enum.Font.Gotham
- rotationLabel.Text = "→ Rotation ←"
- rotationLabel.TextColor3 = Color3.new(1, 1, 1)
- rotationLabel.TextSize = 12
- TreeType.Name = "TreeType"
- TreeType.Parent = SpawnFrame
- TreeType.BackgroundColor3 = Color3.new(0.403922, 0.403922, 0.403922)
- TreeType.Position = UDim2.new(0, 190, 0, 10)
- TreeType.Size = UDim2.new(0, 145, 0, 20)
- TreeType.Font = Enum.Font.Gotham
- TreeType.PlaceholderColor3 = Color3.new(0, 0, 0)
- TreeType.PlaceholderText = "Select a Tree Type"
- TreeType.Text = ""
- TreeType.TextColor3 = Color3.new(0, 0, 0)
- TreeType.TextSize = 14
- offSet.Name = "offSet"
- offSet.Parent = SpawnFrame
- offSet.BackgroundColor3 = Color3.new(0.403922, 0.403922, 0.403922)
- offSet.Position = UDim2.new(0, 310, 0, 120)
- offSet.Size = UDim2.new(0, 25, 0, 20)
- offSet.Font = Enum.Font.Gotham
- offSet.PlaceholderColor3 = Color3.new(0, 0, 0)
- offSet.PlaceholderText = "Select a Tree Type"
- offSet.Text = "0.1"
- offSet.TextColor3 = Color3.new(0, 0, 0)
- offSet.TextSize = 14
- Close.Name = "Close"
- Close.Parent = Frame
- Close.BackgroundColor3 = Color3.new(1, 1, 1)
- Close.BackgroundTransparency = 1
- Close.Position = UDim2.new(0, 325, 0, 0)
- Close.Size = UDim2.new(0, 20, 0, 20)
- Close.Font = Enum.Font.Gotham
- Close.Text = "X"
- Close.TextColor3 = Color3.new(1, 0, 0)
- Close.TextSize = 14
- Title.Name = "Title"
- Title.Parent = Frame
- Title.BackgroundColor3 = Color3.new(1, 1, 1)
- Title.BackgroundTransparency = 1
- Title.Size = UDim2.new(0, 325, 0, 20)
- Title.Font = Enum.Font.Gotham
- Title.Text = "Lumber Tycoon 2 - Blueprint Art"
- Title.TextColor3 = Color3.new(1, 1, 1)
- Title.TextSize = 14
- Plot.Name = "Plot"
- Plot.Parent = Frame
- Plot.BackgroundColor3 = Color3.new(1, 1, 1)
- Plot.BackgroundTransparency = 1
- Plot.Size = UDim2.new(0, 20, 0, 20)
- Plot.Font = Enum.Font.Gotham
- Plot.Text = "tp"
- Plot.TextColor3 = Color3.new(1, 0, 0)
- Plot.TextSize = 12
- local Player = game:GetService("Players").LocalPlayer
- local Root = workspace[Player.Name].HumanoidRootPart
- local Mouse = Player:GetMouse()
- local Properties = workspace.Properties
- local open = false
- Mouse.KeyDown:connect(function(key)
- if key == "p" then
- if open == false then
- open = true
- Frame.Visible = true
- else if open == true then
- open = false
- Frame.Visible = false
- end
- end
- end
- end)
- Plot.MouseButton1Click:connect(function()
- for i,v in pairs(Properties:GetChildren()) do
- if v.Owner.Value == Player then
- Root.CFrame = v.OriginSquare.CFrame + Vector3.new(0,10,0)
- end
- end
- end)
- Close.MouseButton1Click:connect(function()
- bpArt:Destroy()
- end)
- function Create(cls,props)
- local inst = Instance.new(cls)
- for i,v in pairs(props) do
- inst[i] = v
- end
- return inst
- end
- SpeedV = true
- local art = {
- "2894414881",
- "2894415831",
- "2894416885",
- "2894418864",
- "2894419884",
- "2894420664",
- "4237120278",
- "4235709566",
- "2894423741",
- "2894424580",
- "2897275738",
- "2897473382",
- "2862577766",
- "2862598561",
- "2867990114",
- "2865494299",
- "2867818346",
- "2865863886",
- "2870128669",
- "2870615519",
- "2873292333",
- "2873620801",
- "2873647619",
- "2870435651",
- "3286916980",
- "2897785718",
- "4372006055",
- "4390546855",
- "4390551952",
- "4390553897",
- "4391280571",
- "4430013876",
- "4514300944",
- "4514305048",
- "4514306534",
- "4514307113"
- }
- function GetArt()
- local inc=0
- for i,v in pairs(art) do
- local artName = game:GetService("MarketplaceService"):GetProductInfo(v).Name
- ArtList.CanvasSize=UDim2.new(0,0,0,25*inc)
- local SellButton = Create("TextButton",{Parent=ArtList,BackgroundColor3=Color3.new(0.168627,0.168627,0.172549),BorderColor3=Color3.new(0,0,0),Size=UDim2.new(0,300,0,20),Position=UDim2.new(0,5,0,20*inc),Font=Enum.Font.Gotham,TextColor3=Color3.new(1, 1, 1),TextSize=14,Text=artName})
- SellButton.MouseButton1Click:Connect(function()
- selectArt = v
- Import.Text = "Import: "..artName
- end)
- inc = inc + 1
- end
- inc = 0
- end
- GetArt()
- local colors =
- {
- {BrickColor.new("Hot pink"),"GenericSpecial"},
- {BrickColor.new("Lapis"),"CaveCrawler"},
- {BrickColor.new("Sand Red"),"Oak"},
- {BrickColor.new("Mid gray"),"Birch"},
- {BrickColor.new("Brick yellow"),"Fir"},
- {BrickColor.new("Dusty rose"),"Cherry"},
- {BrickColor.new("Nougat"),"Generic"},
- {BrickColor.new("Khaki"),"Palm"},
- {BrickColor.new("Reddish brown"),"Walnut"},
- {BrickColor.new("Rust"),"Koa"},
- {BrickColor.new("Really red"),"Volcano"},
- {BrickColor.new("Br. yellowish orange"),"GoldSwampy"},
- {BrickColor.new("Sea green"),"GreenSwampy"},
- {BrickColor.new("New Yeller"),"SnowGlow"},
- {BrickColor.new("CGA brown"),"Spooky"},
- {BrickColor.new("CGA brown"),"SpookyNeon"},
- {BrickColor.new("Pastel blue-green"),"Frost"},
- {BrickColor.new("White"),"LoneCave"}
- }
- function GetWood()
- local inc=0
- for i,v in pairs(colors) do
- TreeList.CanvasSize=UDim2.new(0,0,0,25*inc)
- local SellButton = Create("TextButton",{Parent=TreeList,BackgroundColor3=Color3.new(0.168627,0.168627,0.172549),BorderColor3=Color3.new(0,0,0),Size=UDim2.new(0,145,0,20),Position=UDim2.new(0,5,0,20*inc),Font=Enum.Font.Gotham,TextColor3=Color3.new(1, 1, 1),TextSize=14,Text=v[2]})
- SellButton.MouseButton1Click:Connect(function()
- TreeType.Text = v[2]
- Spawn.Text = "Spawn: "..v[2]
- end)
- inc = inc + 1
- end
- inc = 0
- end
- GetWood()
- local stored = {}
- function isStored(bp)
- for i,v in pairs(stored) do
- if v == bp then
- return false
- end
- end
- return true
- end
- function getBP(position,name)
- for i,Model in pairs(workspace.PlayerModels:GetChildren()) do
- if Model:FindFirstChild("Type") and Model.Name == name and Model.Type.Value == "Blueprint" and Model.Owner.Value == Player and isStored(Model) then
- table.insert(stored,Model)
- return Model
- end
- end
- end
- function CreateBlueprint(ItemName, Position)
- game.ReplicatedStorage.PlaceStructure.ClientPlacedBlueprint:FireServer(ItemName, Position - Vector3.new(0,50,0), Player)
- end
- PlaceS = game.ReplicatedStorage.PlaceStructure.ClientPlacedStructure
- function getColorTag(bp)
- for i,v in pairs(bp:GetDescendants()) do
- if v.Name == "COLORTAG" then
- return v.Value
- end
- end
- return nil
- end
- function toCF(str)
- return(CFrame.new(str:match("(.+),(.+),(.+),(.+),(.+),(.+),(.+),(.+),(.+),(.+),(.+),(.+)")))
- end
- function toVec(str)
- return(Vector3.new(str:match("(.+),(.+),(.+)")))
- end
- function import(pasteb,pos)
- local Data = workspace.PreviewM
- local head = Player.Character.Head.CFrame
- local WoodName = TreeType.Text
- for i, Blueprint in pairs(Data:GetChildren()) do
- print(Blueprint.Name)
- if Blueprint.Name == "Part" then
- else
- print()
- local BPThing = CreateBlueprint(Blueprint.Name, head)
- if not SpeedV then
- wait()
- end
- end
- end
- wait(5)
- for i, Blueprint in pairs(Data:GetChildren()) do
- if Blueprint.Name ~= "Part" then
- if Blueprint.PrimaryPart ~= nil then
- local BPThing = getBP(head, Blueprint.Name)
- if BPThing == nil then
- warn(Blueprint.Name .. " failed to place.")
- else
- wait(.05)
- PlaceS:FireServer(Blueprint.Name, Blueprint.PrimaryPart.CFrame, Player, WoodName, BPThing, nil)
- if not SpeedV then
- wait()
- end
- end
- end
- end
- end
- end
- function getColor(woodType)
- for i,v in pairs(colors) do
- if v[2] == woodType then
- return v[1]
- end
- end
- return BrickColor.new("Medium stone grey")
- end
- function getColorWood(colorType)
- for i,v in pairs(colors) do
- if v[1] == BrickColor.new(colorType) then
- return tostring(v[2])
- end
- end
- return "Generic"
- end
- function preview(id,pos)
- if workspace:FindFirstChild("PreviewM") then
- workspace.PreviewM:Destroy()
- end
- if id == nil then
- return
- end
- local ModelPreview = Instance.new("Model")
- local ImportingID = game:GetObjects("rbxassetid://" .. id)[1]
- for i,v in pairs(ImportingID:GetDescendants()) do
- if v:FindFirstChild("Main") then
- print(v)
- v.Parent = ModelPreview
- if v:FindFirstChild("BuildDependentWood") then
- local st = Instance.new("StringValue")
- st.Name = "COLORTAG"
- st.Value = getColorWood(tostring(v.BuildDependentWood.BrickColor))
- warn("GOT: " .. st.Value)
- st.Parent = v
- v.PrimaryPart = v.Main
- for i,e in pairs(v:GetChildren()) do
- if e:IsA("BasePart") then
- e.BrickColor = v.BuildDependentWood.BrickColor
- e.Transparency = 0.6
- e.CanCollide = false
- end
- end
- end
- end
- end
- local c = Instance.new("Part")
- c.Transparency = 0
- c.Size = Vector3.new(1,1,1)
- c.Anchored = true
- c.CanCollide = false
- c.CFrame = CFrame.new(ModelPreview:GetBoundingBox().X,ModelPreview:GetBoundingBox().Y - (ModelPreview:GetExtentsSize().Y / 2),ModelPreview:GetBoundingBox().Z)
- c.Parent = ModelPreview
- ModelPreview.PrimaryPart = c
- ModelPreview:SetPrimaryPartCFrame(CFrame.new(Player.Character.Head.CFrame.X,Player.Character.Head.CFrame.Y - 5,Player.Character.Head.CFrame.Z))
- ModelPreview.Name = "PreviewM"
- ModelPreview.Parent = workspace
- end
- function rotate(direction)
- if direction == "left" then
- workspace.PreviewM:SetPrimaryPartCFrame(workspace.PreviewM.PrimaryPart.CFrame * CFrame.Angles(0, math.rad(-90), 0))
- elseif direction == "right" then
- workspace.PreviewM:SetPrimaryPartCFrame(workspace.PreviewM.PrimaryPart.CFrame * CFrame.Angles(0, math.rad(90), 0))
- end
- end
- function raise(direction)
- if direction == "up" then
- workspace.PreviewM:SetPrimaryPartCFrame(workspace.PreviewM.PrimaryPart.CFrame + Vector3.new(0,(offSet.Text),0))
- elseif direction == "down" then
- workspace.PreviewM:SetPrimaryPartCFrame(workspace.PreviewM.PrimaryPart.CFrame - Vector3.new(0,(offSet.Text),0))
- end
- end
- Import.MouseButton1Click:Connect(function()
- if selectArt ~= "" then
- ArtFrame.Visible = false
- local artStyle = tostring(selectArt)
- warn("Loading Art: " .. selectArt)
- SpawnFrame.Visible = true
- preview(artStyle,Player.Character.Head.Position)
- else
- warn("Cannot continue if no art is selected.")
- end
- end)
- URL.FocusLost:Connect(function()
- if URL.Text == "" or tonumber(URL.Text) == nil then
- return
- end
- selectArt = URL.Text
- Import.Text = "Import: "..URL.Text
- end)
- Spawn.MouseButton1Click:Connect(function()
- import()
- artStyle = nil
- Import.Text = "Import Art"
- Spawn.Text = "Spawn Art"
- selectArt = ""
- ArtFrame.Visible = true
- preview(nil)
- SpawnFrame.Visible = false
- end)
- rotationLeft.MouseButton1Click:Connect(function()
- rotate("left")
- end)
- rotationRight.MouseButton1Click:Connect(function()
- rotate("right")
- end)
- offsetUp.MouseButton1Click:Connect(function()
- raise("up")
- end)
- offsetDown.MouseButton1Click:Connect(function()
- raise("down")
- end)
- Back.MouseButton1Click:Connect(function()
- artStyle = nil
- Import.Text = "Import Art"
- Spawn.Text = "Spawn Art"
- selectArt = ""
- ArtFrame.Visible = true
- preview(nil,nil)
- SpawnFrame.Visible = false
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement