Advertisement
Rohax

Anime World Autofarm by Rohax

Sep 16th, 2021
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.92 KB | None | 0 0
  1. local library = loadstring(game:HttpGet(('https://raw.githubusercontent.com/Maxgat5/UiLib/main/lua')))()
  2. local w = library:CreateWindow("Anime Worlds Simulator")
  3. local b = w:CreateFolder("AutoFarm")
  4. local e = w:CreateFolder("Mix")
  5. local u = w:CreateFolder("Credits")
  6. Base = ""
  7. for i,v in pairs(game:GetService("Workspace").Nests:GetChildren()) do
  8. if v.ClassName == "Folder" then
  9. if v.Base.Owner.Sign.Text == game.Players.LocalPlayer.Name.."'s Dojo" then
  10. Base = v.Name
  11. end
  12. end
  13. end
  14. SelectedFruit = "MeadowFruit"
  15. Fruits = {}
  16. for i,v in pairs(game:GetService("Workspace").FruitBushes:GetChildren()) do
  17. table.insert(Fruits,v.Name)
  18. end
  19. SelectedEnemy = "Hoshi"
  20. Emenies = {}
  21. for i,v in pairs(game:GetService("Workspace").Enemies:GetChildren()) do
  22. if v.HumanoidRootPart:FindFirstChildOfClass("BillboardGui") then
  23. if not table.find(Emenies,v.HumanoidRootPart:FindFirstChildOfClass("BillboardGui").Back["NPC_Name"].Text) then
  24. table.insert(Emenies,v.HumanoidRootPart:FindFirstChildOfClass("BillboardGui").Back["NPC_Name"].Text)
  25. end
  26. end
  27. end
  28.  
  29. b:Dropdown("Select Fruit",Fruits,true,function(a)
  30. SelectedFruit = a
  31. end)
  32.  
  33. b:Toggle("Farm Fruits",function(bool)
  34. shared.toggle = bool
  35. FarmFruits = bool
  36. end)
  37.  
  38. b:Dropdown("Select Emeny",Emenies,true,function(a)
  39. SelectedEnemy = a
  40. end)
  41.  
  42. b:Toggle("Kill Enemies",function(bool)
  43. shared.toggle = bool
  44. KillEnemyies = bool
  45. end)
  46.  
  47. b:Toggle("AutoPlaceOrbs",function(bool)
  48. shared.toggle = bool
  49. AutoPlaceOrbs = bool
  50. end)
  51.  
  52. b:Toggle("AutoHatchOrbs",function(bool)
  53. shared.toggle = bool
  54. AutoHatchOrbs = bool
  55. end)
  56.  
  57. b:Toggle("TpBaseWhenFull",function(bool)
  58. shared.toggle = bool
  59. TpBaseWhenFull = bool
  60. end)
  61.  
  62. b:Toggle("BoostAttackers",function(bool)
  63. shared.toggle = bool
  64. BoostAttackers = bool
  65. end)
  66.  
  67. e:Toggle("AntiAfk",function(bool)
  68. shared.toggle = bool
  69. AntiAfk = bool
  70. end)
  71.  
  72. e:Button("Tp Base",function()
  73. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game:GetService("Workspace").Nests[Base].Base.CFrame.Position + Vector3.new(0,6,0))
  74. end)
  75. --Credits
  76. u:Button(game:service("HttpService"):JSONDecode(game:HttpGet("https://raw.githubusercontent.com/Maxgat5/Decode/main/JSON")).username,function()
  77. setclipboard(game:service("HttpService"):JSONDecode(game:HttpGet("https://raw.githubusercontent.com/Maxgat5/Decode/main/JSON")).username)
  78. end)
  79.  
  80. u:Button("Discord Server",function()
  81. setclipboard(game:service("HttpService"):JSONDecode(game:HttpGet("https://raw.githubusercontent.com/Maxgat5/Decode/main/JSON")).discord)
  82. end)
  83.  
  84. game:GetService('RunService').Stepped:connect(function()
  85. spawn(function()
  86. if AntiAfk == true then
  87. local bb=game:service'VirtualUser'
  88. bb:CaptureController()
  89. bb:ClickButton2(Vector2.new())
  90. end
  91. end)
  92. end)
  93.  
  94. function ClosestPart()
  95. local dist = math.huge
  96. local target = nil
  97. for i,v in pairs(game:GetService("Workspace").FruitBushes[SelectedFruit]:GetChildren()) do
  98. if v:FindFirstChildOfClass("Model") then
  99. if game:GetService("Players").LocalPlayer.Character:FindFirstChild("Head") then
  100. local magnitude = (v.Position - game:GetService("Players").LocalPlayer.Character.Head.Position).magnitude
  101. if magnitude < dist then
  102. dist = magnitude
  103. target = v
  104. end
  105. end
  106. end
  107. end
  108. return target
  109. end
  110.  
  111. function ClosestPart1()
  112. local dist = math.huge
  113. local target = nil
  114. for i,v in pairs(game:GetService("Workspace").Enemies:GetChildren()) do
  115. if v:FindFirstChild("HumanoidRootPart") then
  116. if v.HumanoidRootPart:FindFirstChildOfClass("BillboardGui") then
  117. if v.HumanoidRootPart:FindFirstChildOfClass("BillboardGui").Back["NPC_Name"].Text == SelectedEnemy then
  118. if game:GetService("Players").LocalPlayer.Character:FindFirstChild("Head") then
  119. local magnitude = (v.HumanoidRootPart.Position - game:GetService("Players").LocalPlayer.Character.Head.Position).magnitude
  120. if magnitude < dist then
  121. dist = magnitude
  122. target = v.HumanoidRootPart
  123. end
  124. end
  125. end
  126. end
  127. end
  128. end
  129. return target
  130. end
  131.  
  132. spawn(function()
  133. while wait() do
  134. if FarmFruits == true then
  135. pcall(function()
  136. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(ClosestPart().CFrame.Position + Vector3.new(0,0,0))
  137. game:GetService("ReplicatedStorage").Remotes.Events.PerformAttack:FireServer("Melee","Punch")
  138. end)
  139. end
  140. if KillEnemyies == true then
  141. pcall(function()
  142. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(ClosestPart1().CFrame.Position + Vector3.new(0,0,0))
  143. game:GetService("ReplicatedStorage").Remotes.Events.PerformAttack:FireServer("Melee","Punch")
  144. end)
  145. end
  146. if TpBaseWhenFull == true then
  147. if game:GetService("Players").LocalPlayer.PlayerGui.Confirmation.Enabled == true then
  148. for i,v in pairs(game:GetService("Players").LocalPlayer.PlayerGui.Confirmation.Holder:GetChildren()) do
  149. if v.ClassName == "Frame" then
  150. if v.Label.Text == "Your backpack is full. Do you want to teleport back to your dojo?" then
  151. pcall(function()
  152. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game:GetService("Workspace").Nests[Base].Base.CFrame.Position + Vector3.new(0,6,0))
  153. wait(5)
  154. firesignal(v.No.Activated)
  155. end)
  156. end
  157. end
  158. end
  159. end
  160. end
  161. end
  162. end)
  163.  
  164. spawn(function()
  165. while wait() do
  166. if AutoPlaceOrbs == true then
  167. for i,v in pairs(game:GetService("ReplicatedStorage").Assets.Orbs:GetChildren()) do
  168. for i,v1 in pairs(game:GetService("Workspace").Nests[Base].Podiums:GetChildren()) do
  169. if not v1:FindFirstChild("OrbModel") then
  170. for i,v2 in pairs(game:GetService("Players").LocalPlayer.PlayerGui.Orbs.Holder.Back.Front.Orbs:GetChildren()) do
  171. if v2.ClassName == "Frame" then
  172. if v2.Visible == true then
  173. game:GetService("ReplicatedStorage").Remotes.Events.PlaceOrb:FireServer(tonumber(v1.Name),tostring(v.Name))
  174. end
  175. end
  176. end
  177. end
  178. end
  179. end
  180. end
  181. end
  182. end)
  183.  
  184. spawn(function()
  185. while wait() do
  186. if AutoHatchOrbs == true then
  187. for i,v in pairs(game:GetService("Workspace").Nests[Base].Podiums:GetChildren()) do
  188. if v:FindFirstChild("Pedestal") then
  189. if v.Pedestal["Meshes/podium_Cube"].HatchOrb.BarHolder.Hatch.Visible == true then
  190. game:GetService("ReplicatedStorage").Remotes.Events.HatchOrb:FireServer(tostring(i))
  191. end
  192. end
  193. end
  194. end
  195. end
  196. end)
  197.  
  198. spawn(function()
  199. while wait() do
  200. if BoostAttackers == true then
  201. for i,v in pairs(game:GetService("Players").LocalPlayer.PlayerGui.HUD.Bottom.Attacks:GetChildren()) do
  202. if v.ClassName == 'Frame' then
  203. if v.Visible == true then
  204. firesignal(v.Button.Activated)
  205. end
  206. end
  207. end
  208. end
  209. end
  210. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement