Advertisement
Sakkzz

Logs

Nov 11th, 2019
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.58 KB | None | 0 0
  1. local service = setmetatable({}, {__index = function(t, k) return game:GetService(k) end })
  2.  
  3. local LogScreen = Instance.new("ScreenGui")
  4. local LogFrame = Instance.new("Frame")
  5. local Choppedtreelogs = Instance.new("ScrollingFrame")
  6. local TpAllWood = Instance.new("TextButton")
  7. local SellWood = Instance.new("TextButton")
  8.  
  9. --Properties:
  10.  
  11. LogScreen.Name = "LogScreen"
  12. LogScreen.Parent = game.CoreGui.LT2.MainFrame.ButtonFrame.TpLogs
  13.  
  14. LogFrame.Name = "LogFrame"
  15. LogFrame.Parent = LogScreen
  16. LogFrame.BackgroundColor3 = Color3.new(0.145098, 0.145098, 0.14902)
  17. LogFrame.BorderColor3 = Color3.new(0, 0, 0)
  18. LogFrame.BorderSizePixel = 2
  19. LogFrame.Position = UDim2.new(0, -98, 0, -285)
  20. LogFrame.Size = UDim2.new(0, 363, 0, 280)
  21.  
  22. Choppedtreelogs.Name = "Choppedtreelogs"
  23. Choppedtreelogs.Parent = LogFrame
  24. Choppedtreelogs.BackgroundColor3 = Color3.new(0.145098, 0.145098, 0.14902)
  25. Choppedtreelogs.BorderColor3 = Color3.new(0, 0, 0)
  26. Choppedtreelogs.BorderSizePixel = 2
  27. Choppedtreelogs.Size = UDim2.new(0, 363, 0, 210)
  28.  
  29. TpAllWood.Name = "TpAllWood"
  30. TpAllWood.Parent = LogFrame
  31. TpAllWood.BackgroundColor3 = Color3.new(0.054902, 0.054902, 0.0588235)
  32. TpAllWood.BorderColor3 = Color3.new(0, 0, 0)
  33. TpAllWood.BorderSizePixel = 2
  34. TpAllWood.Position = UDim2.new(0, 55, 0, 220)
  35. TpAllWood.Size = UDim2.new(0, 250, 0, 20)
  36. TpAllWood.Font = Enum.Font.Gotham
  37. TpAllWood.Text = "TP ALL WOOD"
  38. TpAllWood.TextColor3 = Color3.new(1, 1, 1)
  39. TpAllWood.TextSize = 14
  40.  
  41. SellWood.Name = "SellWood"
  42. SellWood.Parent = LogFrame
  43. SellWood.BackgroundColor3 = Color3.new(0.054902, 0.054902, 0.0588235)
  44. SellWood.BorderColor3 = Color3.new(0, 0, 0)
  45. SellWood.BorderSizePixel = 2
  46. SellWood.Position = UDim2.new(0, 55, 0, 250)
  47. SellWood.Size = UDim2.new(0, 250, 0, 20)
  48. SellWood.Font = Enum.Font.Gotham
  49. SellWood.Text = "SELL ALL WOOD"
  50. SellWood.TextColor3 = Color3.new(1, 1, 1)
  51. SellWood.TextSize = 14
  52.  
  53. function Create(cls,props)
  54. local inst = Instance.new(cls)
  55. for i,v in pairs(props) do
  56. inst[i] = v
  57. end
  58. return inst
  59. end
  60. local MoneyCooldown = false
  61. local CurrentSlot = game.Players.LocalPlayer:WaitForChild("CurrentSaveSlot").Value
  62. local ScriptLoadOrSave = false
  63. local CurrentlySavingOrLoading = game.Players.LocalPlayer:WaitForChild("CurrentlySavingOrLoading")
  64. local TreeLogs={}
  65. local WoodPlanks={}
  66. local Render = service.RunService.RenderStepped
  67. local UserInputService = game:GetService("UserInputService")
  68. local shiftKeyL = Enum.KeyCode.LeftShift
  69. local Replicated = service.ReplicatedStorage
  70. local Client = Replicated.Interaction.ClientSetListPlayer
  71. local Dragging = Replicated.Interaction.ClientIsDragging
  72. local Properties = service.Workspace.Properties
  73. local Players = service.Players
  74. local PlayerModels = service.Workspace.PlayerModels
  75. local Player = Players.LocalPlayer
  76. local Char = Player.Character
  77. local Hum = Char.Humanoid
  78. local Root = Char.HumanoidRootPart
  79. local Mouse = Player:GetMouse()
  80. local Noclipper = false
  81. local Open = true
  82. local throwAxe = false
  83. local misc = false
  84. local player = false
  85. local slot = false
  86. local box = false
  87. local log = false
  88. local plank = false
  89. local players = false
  90. local wp = false
  91. local other = false
  92.  
  93. function UpdateLogs()
  94. local inc = 0
  95. TreeLogs = {}
  96. for _, Log in pairs(service.Workspace.LogModels:GetChildren()) do
  97.  
  98. if Log.Name:sub(1, 6) == "Loose_" and Log.Owner.Value == Player then
  99.  
  100. if Log:FindFirstChild("TreeClass") and TreeLogs[Log.TreeClass.Value] then
  101. TreeLogs[Log.TreeClass.Value] = TreeLogs[Log.TreeClass.Value]
  102. TreeLogs[Log.TreeClass.Value]["Logs"][Log] = Log
  103. elseif Log:FindFirstChild("TreeClass") then
  104. TreeLogs[Log.TreeClass.Value] = {Logs={Log.WoodSection}}
  105. end
  106. end
  107. end
  108. end
  109.  
  110. function UpdateTpLogs()
  111. local inc=0
  112. UpdateLogs()
  113. Choppedtreelogs:ClearAllChildren()
  114. for i,v in pairs(TreeLogs) do
  115. Choppedtreelogs.CanvasSize=UDim2.new(0,0,0,25*inc)
  116. 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})
  117. 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})
  118. SellButton.MouseButton1Click:Connect(function()
  119. for x=1,100 do
  120. v["Logs"][1].CFrame = CFrame.new(Root.Position + Vector3.new(0, 20, 0))
  121. Dragging:FireServer(v["Logs"][1].Parent)
  122. end
  123. end)
  124. inc = inc + 1
  125. end
  126. inc = 0
  127. end
  128.  
  129. service.Workspace.LogModels.ChildRemoved:Connect(function(thing)
  130. if thing.Owner.Value == Player then
  131. UpdateLogs()
  132. end
  133. end)
  134.  
  135. UpdateTpLogs()
  136.  
  137. --- Tp All Wood ---
  138.  
  139. TpAllWood.MouseButton1Click:Connect(function()
  140. for _, Log in pairs(service.Workspace.LogModels:GetChildren()) do
  141. if Log.Name:sub(1, 6) == "Loose_" and Log:findFirstChild("Owner") then
  142. if Log.Owner.Value == Player then
  143. Log:MoveTo(Root.Position + Vector3.new(0, 20, 0))
  144. for i=1,100 do
  145. Dragging:FireServer(Log)
  146. end
  147. end
  148. end
  149. end
  150. end)
  151.  
  152. --- Sell All Wood ---
  153.  
  154. SellWood.MouseButton1Click:Connect(function()
  155. for _, Log in pairs(service.Workspace.LogModels:GetChildren()) do
  156. if Log.Name:sub(1, 6) == "Loose_" and Log:findFirstChild("Owner") then
  157. if Log.Owner.Value == Player then
  158. for i,v in pairs(Log:GetChildren()) do
  159. if v.Name == "WoodSection" then
  160. spawn(function()
  161. for i=1,10 do
  162. wait()
  163. v.CFrame=CFrame.new(Vector3.new(315, -0.296, 85.791)) * CFrame.Angles(math.rad(90),0,0)
  164. end
  165. end)
  166. end
  167. end
  168. spawn(function()
  169. for i=1,20 do
  170. wait()
  171. Dragging:FireServer(Log)
  172. end
  173. end)
  174. end
  175. end
  176. end
  177. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement