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 LogScreen = Instance.new("ScreenGui")
- local LogFrame = Instance.new("Frame")
- local Choppedtreelogs = Instance.new("ScrollingFrame")
- local TpAllWood = Instance.new("TextButton")
- local SellWood = Instance.new("TextButton")
- --Properties:
- LogScreen.Name = "LogScreen"
- LogScreen.Parent = game.CoreGui.LT2.MainFrame.ButtonFrame.TpLogs
- LogFrame.Name = "LogFrame"
- LogFrame.Parent = LogScreen
- LogFrame.BackgroundColor3 = Color3.new(0.145098, 0.145098, 0.14902)
- LogFrame.BorderColor3 = Color3.new(0, 0, 0)
- LogFrame.BorderSizePixel = 2
- LogFrame.Position = UDim2.new(0, -98, 0, -285)
- LogFrame.Size = UDim2.new(0, 363, 0, 280)
- Choppedtreelogs.Name = "Choppedtreelogs"
- Choppedtreelogs.Parent = LogFrame
- Choppedtreelogs.BackgroundColor3 = Color3.new(0.145098, 0.145098, 0.14902)
- Choppedtreelogs.BorderColor3 = Color3.new(0, 0, 0)
- Choppedtreelogs.BorderSizePixel = 2
- Choppedtreelogs.Size = UDim2.new(0, 363, 0, 210)
- TpAllWood.Name = "TpAllWood"
- TpAllWood.Parent = LogFrame
- TpAllWood.BackgroundColor3 = Color3.new(0.054902, 0.054902, 0.0588235)
- TpAllWood.BorderColor3 = Color3.new(0, 0, 0)
- TpAllWood.BorderSizePixel = 2
- TpAllWood.Position = UDim2.new(0, 55, 0, 220)
- TpAllWood.Size = UDim2.new(0, 250, 0, 20)
- TpAllWood.Font = Enum.Font.Gotham
- TpAllWood.Text = "TP ALL WOOD"
- TpAllWood.TextColor3 = Color3.new(1, 1, 1)
- TpAllWood.TextSize = 14
- SellWood.Name = "SellWood"
- SellWood.Parent = LogFrame
- SellWood.BackgroundColor3 = Color3.new(0.054902, 0.054902, 0.0588235)
- SellWood.BorderColor3 = Color3.new(0, 0, 0)
- SellWood.BorderSizePixel = 2
- SellWood.Position = UDim2.new(0, 55, 0, 250)
- SellWood.Size = UDim2.new(0, 250, 0, 20)
- SellWood.Font = Enum.Font.Gotham
- SellWood.Text = "SELL ALL WOOD"
- SellWood.TextColor3 = Color3.new(1, 1, 1)
- SellWood.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 UpdateLogs()
- local inc = 0
- TreeLogs = {}
- for _, Log in pairs(service.Workspace.LogModels:GetChildren()) do
- if Log.Name:sub(1, 6) == "Loose_" and Log.Owner.Value == Player then
- if Log:FindFirstChild("TreeClass") and TreeLogs[Log.TreeClass.Value] then
- TreeLogs[Log.TreeClass.Value] = TreeLogs[Log.TreeClass.Value]
- TreeLogs[Log.TreeClass.Value]["Logs"][Log] = Log
- elseif Log:FindFirstChild("TreeClass") then
- TreeLogs[Log.TreeClass.Value] = {Logs={Log.WoodSection}}
- end
- end
- end
- end
- function UpdateTpLogs()
- local inc=0
- UpdateLogs()
- Choppedtreelogs:ClearAllChildren()
- for i,v in pairs(TreeLogs) do
- Choppedtreelogs.CanvasSize=UDim2.new(0,0,0,25*inc)
- local SellButton = Create("TextButton",{Parent=Choppedtreelogs,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=Choppedtreelogs,Size=UDim2.new(0,5,0,20),Position=UDim2.new(0,0,0,35*inc),BorderSizePixel=0,ZIndex=3,BackgroundColor3=v["Logs"][1].Color})
- SellButton.MouseButton1Click:Connect(function()
- for x=1,100 do
- v["Logs"][1].CFrame = CFrame.new(Root.Position + Vector3.new(0, 20, 0))
- Dragging:FireServer(v["Logs"][1].Parent)
- end
- end)
- inc = inc + 1
- end
- inc = 0
- end
- service.Workspace.LogModels.ChildRemoved:Connect(function(thing)
- if thing.Owner.Value == Player then
- UpdateLogs()
- end
- end)
- UpdateTpLogs()
- --- Tp All Wood ---
- TpAllWood.MouseButton1Click:Connect(function()
- for _, Log in pairs(service.Workspace.LogModels:GetChildren()) do
- if Log.Name:sub(1, 6) == "Loose_" and Log:findFirstChild("Owner") then
- if Log.Owner.Value == Player then
- Log:MoveTo(Root.Position + Vector3.new(0, 20, 0))
- for i=1,100 do
- Dragging:FireServer(Log)
- end
- end
- end
- end
- end)
- --- Sell All Wood ---
- SellWood.MouseButton1Click:Connect(function()
- for _, Log in pairs(service.Workspace.LogModels:GetChildren()) do
- if Log.Name:sub(1, 6) == "Loose_" and Log:findFirstChild("Owner") then
- if Log.Owner.Value == Player then
- for i,v in pairs(Log: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(Log)
- end
- end)
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement