kaualima12

Auto sell woods or Tp woods for you lumber tycoon 2

Jul 13th, 2020
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.37 KB | None | 0 0
  1. --Unlumber Updated
  2. --Created By Unlisting
  3. --The New Remotes I Just Added Are From Drstattik's GUI. this is so it just makes it easier so thanks to him <3
  4. --The Remotes I Added from Drstattik are The Glitch Wood And Sell Wood cuz iternals Sales do basically the same thing as This.
  5.  
  6. --[[
  7. INFO:
  8. This Script Renames All TreeRegions To The Regions For Its Main Wood And Making It Easier For You To Teleport All The Wood To You Which Comes With It If You
  9. Enter The Wood's Name In The Global "TELEPORT" Variable Below.
  10.  
  11. Once You Cut The Wood Down Press The Key B Or Make It Automatically Bring It To You By Turning The _G.BRING To true.
  12.  
  13. You Can Also Press E To Cut the wood and just press R to teleport it to you or press "i" to sell it instantly
  14.  
  15. Have Fun Using This Script!
  16. --]]
  17.  
  18. --Settings
  19.  
  20. _G.TELEPORT = "Cherry" --The Name Of The Wood You Want. The List Of Wood Names Are Listed Below.
  21. _G.CREDITS = false --Print Credits
  22. _G.BRING = false --Automatically Teleport the wood you cut down
  23. _G.WOOD = "r" --Keybind for teleporting wood after cutting down
  24. _G.ITEM = "q" --Keybind for teleporting recent bought items
  25. _G.SIZE = 120 --Size Of Wood You Want For Glitching
  26.  
  27. --[[ Wood Names:
  28.  
  29. Copy And Paste These Names In The "_G.TELEPORT" String Above.
  30.  
  31. There May Be More Kinds Of Wood That I Haven't Put In Here But This Will Do For Now.
  32.  
  33. ------------------
  34. Cherry
  35. Palm
  36. FirBranch
  37. CaveCrawler
  38. Generic
  39. Spooky
  40. Fir
  41. GreenSwampy
  42. Oak
  43. Birch
  44. Volcano
  45. LoneCave
  46. --]]
  47.  
  48.  
  49.  
  50.  
  51.  
  52. --SCRIPTING
  53.  
  54. local Wood = {
  55. "Cherry",
  56. "Palm",
  57. "FirBranch",
  58. "CaveCrawler",
  59. "Generic",
  60. "Spooky",
  61. "Fir",
  62. "GreenSwampy",
  63. "Oak",
  64. "Birch",
  65. "Volcano",
  66. "LoneCave"
  67. }
  68.  
  69. local NewRegionNames = {}
  70.  
  71. --Name Changer For Seperating What Is What
  72.  
  73. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  74. if l.Name == "TreeRegion" then
  75. if l ~= nil then
  76. for i, b in pairs(l:GetChildren()) do
  77. if b:IsA("Model") then
  78. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[1] then
  79. l.Name = Wood[1]
  80. warn("TreeRegion #1 Has Been Changed To: "..Wood[1])
  81. table.insert(NewRegionNames, l.Name)
  82. end
  83. end
  84. end
  85. end
  86. end
  87. end
  88.  
  89. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  90. if l.Name == "TreeRegion" then
  91. if l ~= nil then
  92. for i, b in pairs(l:GetChildren()) do
  93. if b:IsA("Model") then
  94. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[2] then
  95. l.Name = Wood[2]
  96. warn("TreeRegion #2 Has Been Changed To: "..Wood[2])
  97. table.insert(NewRegionNames, l.Name)
  98. end
  99. end
  100. end
  101. end
  102. end
  103. end
  104.  
  105. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  106. if l.Name == "TreeRegion" then
  107. if l ~= nil then
  108. for i, b in pairs(l:GetChildren()) do
  109. if b:IsA("Model") then
  110. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[3] then
  111. l.Name = Wood[3]
  112. warn("TreeRegion #3 Has Been Changed To: "..Wood[3])
  113. table.insert(NewRegionNames, l.Name)
  114. end
  115. end
  116. end
  117. end
  118. end
  119. end
  120.  
  121. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  122. if l.Name == "TreeRegion" then
  123. if l ~= nil then
  124. for i, b in pairs(l:GetChildren()) do
  125. if b:IsA("Model") then
  126. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[4] then
  127. l.Name = Wood[4]
  128. warn("TreeRegion #4 Has Been Changed To: "..Wood[4])
  129. table.insert(NewRegionNames, l.Name)
  130. end
  131. end
  132. end
  133. end
  134. end
  135. end
  136.  
  137. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  138. if l.Name == "TreeRegion" then
  139. if l ~= nil then
  140. for i, b in pairs(l:GetChildren()) do
  141. if b:IsA("Model") then
  142. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[5] then
  143. l.Name = Wood[5]
  144. warn("TreeRegion #5 Has Been Changed To: "..Wood[5])
  145. table.insert(NewRegionNames, l.Name)
  146. end
  147. end
  148. end
  149. end
  150. end
  151. end
  152.  
  153. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  154. if l.Name == "TreeRegion" then
  155. if l ~= nil then
  156. for i, b in pairs(l:GetChildren()) do
  157. if b:IsA("Model") then
  158. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[6] then
  159. l.Name = Wood[6]
  160. warn("TreeRegion #6 Has Been Changed To: "..Wood[6])
  161. table.insert(NewRegionNames, l.Name)
  162. end
  163. end
  164. end
  165. end
  166. end
  167. end
  168.  
  169. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  170. if l.Name == "TreeRegion" then
  171. if l ~= nil then
  172. for i, b in pairs(l:GetChildren()) do
  173. if b:IsA("Model") then
  174. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[7] then
  175. l.Name = Wood[7]
  176. warn("TreeRegion #7 Has Been Changed To: "..Wood[7])
  177. table.insert(NewRegionNames, l.Name)
  178. end
  179. end
  180. end
  181. end
  182. end
  183. end
  184.  
  185. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  186. if l.Name == "TreeRegion" then
  187. if l ~= nil then
  188. for i, b in pairs(l:GetChildren()) do
  189. if b:IsA("Model") then
  190. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[8] then
  191. l.Name = Wood[8]
  192. warn("TreeRegion #8 Has Been Changed To: "..Wood[8])
  193. table.insert(NewRegionNames, l.Name)
  194. end
  195. end
  196. end
  197. end
  198. end
  199. end
  200.  
  201. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  202. if l.Name == "TreeRegion" then
  203. if l ~= nil then
  204. for i, b in pairs(l:GetChildren()) do
  205. if b:IsA("Model") then
  206. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[9] then
  207. l.Name = Wood[9]
  208. warn("TreeRegion #9 Has Been Changed To: "..Wood[9])
  209. table.insert(NewRegionNames, l.Name)
  210. end
  211. end
  212. end
  213. end
  214. end
  215. end
  216.  
  217. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  218. if l.Name == "TreeRegion" then
  219. if l ~= nil then
  220. for i, b in pairs(l:GetChildren()) do
  221. if b:IsA("Model") then
  222. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[10] then
  223. l.Name = Wood[10]
  224. warn("TreeRegion #10 Has Been Changed To: "..Wood[10])
  225. table.insert(NewRegionNames, l.Name)
  226. end
  227. end
  228. end
  229. end
  230. end
  231. end
  232.  
  233. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  234. if l.Name == "TreeRegion" then
  235. if l ~= nil then
  236. for i, b in pairs(l:GetChildren()) do
  237. if b:IsA("Model") then
  238. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[11] then
  239. l.Name = Wood[11]
  240. warn("TreeRegion #11 Has Been Changed To: "..Wood[11])
  241. table.insert(NewRegionNames, l.Name)
  242. end
  243. end
  244. end
  245. end
  246. end
  247. end
  248.  
  249. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  250. if l.Name == "TreeRegion" then
  251. if l ~= nil then
  252. for i, b in pairs(l:GetChildren()) do
  253. if b:IsA("Model") then
  254. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[12] then
  255. l.Name = Wood[12]
  256. warn("TreeRegion #12 Has Been Changed To: "..Wood[12])
  257. table.insert(NewRegionNames, l.Name)
  258. end
  259. end
  260. end
  261. end
  262. end
  263. end
  264.  
  265. --Names Checker
  266.  
  267. for i, v in pairs(game:GetService("Workspace"):GetChildren()) do
  268. print(v.Name)
  269. end
  270.  
  271. --Teleporter
  272.  
  273. --CherryWood
  274.  
  275. for i, v in pairs(game:GetService("Workspace")[Wood[1]]:GetChildren()) do
  276. if _G.TELEPORT == Wood[1] then
  277. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[1] then
  278. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  279. end
  280. end
  281. end
  282.  
  283. --PalmWood
  284.  
  285. for i, v in pairs(game:GetService("Workspace")[Wood[2]]:GetChildren()) do
  286. if _G.TELEPORT == Wood[2] then
  287. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[2] then
  288. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  289. end
  290. end
  291. end
  292.  
  293. --FirBranchWood
  294.  
  295. if _G.TELEPORT == Wood[3] then
  296. for i, v in pairs(game:GetService("Workspace")[Wood[3]]:GetChildren()) do
  297. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[3] then
  298. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  299. end
  300. end
  301. end
  302.  
  303. --CaveCrawlerWood
  304.  
  305. if _G.TELEPORT == Wood[4] then
  306. for i, v in pairs(game:GetService("Workspace")[Wood[4]]:GetChildren()) do
  307. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[4] then
  308. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  309. end
  310. end
  311. end
  312.  
  313. --GenericWood
  314.  
  315. if _G.TELEPORT == Wood[5] then
  316. for i, v in pairs(game:GetService("Workspace")[Wood[5]]:GetChildren()) do
  317. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[5] then
  318. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  319. end
  320. end
  321. end
  322.  
  323. --SpookyWood
  324.  
  325. if _G.TELEPORT == Wood[6] then
  326. for i, v in pairs(game:GetService("Workspace")[Wood[6]]:GetChildren()) do
  327. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[6] then
  328. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  329. end
  330. end
  331. end
  332.  
  333. --FirWood
  334.  
  335. if _G.TELEPORT == Wood[7] then
  336. for i, v in pairs(game:GetService("Workspace")[Wood[7]]:GetChildren()) do
  337. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[7] then
  338. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  339. end
  340. end
  341. end
  342.  
  343. --GreenSwampyWood
  344.  
  345. if _G.TELEPORT == Wood[8] then
  346. for i, v in pairs(game:GetService("Workspace")[Wood[8]]:GetChildren()) do
  347. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[8] then
  348. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  349. end
  350. end
  351. end
  352.  
  353. --Oak
  354.  
  355. if _G.TELEPORT == Wood[9] then
  356. for i, v in pairs(game:GetService("Workspace")[Wood[9]]:GetChildren()) do
  357. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[9] then
  358. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  359. end
  360. end
  361. end
  362.  
  363. --Birch
  364.  
  365. if _G.TELEPORT == Wood[10] then
  366. for i, v in pairs(game:GetService("Workspace")[Wood[10]]:GetChildren()) do
  367. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[10] then
  368. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  369. end
  370. end
  371. end
  372.  
  373. --Volcano
  374.  
  375. if _G.TELEPORT == Wood[11] then
  376. for i, v in pairs(game:GetService("Workspace")[Wood[11]]:GetChildren()) do
  377. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[11] then
  378. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  379. end
  380. end
  381. end
  382.  
  383. --LoneCave
  384.  
  385. if _G.TELEPORT == Wood[12] then
  386. for i, v in pairs(game:GetService("Workspace")[Wood[12]]:GetChildren()) do
  387. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[12] then
  388. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  389. end
  390. end
  391. end
  392.  
  393. --KeyBind
  394.  
  395. function GetAxe()
  396. if game.Players.LocalPlayer.Character:FindFirstChild("Tool") then
  397. return game.Players.LocalPlayer.Character:FindFirstChild("Tool")
  398. end
  399. end
  400.  
  401. local HitPoints={
  402. ['GoldAxe']= 50;
  403. ['BasicHatchet']= 0.2;
  404. ['Axe1']= 0.55;
  405. ['Axe2']= 0.93;
  406. ['AxeAlphaTesters']= 1.5;
  407. ['Rukiryaxe']= 1.68;
  408. ['Axe3']= 1.45;
  409. ['AxeBetaTesters']= 1.45;
  410. ['FireAxe']= 0.6;
  411. ['SilverAxe']= 1.6;
  412. ['EndTimesAxe']= 10000000;
  413. ['AxeChicken']= 0.1;
  414. ['CandyCaneAxe']= 0;
  415. }
  416.  
  417. local Pressing = false
  418.  
  419. local mouse1 = game:GetService("Players").LocalPlayer:GetMouse()
  420. mouse1.KeyDown:connect(function(key)
  421. if key == "e" then
  422. Pressing=true
  423. poop(GetAxe())
  424. end
  425. end)
  426.  
  427. local mouse1 = game:GetService("Players").LocalPlayer:GetMouse()
  428. mouse1.KeyUp:connect(function(key)
  429. if key == "e" then
  430. Pressing=false
  431. end
  432. end)
  433.  
  434. function cut(Height,Tool)
  435. local Tree=game.Players.LocalPlayer:GetMouse().Target
  436. game.ReplicatedStorage.Interaction.RemoteProxy:FireServer(Tree.Parent.CutEvent,{
  437. ["cuttingClass"] = "Axe",
  438. ["cooldown"] = 0,
  439. ["hitPoints"] = HitPoints[Tool.ToolName.Value],
  440. ["sectionId"] = 1,
  441. ["tool"] = Tool,
  442. ["faceVector"] = Vector3.new(-1,0,0),
  443. ["height"] = Height})
  444. end
  445.  
  446. function poop(Tool)
  447. while Pressing do
  448. for i=1,100 do
  449. wait()
  450. cut(_G.SIZE,Tool)
  451. cut(1,Tool)
  452. end
  453. end
  454. end
  455.  
  456. --SellWood
  457.  
  458. local mouse1 = game:GetService("Players").LocalPlayer:GetMouse()
  459. mouse1.KeyDown:connect(function(key)
  460. if key == "q" then
  461. for _, Log in pairs(game.Workspace.LogModels:GetChildren()) do
  462. if Log.Name:sub(1, 6) == "Loose_" and Log:findFirstChild("Owner") then
  463. if Log.Owner.Value == game.Players.LocalPlayer then
  464. for i,v in pairs(Log:GetChildren()) do
  465. if v.Name=="WoodSection" then
  466. spawn(function()
  467. for i=1,10 do
  468. wait()
  469. v.CFrame=CFrame.new(Vector3.new(315, -0.296, 85.791))*CFrame.Angles(math.rad(90),0,0)
  470. end
  471. end)
  472. end
  473. end
  474. spawn(function()
  475. for i=1,20 do
  476. wait()
  477. game.ReplicatedStorage.Interaction.ClientIsDragging:FireServer(Log)
  478. end
  479. end)
  480. end
  481. end
  482. end
  483. end
  484. end)
  485.  
  486. local mouse1 = game:GetService("Players").LocalPlayer:GetMouse()
  487. mouse1.KeyDown:connect(function(key)
  488. if key == _G.WOOD then
  489. for i, v in pairs(game.Workspace.LogModels:GetChildren()) do
  490. if v.Name:sub(1, 6) == "Loose_" and v:findFirstChild("Owner") and v.Owner.Value == game:GetService("Players").LocalPlayer then
  491. v:MoveTo(game:GetService("Players").LocalPlayer.Character.Torso.Position + Vector3.new(0, 5, 0))
  492. end
  493. end
  494. end
  495. end)
  496.  
  497. local mouse1 = game:GetService("Players").LocalPlayer:GetMouse()
  498. mouse1.KeyDown:connect(function(key)
  499. if key == _G.ITEM then
  500. for i, v in pairs(game:GetService("Workspace"):GetChildren()) do
  501. for i, c in pairs(v:GetChildren()) do
  502. if c:FindFirstChild("PurchasedBoxItemName") then
  503. if c.Owner.LastInteraction.Value > 0 then
  504. if c.Owner.Value == game:GetService("Players").LocalPlayer then
  505. c:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position)
  506. end
  507. end
  508. end
  509. end
  510. end
  511. end
  512. end)
  513.  
  514. --Auto
  515.  
  516. while true do
  517. wait(5)
  518. if _G.BRING == true then
  519. for i, v in pairs(game.Workspace.LogModels:GetChildren()) do
  520. if v.Name:sub(1, 6) == "Loose_" and v:findFirstChild("Owner") and v.Owner.Value == game:GetService("Players").LocalPlayer then
  521. v:MoveTo(game:GetService("Players").LocalPlayer.Character.Torso.Position + Vector3.new(0, 5, 0))
  522. end
  523. end
  524. end
  525. end
  526.  
  527. --Credits
  528.  
  529. if _G.CREDITS == true then
  530. warn("[Unlumber] Created By Unlisting")
  531. warn("Thanks To Drstattik for the glitch and tp scripts")
  532. end
  533.  
  534. --End Of Scripting
Add Comment
Please, Sign In to add comment