yeoyeoyeoyayaya

Untitled

Mar 9th, 2023
626
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.83 KB | None | 0 0
  1. YOU NEED AN AXE IN YOUR INVENTORY
  2.  
  3.  
  4. Script:
  5.  
  6. -- Gui to Lua
  7. -- Version: 1
  8.  
  9. -- Instances:
  10.  
  11. local ScreenGui = Instance.new("ScreenGui")
  12. local Frame = Instance.new("Frame")
  13. local TextLabel = Instance.new("TextLabel")
  14. local ScrollingFrame = Instance.new("ScrollingFrame")
  15. local UIListLayout = Instance.new("UIListLayout")
  16. local UIPadding = Instance.new("UIPadding")
  17.  
  18. --Properties:
  19.  
  20. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  21. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  22.  
  23. Frame.Parent = ScreenGui
  24. Frame.AnchorPoint = Vector2.new(0.5, 0.5)
  25. Frame.BackgroundColor3 = Color3.fromRGB(0, 0, 255)
  26. Frame.BorderColor3 = Color3.fromRGB(255, 0, 0)
  27. Frame.BorderSizePixel = 4
  28. Frame.Position = UDim2.new(0.5, 0, 0.5, 0)
  29. Frame.Size = UDim2.new(0, 186, 0, 250)
  30.  
  31. TextLabel.Parent = Frame
  32. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  33. TextLabel.BackgroundTransparency = 1.000
  34. TextLabel.BorderSizePixel = 0
  35. TextLabel.Size = UDim2.new(0, 186, 0, 50)
  36. TextLabel.Font = Enum.Font.Bangers
  37. TextLabel.Text = "COOPER TRE GETTR"
  38. TextLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
  39. TextLabel.TextSize = 28.000
  40.  
  41. ScrollingFrame.Parent = Frame
  42. ScrollingFrame.Active = true
  43. ScrollingFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  44. ScrollingFrame.BackgroundTransparency = 1.000
  45. ScrollingFrame.BorderSizePixel = 0
  46. ScrollingFrame.Position = UDim2.new(0, 0, 0.200000003, 0)
  47. ScrollingFrame.Size = UDim2.new(0, 186, 0, 200)
  48. ScrollingFrame.ScrollBarThickness = 2
  49. ScrollingFrame.AutomaticCanvasSize = Enum.AutomaticSize.Y
  50.  
  51. UIPadding.Parent = ScrollingFrame
  52. UIPadding.PaddingBottom = UDim.new(0, 8)
  53.  
  54. UIListLayout.Parent = ScrollingFrame
  55. UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  56. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  57. UIListLayout.Padding = UDim.new(0, 8)
  58.  
  59. -- cooper get trre
  60. local cooper = game.Players.LocalPlayer
  61. local treeregins = {}
  62. local treclases = {}
  63. local replicatedfarts = game.ReplicatedStorage
  64. local axeclasses = replicatedfarts:WaitForChild("AxeClasses")
  65.  
  66. for _, cooper in next, workspace:GetChildren() do
  67. if cooper.Name == "TreeRegion" then
  68. table.insert(treeregins, cooper)
  69. end
  70. end
  71.  
  72. for _, cooper in next, treeregins do
  73. for _, cooper in next, cooper:GetChildren() do
  74. if cooper:FindFirstChild("TreeClass") and not table.find(treclases, cooper.TreeClass.Value) then
  75. table.insert(treclases, cooper.TreeClass.Value)
  76. end
  77. end
  78. end
  79.  
  80. function getAxStats(axName, treClas)
  81. local coopermodule = axeclasses:FindFirstChild("AxeClass_"..axName)
  82. if not coopermodule then return end
  83. local axStats = require(coopermodule).new()
  84. if axStats.SpecialTrees and axStats.SpecialTrees[treClas] then
  85. for mini, cooper in next, axStats.SpecialTrees[treClas] do
  86. axStats[mini] = cooper
  87. end
  88. end
  89. return axStats
  90. end
  91.  
  92. function getModlMass(model)
  93. local total = 0
  94. local woodsextions = 0
  95. for _, v in next, model:GetDescendants() do
  96. if v:IsA("BasePart") and v.Name ~= "Leaves" then
  97. if v.Name == "WoodSection" then woodsextions = woodsextions + 1 end
  98. total = total + v.Mass
  99. end
  100. end
  101. return total, woodsextions
  102. end
  103.  
  104. function getTrreOfClas(clas)
  105. local posibilitys = {}
  106. for _, cooper1 in next, treeregins do
  107. for _, cooper2 in next, cooper1:GetChildren() do
  108. if cooper2:IsA("Model") and cooper2:FindFirstChild("CutEvent") then
  109. local trreclas = cooper2:FindFirstChild("TreeClass")
  110. local onwer = cooper2:FindFirstChild("Owner")
  111. if onwer and trreclas and onwer.Value == nil and trreclas.Value == clas then
  112. local mas, secs = getModlMass(cooper2)
  113. if secs > 1 then
  114. table.insert(posibilitys, {
  115. tre = cooper2,
  116. mass = mas
  117. })
  118. end
  119. end
  120. end
  121. end
  122. end
  123. table.sort(posibilitys, function(cooper1, cooper2)
  124. return cooper1.mass > cooper2.mass
  125. end)
  126. return posibilitys[1] and posibilitys[1].tre or false, "No tree found."
  127. end
  128.  
  129. function choppy(tre, ax)
  130. task.wait()
  131. cooper.Character.HumanoidRootPart.CFrame = CFrame.new(tre.WoodSection.Position + Vector3.new(5, 0, 0))
  132. task.wait(0.25)
  133. local axStats = getAxStats(ax.ToolName.Value, tre.TreeClass.Value)
  134. local propertys = {
  135. tool = ax,
  136. height = 0.3,
  137. faceVector = Vector3.new(1, 0, 0),
  138. sectionId = 1,
  139. hitPoints = axStats.Damage,
  140. cooldown = axStats.SwingCooldown,
  141. cuttingClass = "Axe"
  142. }
  143.  
  144. local newtre, trecon = nil, nil
  145. trecon = workspace.LogModels.ChildAdded:Connect(function(tre)
  146. task.wait()
  147. if tre.Owner.Value == cooper then
  148. newtre = tre
  149. trecon:Disconnect()
  150. trecon = nil
  151. end
  152. end)
  153. repeat
  154. replicatedfarts.Interaction.RemoteProxy:FireServer(tre.CutEvent, propertys)
  155. task.wait(axStats.SwingCooldown)
  156. until newtre ~= nil
  157. return newtre
  158. end
  159.  
  160. function hahafunnygod()
  161. local rootjoint = cooper.Character.HumanoidRootPart.RootJoint
  162. rootjoint:Clone().Parent = rootjoint.Parent
  163. rootjoint:Destroy()
  164. task.wait()
  165. end
  166.  
  167. function bringy(treclas)
  168. local curpos = cooper.Character.HumanoidRootPart.CFrame
  169. cooper.Character.Humanoid:UnequipTools()
  170. task.wait()
  171. local axs = {}
  172. for _, cooper in next, cooper.Backpack:GetChildren() do
  173. if cooper.Name ~= "BlueprintTool" and cooper:FindFirstChild("ToolName") then
  174. table.insert(axs, {
  175. ax = cooper,
  176. stats = getAxStats(cooper.ToolName.Value, treclass)
  177. })
  178. end
  179. end
  180. if #axs == 0 then return false, "Pleas pickup a ax." end
  181. table.sort(axs, function(cooper1, cooper2)
  182. return cooper1.stats.Damage > cooper2.stats.Damage
  183. end)
  184. local ax = axs[1].ax
  185. local tre, msg = getTrreOfClas(treclas)
  186. if not tre then
  187. return false, msg
  188. end
  189. if treclas == "LoneCave" then
  190. if ax.ToolName.Value ~= "EndTimesAxe" then
  191. return false, "2 get this tre u need end axe loser."
  192. end
  193. hahafunnygod()
  194. end
  195. local loptp = nil
  196. if treclas ~= "LoneCave" then
  197. loptp = game["Run Service"].Heartbeat:Connect(function()
  198. cooper.Character.HumanoidRootPart.CFrame = CFrame.new(tre.WoodSection.Position + Vector3.new(5, 3, 0))
  199. end)
  200. end
  201. tre = choppy(tre, ax)
  202. if treclas ~= "LoneCave" then
  203. loptp:Disconnect()
  204. loptp = nil
  205. end
  206. task.wait(0.15)
  207. task.spawn(function()
  208. for cooper=1, 60 do
  209. replicatedfarts.Interaction.ClientIsDragging:FireServer(tre)
  210. task.wait()
  211. end
  212. end)
  213. task.wait(0.1)
  214. tre.PrimaryPart = tre.WoodSection
  215. for i=1, 60 do
  216. tre.PrimaryPart.Velocity = Vector3.new(0, 0, 0)
  217. tre:PivotTo(curpos)
  218. task.wait()
  219. end
  220. if treclas == "LoneCave" then
  221. cooper.Character.Humanoid:UnequipTools()
  222. task.wait()
  223. cooper.Character.Head:Destroy()
  224. cooper.CharacterAdded:Wait()
  225. task.wait(1.5)
  226. end
  227. cooper.Character.HumanoidRootPart.CFrame = tre.WoodSection.CFrame
  228. return true, "Don get tre!"
  229. end
  230.  
  231. local notfy = function(titl, tex, durashin)
  232. game:GetService("StarterGui"):SetCore("SendNotification", {
  233. Title = titl,
  234. Text = tex,
  235. Duration = durashin,
  236. })
  237. end
  238.  
  239. local addtre = function(tre)
  240. local TreBButon = Instance.new("TextButton")
  241. TreBButon.Name = "TreBButon"
  242. TreBButon.Parent = ScrollingFrame
  243. TreBButon.BackgroundColor3 = Color3.fromRGB(255, 0, 4)
  244. TreBButon.Position = UDim2.new(0.0483870953, 0, 0, 0)
  245. TreBButon.Size = UDim2.new(0, 168, 0, 36)
  246. TreBButon.Font = Enum.Font.Bangers
  247. TreBButon.Text = tre
  248. TreBButon.TextColor3 = Color3.fromRGB(0, 0, 255)
  249. TreBButon.TextScaled = true
  250. TreBButon.TextSize = 28.000
  251. TreBButon.TextWrapped = true
  252. TreBButon.MouseButton1Click:Connect(function()
  253. local suces, mesg = bringy(tre)
  254. if suces == true then
  255. notfy("Suces!", mesg, 5)
  256. elseif not (suces == true) then
  257. notfy("Not suces!", mesg, 5)
  258. end
  259. end)
  260. end
  261.  
  262. for _, cooper in next, treclases do
  263. addtre(cooper)
  264. end
  265.  
  266. local UserInputService = game:GetService("UserInputService")
  267.  
  268. local gui = Frame
  269.  
  270. local dragging
  271. local dragInput
  272. local dragStart
  273. local startPos
  274.  
  275. local function update(input)
  276. local delta = input.Position - dragStart
  277. gui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  278. end
  279.  
  280. gui.InputBegan:Connect(function(input)
  281. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  282. dragging = true
  283. dragStart = input.Position
  284. startPos = gui.Position
  285.  
  286. input.Changed:Connect(function()
  287. if input.UserInputState == Enum.UserInputState.End then
  288. dragging = false
  289. end
  290. end)
  291. end
  292. end)
  293.  
  294. gui.InputChanged:Connect(function(input)
  295. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  296. dragInput = input
  297. end
  298. end)
  299.  
  300. UserInputService.InputChanged:Connect(function(input)
  301. if input == dragInput and dragging then
  302. update(input)
  303. end
  304. end)
Advertisement
Comments
Add Comment
Please, Sign In to add comment