artbarte

Lumber Tycoon 2 Only TP

Nov 3rd, 2017
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.44 KB | None | 0 0
  1. _G.TELEPORT = "Volcano"
  2. local Wood = {
  3. "Cherry",
  4. "Palm",
  5. "FirBranch",
  6. "CaveCrawler",
  7. "Generic",
  8. "Spooky",
  9. "Fir",
  10. "GreenSwampy",
  11. "Oak",
  12. "Birch",
  13. "Volcano",
  14. "LoneCave"
  15. }
  16.  
  17. --Name Changer For Seperating What Is What
  18.  
  19. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  20. if l.Name == "TreeRegion" then
  21. if l ~= nil then
  22. for i, b in pairs(l:GetChildren()) do
  23. if b:IsA("Model") then
  24. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[1] then
  25. l.Name = Wood[1]
  26. warn("TreeRegion #1 Has Been Changed To: "..Wood[1])
  27. table.insert(NewRegionNames, l.Name)
  28. end
  29. end
  30. end
  31. end
  32. end
  33. end
  34.  
  35. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  36. if l.Name == "TreeRegion" then
  37. if l ~= nil then
  38. for i, b in pairs(l:GetChildren()) do
  39. if b:IsA("Model") then
  40. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[2] then
  41. l.Name = Wood[2]
  42. warn("TreeRegion #2 Has Been Changed To: "..Wood[2])
  43. table.insert(NewRegionNames, l.Name)
  44. end
  45. end
  46. end
  47. end
  48. end
  49. end
  50.  
  51. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  52. if l.Name == "TreeRegion" then
  53. if l ~= nil then
  54. for i, b in pairs(l:GetChildren()) do
  55. if b:IsA("Model") then
  56. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[3] then
  57. l.Name = Wood[3]
  58. warn("TreeRegion #3 Has Been Changed To: "..Wood[3])
  59. table.insert(NewRegionNames, l.Name)
  60. end
  61. end
  62. end
  63. end
  64. end
  65. end
  66.  
  67. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  68. if l.Name == "TreeRegion" then
  69. if l ~= nil then
  70. for i, b in pairs(l:GetChildren()) do
  71. if b:IsA("Model") then
  72. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[4] then
  73. l.Name = Wood[4]
  74. warn("TreeRegion #4 Has Been Changed To: "..Wood[4])
  75. table.insert(NewRegionNames, l.Name)
  76. end
  77. end
  78. end
  79. end
  80. end
  81. end
  82.  
  83. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  84. if l.Name == "TreeRegion" then
  85. if l ~= nil then
  86. for i, b in pairs(l:GetChildren()) do
  87. if b:IsA("Model") then
  88. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[5] then
  89. l.Name = Wood[5]
  90. warn("TreeRegion #5 Has Been Changed To: "..Wood[5])
  91. table.insert(NewRegionNames, l.Name)
  92. end
  93. end
  94. end
  95. end
  96. end
  97. end
  98.  
  99. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  100. if l.Name == "TreeRegion" then
  101. if l ~= nil then
  102. for i, b in pairs(l:GetChildren()) do
  103. if b:IsA("Model") then
  104. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[6] then
  105. l.Name = Wood[6]
  106. warn("TreeRegion #6 Has Been Changed To: "..Wood[6])
  107. table.insert(NewRegionNames, l.Name)
  108. end
  109. end
  110. end
  111. end
  112. end
  113. end
  114.  
  115. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  116. if l.Name == "TreeRegion" then
  117. if l ~= nil then
  118. for i, b in pairs(l:GetChildren()) do
  119. if b:IsA("Model") then
  120. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[7] then
  121. l.Name = Wood[7]
  122. warn("TreeRegion #7 Has Been Changed To: "..Wood[7])
  123. table.insert(NewRegionNames, l.Name)
  124. end
  125. end
  126. end
  127. end
  128. end
  129. end
  130.  
  131. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  132. if l.Name == "TreeRegion" then
  133. if l ~= nil then
  134. for i, b in pairs(l:GetChildren()) do
  135. if b:IsA("Model") then
  136. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[8] then
  137. l.Name = Wood[8]
  138. warn("TreeRegion #8 Has Been Changed To: "..Wood[8])
  139. table.insert(NewRegionNames, l.Name)
  140. end
  141. end
  142. end
  143. end
  144. end
  145. end
  146.  
  147. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  148. if l.Name == "TreeRegion" then
  149. if l ~= nil then
  150. for i, b in pairs(l:GetChildren()) do
  151. if b:IsA("Model") then
  152. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[9] then
  153. l.Name = Wood[9]
  154. warn("TreeRegion #9 Has Been Changed To: "..Wood[9])
  155. table.insert(NewRegionNames, l.Name)
  156. end
  157. end
  158. end
  159. end
  160. end
  161. end
  162.  
  163. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  164. if l.Name == "TreeRegion" then
  165. if l ~= nil then
  166. for i, b in pairs(l:GetChildren()) do
  167. if b:IsA("Model") then
  168. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[10] then
  169. l.Name = Wood[10]
  170. warn("TreeRegion #10 Has Been Changed To: "..Wood[10])
  171. table.insert(NewRegionNames, l.Name)
  172. end
  173. end
  174. end
  175. end
  176. end
  177. end
  178.  
  179. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  180. if l.Name == "TreeRegion" then
  181. if l ~= nil then
  182. for i, b in pairs(l:GetChildren()) do
  183. if b:IsA("Model") then
  184. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[11] then
  185. l.Name = Wood[11]
  186. warn("TreeRegion #11 Has Been Changed To: "..Wood[11])
  187. table.insert(NewRegionNames, l.Name)
  188. end
  189. end
  190. end
  191. end
  192. end
  193. end
  194.  
  195. for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
  196. if l.Name == "TreeRegion" then
  197. if l ~= nil then
  198. for i, b in pairs(l:GetChildren()) do
  199. if b:IsA("Model") then
  200. if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == Wood[12] then
  201. l.Name = Wood[12]
  202. warn("TreeRegion #12 Has Been Changed To: "..Wood[12])
  203. table.insert(NewRegionNames, l.Name)
  204. end
  205. end
  206. end
  207. end
  208. end
  209. end
  210.  
  211. --Names Checker
  212.  
  213. for i, v in pairs(game:GetService("Workspace"):GetChildren()) do
  214. print(v.Name)
  215. end
  216.  
  217. --Teleporter
  218.  
  219. --CherryWood
  220.  
  221. for i, v in pairs(game:GetService("Workspace")[Wood[1]]:GetChildren()) do
  222. if _G.TELEPORT == Wood[1] then
  223. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[1] then
  224. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  225. end
  226. end
  227. end
  228.  
  229. --PalmWood
  230.  
  231. for i, v in pairs(game:GetService("Workspace")[Wood[2]]:GetChildren()) do
  232. if _G.TELEPORT == Wood[2] then
  233. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[2] then
  234. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  235. end
  236. end
  237. end
  238.  
  239. --FirBranchWood
  240.  
  241. if _G.TELEPORT == Wood[3] then
  242. for i, v in pairs(game:GetService("Workspace")[Wood[3]]:GetChildren()) do
  243. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[3] then
  244. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  245. end
  246. end
  247. end
  248.  
  249. --CaveCrawlerWood
  250.  
  251. if _G.TELEPORT == Wood[4] then
  252. for i, v in pairs(game:GetService("Workspace")[Wood[4]]:GetChildren()) do
  253. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[4] then
  254. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  255. end
  256. end
  257. end
  258.  
  259. --GenericWood
  260.  
  261. if _G.TELEPORT == Wood[5] then
  262. for i, v in pairs(game:GetService("Workspace")[Wood[5]]:GetChildren()) do
  263. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[5] then
  264. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  265. end
  266. end
  267. end
  268.  
  269. --SpookyWood
  270.  
  271. if _G.TELEPORT == Wood[6] then
  272. for i, v in pairs(game:GetService("Workspace")[Wood[6]]:GetChildren()) do
  273. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[6] then
  274. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  275. end
  276. end
  277. end
  278.  
  279. --FirWood
  280.  
  281. if _G.TELEPORT == Wood[7] then
  282. for i, v in pairs(game:GetService("Workspace")[Wood[7]]:GetChildren()) do
  283. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[7] then
  284. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  285. end
  286. end
  287. end
  288.  
  289. --GreenSwampyWood
  290.  
  291. if _G.TELEPORT == Wood[8] then
  292. for i, v in pairs(game:GetService("Workspace")[Wood[8]]:GetChildren()) do
  293. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[8] then
  294. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  295. end
  296. end
  297. end
  298.  
  299. --Oak
  300.  
  301. if _G.TELEPORT == Wood[9] then
  302. for i, v in pairs(game:GetService("Workspace")[Wood[9]]:GetChildren()) do
  303. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[9] then
  304. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  305. end
  306. end
  307. end
  308.  
  309. --Birch
  310.  
  311. if _G.TELEPORT == Wood[10] then
  312. for i, v in pairs(game:GetService("Workspace")[Wood[10]]:GetChildren()) do
  313. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[10] then
  314. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  315. end
  316. end
  317. end
  318.  
  319. --Volcano
  320.  
  321. if _G.TELEPORT == Wood[11] then
  322. for i, v in pairs(game:GetService("Workspace")[Wood[11]]:GetChildren()) do
  323. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[11] then
  324. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  325. end
  326. end
  327. end
  328.  
  329. --LoneCave
  330.  
  331. if _G.TELEPORT == Wood[12] then
  332. for i, v in pairs(game:GetService("Workspace")[Wood[12]]:GetChildren()) do
  333. if v:FindFirstChild("TreeClass") ~= nil and v.TreeClass.Value == Wood[12] then
  334. v:MoveTo(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(math.random(1,60), math.random(1,1), math.random(1,60)))
  335. end
  336. end
  337. end
Add Comment
Please, Sign In to add comment