yeoyeoyeoyayaya

Untitled

Mar 12th, 2023
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.79 KB | None | 0 0
  1. -- cooper get trre
  2. local cooper = game.Players.LocalPlayer
  3. local treeregins = {}
  4. local replicatedfarts = game.ReplicatedStorage
  5. local axeclasses = replicatedfarts:WaitForChild("AxeClasses")
  6.  
  7. for _, cooper in next, workspace:GetChildren() do
  8. if cooper.Name == "TreeRegion" then
  9. table.insert(treeregins, cooper)
  10. end
  11. end
  12.  
  13. function getAxStats(axName, treClas)
  14. local coopermodule = axeclasses:FindFirstChild("AxeClass_"..axName)
  15. if not coopermodule then return end
  16. local axStats = require(coopermodule).new()
  17. if axStats.SpecialTrees and axStats.SpecialTrees[treClas] then
  18. for mini, cooper in next, axStats.SpecialTrees[treClas] do
  19. axStats[mini] = cooper
  20. end
  21. end
  22. return axStats
  23. end
  24.  
  25. function getModlMass(model)
  26. local total = 0
  27. local woodsextions = 0
  28. for _, v in next, model:GetDescendants() do
  29. if v:IsA("BasePart") and v.Name ~= "Leaves" then
  30. if v.Name == "WoodSection" then woodsextions = woodsextions + 1 end
  31. total = total + v.Mass
  32. end
  33. end
  34. return total, woodsextions
  35. end
  36.  
  37. function getTrreOfClas(clas)
  38. local posibilitys = {}
  39. for _, cooper1 in next, treeregins do
  40. for _, cooper2 in next, cooper1:GetChildren() do
  41. if cooper2:IsA("Model") and cooper2:FindFirstChild("CutEvent") then
  42. local trreclas = cooper2:FindFirstChild("TreeClass")
  43. local onwer = cooper2:FindFirstChild("Owner")
  44. if onwer and trreclas and onwer.Value == nil and trreclas.Value == clas then
  45. local mas, secs = getModlMass(cooper2)
  46. if secs > 1 then
  47. table.insert(posibilitys, {
  48. tre = cooper2,
  49. mass = mas
  50. })
  51. end
  52. end
  53. end
  54. end
  55. end
  56. table.sort(posibilitys, function(cooper1, cooper2)
  57. return cooper1.mass > cooper2.mass
  58. end)
  59. return posibilitys[1] and posibilitys[1].tre or false, "No tree found."
  60. end
  61.  
  62. function choppy(tre, ax)
  63. task.wait()
  64. cooper.Character.HumanoidRootPart.CFrame = CFrame.new(tre.WoodSection.Position + Vector3.new(5, 0, 0))
  65. task.wait(0.25)
  66. local axStats = getAxStats(ax.ToolName.Value, tre.TreeClass.Value)
  67. local propertys = {
  68. tool = ax,
  69. height = 0.3,
  70. faceVector = Vector3.new(1, 0, 0),
  71. sectionId = 1,
  72. hitPoints = axStats.Damage,
  73. cooldown = axStats.SwingCooldown,
  74. cuttingClass = "Axe"
  75. }
  76.  
  77. local newtre, trecon = nil, nil
  78. trecon = workspace.LogModels.ChildAdded:Connect(function(tre)
  79. task.wait()
  80. if tre.Owner.Value == cooper then
  81. newtre = tre
  82. trecon:Disconnect()
  83. trecon = nil
  84. end
  85. end)
  86. repeat
  87. replicatedfarts.Interaction.RemoteProxy:FireServer(tre.CutEvent, propertys)
  88. task.wait(axStats.SwingCooldown)
  89. until newtre ~= nil
  90. return newtre
  91. end
  92.  
  93. function hahafunnygod()
  94. local rootjoint = cooper.Character.HumanoidRootPart.RootJoint
  95. rootjoint:Clone().Parent = rootjoint.Parent
  96. rootjoint:Destroy()
  97. task.wait()
  98. end
  99.  
  100. function bringy(treclas)
  101. local curpos = cooper.Character.HumanoidRootPart.CFrame
  102. cooper.Character.Humanoid:UnequipTools()
  103. task.wait()
  104. local axs = {}
  105. for _, cooper in next, cooper.Backpack:GetChildren() do
  106. if cooper.Name ~= "BlueprintTool" and cooper:FindFirstChild("ToolName") then
  107. table.insert(axs, {
  108. ax = cooper,
  109. stats = getAxStats(cooper.ToolName.Value, treclass)
  110. })
  111. end
  112. end
  113. if #axs == 0 then return false, "Pleas pickup a ax." end
  114. table.sort(axs, function(cooper1, cooper2)
  115. return cooper1.stats.Damage > cooper2.stats.Damage
  116. end)
  117. local ax = axs[1].ax
  118. local tre, msg = getTrreOfClas(treclas)
  119. if not tre then
  120. return false, msg
  121. end
  122. if treclas == "LoneCave" then
  123. if ax.ToolName.Value ~= "EndTimesAxe" then
  124. return false, "2 get this tre u need end axe loser."
  125. end
  126. hahafunnygod()
  127. end
  128. local loptp = nil
  129. if treclas ~= "LoneCave" then
  130. loptp = game["Run Service"].Heartbeat:Connect(function()
  131. cooper.Character.HumanoidRootPart.CFrame = CFrame.new(tre.WoodSection.Position + Vector3.new(5, 3, 0))
  132. end)
  133. end
  134. tre = choppy(tre, ax)
  135. if treclas ~= "LoneCave" then
  136. loptp:Disconnect()
  137. loptp = nil
  138. end
  139. task.wait(0.15)
  140. task.spawn(function()
  141. for cooper=1, 60 do
  142. replicatedfarts.Interaction.ClientIsDragging:FireServer(tre)
  143. task.wait()
  144. end
  145. end)
  146. task.wait(0.1)
  147. tre.PrimaryPart = tre.WoodSection
  148. for i=1, 60 do
  149. tre.PrimaryPart.Velocity = Vector3.new(0, 0, 0)
  150. tre:PivotTo(curpos)
  151. task.wait()
  152. end
  153. if treclas == "LoneCave" then
  154. cooper.Character.Humanoid:UnequipTools()
  155. task.wait()
  156. cooper.Character.Head:Destroy()
  157. cooper.CharacterAdded:Wait()
  158. task.wait(1.5)
  159. end
  160. cooper.Character.HumanoidRootPart.CFrame = tre.WoodSection.CFrame
  161. return true, "Don get tre!"
  162. end
  163.  
  164. warn(bringy("LoneCave"))
Advertisement
Add Comment
Please, Sign In to add comment