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 PlankScreen = Instance.new("ScreenGui")
- local PlankFrame = Instance.new("Frame")
- local ProcessedWoodList = Instance.new("ScrollingFrame")
- local TpAllPlanks = Instance.new("TextButton")
- local SellPlanks = Instance.new("TextButton")
- --Properties:
- PlankScreen.Name = "PlankScreen"
- PlankScreen.Parent = game.CoreGui.LT2.MainFrame.ButtonFrame.TpPlank
- PlankFrame.Name = "PlankFrame"
- PlankFrame.Parent = PlankScreen
- PlankFrame.BackgroundColor3 = Color3.new(0.145098, 0.145098, 0.14902)
- PlankFrame.BorderColor3 = Color3.new(0, 0, 0)
- PlankFrame.BorderSizePixel = 2
- PlankFrame.Position = UDim2.new(0, -98, 0, -285)
- PlankFrame.Size = UDim2.new(0, 363, 0, 280)
- ProcessedWoodList.Name = "ProcessedWoodList"
- ProcessedWoodList.Parent = PlankFrame
- ProcessedWoodList.BackgroundColor3 = Color3.new(0.145098, 0.145098, 0.14902)
- ProcessedWoodList.BorderColor3 = Color3.new(0, 0, 0)
- ProcessedWoodList.BorderSizePixel = 2
- ProcessedWoodList.Size = UDim2.new(0, 363, 0, 210)
- TpAllPlanks.Name = "TpAllPlanks"
- TpAllPlanks.Parent = PlankFrame
- TpAllPlanks.BackgroundColor3 = Color3.new(0.054902, 0.054902, 0.0588235)
- TpAllPlanks.BorderColor3 = Color3.new(0, 0, 0)
- TpAllPlanks.BorderSizePixel = 2
- TpAllPlanks.Position = UDim2.new(0, 55, 0, 250)
- TpAllPlanks.Size = UDim2.new(0, 250, 0, 20)
- TpAllPlanks.Font = Enum.Font.Gotham
- TpAllPlanks.Text = "TP ALL PLANKS"
- TpAllPlanks.TextColor3 = Color3.new(1, 1, 1)
- TpAllPlanks.TextSize = 14
- SellPlanks.Name = "SellPlanks"
- SellPlanks.Parent = PlankFrame
- SellPlanks.BackgroundColor3 = Color3.new(0.054902, 0.054902, 0.0588235)
- SellPlanks.BorderColor3 = Color3.new(0, 0, 0)
- SellPlanks.BorderSizePixel = 2
- SellPlanks.Position = UDim2.new(0, 55, 0, 220)
- SellPlanks.Size = UDim2.new(0, 250, 0, 20)
- SellPlanks.Font = Enum.Font.Gotham
- SellPlanks.Text = "SELL ALL PLANKS"
- SellPlanks.TextColor3 = Color3.new(1, 1, 1)
- SellPlanks.TextSize = 14
- function Create(cls,props)
- local inst = Instance.new(cls)
- for i,v in pairs(props) do
- inst[i] = v
- end
- return inst
- end
- local MoneyCooldown = false
- local CurrentSlot = game.Players.LocalPlayer:WaitForChild("CurrentSaveSlot").Value
- local ScriptLoadOrSave = false
- local CurrentlySavingOrLoading = game.Players.LocalPlayer:WaitForChild("CurrentlySavingOrLoading")
- local TreeLogs={}
- local WoodPlanks={}
- local Render = service.RunService.RenderStepped
- local UserInputService = game:GetService("UserInputService")
- local shiftKeyL = Enum.KeyCode.LeftShift
- local Replicated = service.ReplicatedStorage
- local Client = Replicated.Interaction.ClientSetListPlayer
- local Dragging = Replicated.Interaction.ClientIsDragging
- local Properties = service.Workspace.Properties
- local Players = service.Players
- local PlayerModels = service.Workspace.PlayerModels
- local Player = Players.LocalPlayer
- local Char = Player.Character
- local Hum = Char.Humanoid
- local Root = Char.HumanoidRootPart
- local Mouse = Player:GetMouse()
- local Noclipper = false
- local Open = true
- local throwAxe = false
- local misc = false
- local player = false
- local slot = false
- local box = false
- local log = false
- local plank = false
- local players = false
- local wp = false
- local other = false
- function UpdatePlanks()
- local inc = 0
- WoodPlanks={}
- for i,v in pairs(PlayerModels:GetChildren()) do
- if v.Name == "Plank" and v.Owner.Value == Player then
- if v:FindFirstChild("TreeClass") and WoodPlanks[v.TreeClass.Value] then
- WoodPlanks[v.TreeClass.Value] = WoodPlanks[v.TreeClass.Value]
- WoodPlanks[v.TreeClass.Value]["Wood"][v] = v
- elseif v:FindFirstChild("TreeClass") then
- WoodPlanks[v.TreeClass.Value]={Wood = {v.WoodSection}}
- end
- end
- end
- end
- function UpdateSellPlanks()
- local inc = 0
- UpdatePlanks()
- ProcessedWoodList:ClearAllChildren()
- for i,v in pairs(WoodPlanks) do
- ProcessedWoodList.CanvasSize=UDim2.new(0,0,0,25*inc)
- local SellButton=Create("TextButton",{Parent=ProcessedWoodList,Size=UDim2.new(1,-14,0,20),Position=UDim2.new(0,5,0,35*inc),Text=" "..i,TextXAlignment="Left",ZIndex=3,BorderSizePixel=0})
- local Color = Create("Frame",{Parent=ProcessedWoodList,Size=UDim2.new(0,5,0,20),Position=UDim2.new(0,0,0,35*inc),BorderSizePixel=0,ZIndex=3,BackgroundColor3=v["Wood"][1].Color})
- SellButton.MouseButton1Click:Connect(function()
- for x = 1,100 do
- v["Wood"][1].CFrame=CFrame.new(Root.Position + Vector3.new(0, 20, 0))
- Dragging:FireServer(v["Wood"][1].Parent)
- end
- end)
- inc = inc + 1
- end
- inc = 0
- end
- PlayerModels.ChildRemoved:Connect(function(thing)
- if thing.Owner.Value == Player then
- UpdateSellPlanks()
- end
- end)
- UpdateSellPlanks()
- --- Tp all Planks ---
- TpAllPlanks.MouseButton1Click:Connect(function()
- for _, Plank in pairs(PlayerModels:GetChildren()) do
- if Plank.Name == "Plank" and Plank:findFirstChild("Owner") then
- if Plank.Owner.Value == Player then
- Plank:MoveTo(Root.Position + Vector3.new(0, 20, 0))
- for i = 1,100 do
- Dragging:FireServer(Plank)
- end
- end
- end
- end
- end)
- --- Sell Planks ---
- SellPlanks.MouseButton1Click:Connect(function()
- for _, Plank in pairs(PlayerModels:GetChildren()) do
- if Plank.Name == "Plank" and Plank:findFirstChild("Owner") then
- if Plank.Owner.Value == Player then
- for i,v in pairs(Plank:GetChildren()) do
- if v.Name == "WoodSection" then
- spawn(function()
- for i = 1,10 do
- wait()
- v.CFrame = CFrame.new(Vector3.new(315, -0.296, 85.791))*CFrame.Angles(math.rad(90),0,0)
- end
- end)
- end
- end
- spawn(function()
- for i = 1,20 do
- wait()
- Dragging:FireServer(Plank)
- end
- end)
- end
- end
- end
- end)
Add Comment
Please, Sign In to add comment