Bugxie_

Untitled

Oct 23rd, 2022
903
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.10 KB | None | 0 0
  1. local ui = loadstring(game:HttpGet('https://raw.githubusercontent.com/bloodball/-back-ups-for-libs/main/Shaman.lua'))()
  2.  
  3.  
  4.  
  5. local window = ui:Window({
  6.  
  7. Text = "Idle Heroes Simulator"
  8.  
  9. })
  10.  
  11.  
  12.  
  13. local client = game.Players.LocalPlayer
  14.  
  15. local attackEvent = game:GetService("ReplicatedStorage").Packages["_Index"]["sleitnick_knit@1.4.7"].knit.Services.WeaponService.RE.Swing
  16.  
  17.  
  18.  
  19. local Settings = {
  20.  
  21. Autofarm = false,
  22.  
  23. Autolevel = false,
  24.  
  25. }
  26.  
  27.  
  28.  
  29. local Utils = {} do
  30.  
  31. function Utils.GetPlate()
  32.  
  33. for _, plate in next, workspace:WaitForChild("Plots"):GetChildren() do
  34.  
  35. if plate.Owner.Value == client then
  36.  
  37. return plate.Name
  38.  
  39. end
  40.  
  41. end
  42.  
  43. end
  44.  
  45.  
  46.  
  47. function Utils.EnemyName()
  48.  
  49. for _, enemy in next, workspace:WaitForChild("Plots")[Utils.GetPlate()].Enemy:GetChildren() do
  50.  
  51. if enemy and enemy:IsA("BasePart") then
  52.  
  53. return enemy.Name
  54.  
  55. end
  56.  
  57. end
  58.  
  59. end
  60.  
  61.  
  62.  
  63. function Utils.EnemyAttack()
  64.  
  65. local enemyPlot = Utils.GetPlate()
  66.  
  67. local enemyName = Utils.EnemyName()
  68.  
  69.  
  70.  
  71. if enemyPlot and enemyName then
  72.  
  73. attackEvent:FireServer(workspace.Plots[enemyPlot].Enemy[enemyName])
  74.  
  75. end
  76.  
  77. end
  78.  
  79.  
  80.  
  81. function Utils.IsPlayerAlive()
  82.  
  83. local humanoid = client.Character and client.Character.Humanoid
  84.  
  85. local root = client.Character and client.Character:WaitForChild("HumanoidRootPart", 5)
  86.  
  87.  
  88.  
  89. if root and (humanoid and humanoid.Health > 0) then
  90.  
  91. return true
  92.  
  93. end -- rblxscripts.net
  94.  
  95. end
  96.  
  97.  
  98.  
  99. function Utils.Teleport(part)
  100.  
  101. if part and Utils.IsPlayerAlive() then
  102.  
  103. client.Character.PrimaryPart:PivotTo(part)
  104.  
  105. end
  106.  
  107. end
  108.  
  109.  
  110.  
  111. function Utils.GetEnemyLocation()
  112.  
  113. for _, enemy in next, workspace:WaitForChild("Plots")[Utils.GetPlate()].Enemy:GetChildren() do
  114.  
  115. if enemy and enemy:IsA("BasePart") then
  116.  
  117. return enemy.CFrame * CFrame.new(0, 0, -5)
  118.  
  119. end
  120.  
  121. end
  122.  
  123. end
  124.  
  125.  
  126.  
  127. function Utils.Farm()
  128.  
  129. Utils.Teleport(Utils.GetEnemyLocation()) do
  130.  
  131. Utils.EnemyAttack()
  132.  
  133. end
  134.  
  135. end
  136.  
  137.  
  138.  
  139. function Utils.CanLevel()
  140.  
  141. for _, button in next, workspace:WaitForChild("Plots")[Utils.GetPlate()].Buttons:GetChildren() do
  142.  
  143. local levelButton = string.find(button.Name, "NextLevel")
  144.  
  145. if levelButton then
  146.  
  147. return true
  148.  
  149. end -- rblxscripts.net
  150.  
  151. end
  152.  
  153. end
  154.  
  155.  
  156.  
  157. function Utils.LevelPosition()
  158.  
  159. if Utils.IsPlayerAlive() and Utils.CanLevel() then
  160.  
  161. for _, level in next, workspace:WaitForChild("Plots")[Utils.GetPlate()].Buttons.NextLevel:GetChildren() do
  162.  
  163. if level:IsA("Part") and level.Name:find("Touch") then
  164.  
  165. return level.CFrame
  166.  
  167. end
  168.  
  169. end
  170.  
  171. end
  172.  
  173. end
  174.  
  175.  
  176.  
  177. function Utils.AutoLevel()
  178.  
  179. if Utils.IsPlayerAlive() and Utils.CanLevel() then
  180.  
  181. for _, level in next, workspace:WaitForChild("Plots")[Utils.GetPlate()].Buttons.NextLevel:GetChildren() do
  182.  
  183. local touch = string.find(level.Name, "Touch")
  184.  
  185. if touch then
  186.  
  187. Utils.Teleport(Utils.LevelPosition())
  188.  
  189. end
  190.  
  191. end
  192.  
  193. end
  194.  
  195. end
  196.  
  197. end
  198.  
  199.  
  200.  
  201. local Tabs = {}
  202.  
  203. Tabs.Autofarm = window:Tab({ Text = "Main" }) do
  204.  
  205. local Autofarm = Tabs.Autofarm:Section({ Text = "Autofarm" }) do
  206.  
  207. Autofarm:Toggle({ Text = "Auto kill", Callback = function(value)
  208.  
  209. Settings.Autofarm = value
  210.  
  211. end})
  212.  
  213.  
  214.  
  215. Autofarm:Toggle({ Text = "Auto level", Callback = function(value)
  216.  
  217. Settings.Autolevel = value
  218.  
  219. end})
  220.  
  221. end
  222.  
  223. end
  224.  
  225.  
  226.  
  227. task.spawn(function()
  228.  
  229. while task.wait() do
  230.  
  231. if Settings.Autofarm then
  232.  
  233. Utils.Farm()
  234.  
  235. end
  236.  
  237. if Settings.Autolevel then
  238.  
  239. Utils.AutoLevel()
  240.  
  241. end
  242.  
  243. end
  244.  
  245. end)
Add Comment
Please, Sign In to add comment