Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sizem = 3
- local terrainmaterial = ("Slate")
- local screengui = Instance.new("ScreenGui")
- screengui.Parent = game.Players.LocalPlayer.PlayerGui
- textbutton11 = Instance.new("TextButton")
- textbutton11.Parent = screengui
- textbutton11.Text = ("Set Material")
- textbutton11.Position = UDim2.new(0, 0, 0.476, 0)
- textbutton11.Size = UDim2.new(0, 126, 0, 18)
- textbutton11.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- textbutton11.TextColor3 = Color3.new(240, 240, 240)
- textbutton11.BackgroundTransparency = (0)
- textbutton11.BorderSizePixel = (0)
- local textbar12 = Instance.new("TextBox")
- textbar12.Parent = screengui
- textbar12.Position = UDim2.new(0, 0, 0.512, 0)
- textbar12.Size = UDim2.new(0, 126, 0, 18)
- textbar12.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- textbar12.TextColor3 = Color3.new(240, 240, 240)
- textbar12.BackgroundTransparency = (0)
- textbar12.BorderSizePixel = (0)
- textbar12.Text = ("Slate")
- function onClick()
- terrainmaterial = (textbar12.Text)
- end
- textbutton11.MouseButton1Click:Connect(onClick)
- while true do
- wait(0.01)
- game.Workspace.Terrain:Clear()
- for i,w in pairs(game.Workspace:getChildren()) do
- if w.ClassName == ("Model") then
- for i,v in pairs(w:GetChildren()) do
- if v.ClassName == ("Part") then
- v.Transparency = 1
- if v:FindFirstChild("face") ~= nil then
- v.face:Destroy()
- end
- game.Workspace.Terrain:FillBlock(CFrame.new(v.Position.X, v.Position.Y, v.Position.Z), Vector3.new(v.Size.X * sizem, v.Size.Y * sizem, v.Size.Z * sizem), terrainmaterial)
- end
- if v.ClassName == ("Accessory") then
- v:Destroy()
- end
- end
- end
- if w.ClassName == ("Part") then
- if w.Size.X < 100 and w.Size.Y < 100 and w.Size.Z < 100 then
- game.Workspace.Terrain:FillBlock(CFrame.new(w.Position.X, w.Position.Y, w.Position.Z), Vector3.new(w.Size.X * sizem, w.Size.Y * sizem, w.Size.Z * sizem), terrainmaterial)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement