Advertisement
TheJagExploits

Untitled

Apr 10th, 2020
5
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.72 KB | None | 0 0
  1. --No Fog
  2.  
  3. NoFog.MouseButton1Down:connect(function()
  4. --Fog.BackgroundColor3 = Color3.new(0, 0, 0)
  5. NoFog.TextColor3 = Color3.new(1, 1, 1)
  6. game.Lighting.Changed:connect(function()
  7. game.Lighting.TimeOfDay = "12:00:00"
  8. game.Lighting.FogEnd = 9999
  9. game.Lighting.Brightness = 2
  10. end)
  11. end)
  12.  
  13. --Golden Axe
  14.  
  15. spawn(function()
  16. GAxe = false
  17. function GetAxe() --Gets your current axe thats equiped when called
  18. if game.Players.LocalPlayer.Character:FindFirstChild("Tool") then
  19. return game.Players.LocalPlayer.Character.Tool --returns the axe when found
  20. else
  21. return false --returns false when not equiped
  22. end
  23. end
  24.  
  25. function GetDamage(Axe, TreeClass)-- Gets the right Damage of the axe and returns it if called to prevent killing yourself like gold axe
  26. if Axe.ToolTip == "Basic Hatchet" then return 0.2
  27. elseif Axe.ToolTip == "Plain Axe" then return 0.55
  28. elseif Axe.ToolTip == "Steel Axe" then return 0.93
  29. elseif Axe.ToolTip == "Hardened Axe" then return 1.45
  30. elseif Axe.ToolTip == "Silver Axe" then return 1.6
  31. elseif Axe.ToolTip == "Rukiryaxe" then return 1.68
  32. elseif Axe.ToolTip == "Beta Axe of Bosses" then return 1.45
  33. elseif Axe.ToolTip == "Alpha Axe of Testing" then return 1.5
  34. elseif Axe.ToolTip == "Fire Axe" then
  35. if TreeClass ~= "Volcano" then return 0.6 else return 6.35 end
  36. elseif Axe.ToolTip == "End Times Axe" then
  37. if TreeClass ~= "LoneCave" then return 1.58 else return 10000000 end
  38. elseif Axe.ToolTip == "Candy Cane Axe" then return 0
  39. elseif Axe.ToolTip == "Johiro" then return 1.8
  40. elseif Axe.ToolTip == "Beesaxe" then return 1.4
  41. elseif Axe.ToolTip == "CHICKEN AXE" then return 0.9
  42. elseif Axe.ToolTip == "Amber Axe" then return 3.39
  43. elseif Axe.ToolTip == "The Many Axe" then return 10.2
  44. elseif Axe.ToolTip == "Gingerbread Axe" then
  45. if TreeClass == "Walnut" then return 8.5
  46. elseif TreeClass == "Koa" then return 11 else return 1.2 end
  47. elseif Axe.ToolTip == "Bird Axe" then
  48. if TreeClass == "Volcano" then return 2.5 elseif TreeClass == "CaveCrawler" then return 3.9 else return 1.65 end
  49. end
  50. end
  51.  
  52.  
  53. function GCut(TreePart) --Cuts the tree when called with the tree you want to cut
  54. if GetAxe() ~= false then --checks if you have a axe equiped
  55. Damage = GetDamage(GetAxe(), TreePart.Parent.TreeClass.Value) --gets the Damage
  56. Height = TreePart.CFrame:pointToObjectSpace(mouse.Hit.p).Y + TreePart.Size.Y/2 --Gets the Height
  57. local CutArguments = {
  58. sectionId = TreePart.ID.Value,
  59. faceVector = Vector3.new(0,0,-1),
  60. height = Height,
  61. hitPoints = Damage,
  62. cooldown = 0,
  63. cuttingClass = "Axe",
  64. tool = GetAxe()
  65. }
  66. for i=1, 50 do
  67. game.ReplicatedStorage.Interaction.RemoteProxy:FireServer(TreePart.Parent.CutEvent, CutArguments)
  68. end
  69. end
  70. end
  71.  
  72. function CutTree(Tree) --Cuts the tree when called with the tree you want to cut
  73. if GetAxe() ~= false then --checks if you have a axe equiped
  74. Damage = GetDamage(GetAxe(), Tree.TreeClass.Value) --gets the Damage
  75. local CutArguments = {
  76. sectionId = 1,
  77. faceVector = Vector3.new(0,0,-1),
  78. height = 0.5,
  79. hitPoints = Damage,
  80. cooldown = 0,
  81. cuttingClass = "Axe",
  82. tool = GetAxe()
  83. }
  84. for i=1, 50 do
  85. game.ReplicatedStorage.Interaction.RemoteProxy:FireServer(Tree.CutEvent, CutArguments)
  86. end
  87. end
  88. end
  89.  
  90. TreeList = {} --Creates a table of the trees
  91. for a,b in pairs(workspace:GetChildren()) do
  92. if b.name == "TreeRegion" then
  93. b.ChildAdded:Connect(function(NewTree)--Creates functions that Adds new trees to the list
  94. table.insert(TreeList, NewTree)
  95. end)
  96. for c,d in pairs(b:GetChildren()) do-- Adds the trees when first time starting the script
  97. if d.Name == "Model" then
  98. table.insert(TreeList, d)
  99. end
  100. end
  101. end
  102. end
  103.  
  104. spawn(function() --used spawn so it wont interrupt any of the other things
  105. CutEnabled = false
  106. while wait(.5) do --Main loop to do the stuff
  107. if CutEnabled == true then
  108. if GetAxe() ~= false then --Checks if you have a axe equiped
  109. for a,b in pairs(TreeList) do
  110. if not b:FindFirstChild("RootCut") and b:FindFirstChild("CutEvent") then --Checks if the tree is already cut
  111. distance = (game.Players.LocalPlayer.Character.Head.Position - b.WoodSection.Position).magnitude --gets the distance between player and tree
  112. if distance < 225 then --if distance lower than 225 then it will cut the tree
  113. CutTree(b) --Calls the function with the tree to cut
  114. end
  115. else
  116. table.remove(TreeList, a)--if tree already cut then it gets removed from the list
  117. end
  118. end
  119. end
  120. end
  121. end
  122. end)
  123.  
  124. mouse = game.Players.LocalPlayer:GetMouse() --Gets the Mouse
  125. mouse.Button1Down:connect(function()
  126. if GAxe == true and GetAxe() ~= false then
  127. Target = mouse.Target
  128. GCut(Target)
  129. end
  130. end)
  131. --Credits to Johiro, if you decide to skid atleast give credits
  132. end)
  133. GoldenAxe.MouseButton1Down:connect(function()
  134.  
  135. if GAxe == true then
  136. GAxe = false
  137. GoldenAxe.TextColor3 = Color3.fromRGB(255, 255, 255)
  138. elseif GAxe == false then
  139. GAxe = true
  140. GoldenAxe.TextColor3 = Color3.fromRGB(85, 255, 127)
  141. --Credits to Johiro
  142. end
  143. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement