PpRoStOo

Critical Legends gui

Jan 15th, 2022 (edited)
3,807
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.20 KB | None | 0 0
  1. -- LOAD GUI & LIBRARY (Wally Lib) --
  2. local library = loadstring(game:HttpGet("https://pastebin.com/raw/CkyR8ePz", true))()
  3.  
  4. -- GUI Window
  5. local farm = library:CreateWindow('Critical Legends')
  6. farm:Section('Created by HamstaGang')
  7.  
  8. -- Player Locals
  9. local Plr = game:GetService("Players").LocalPlayer
  10. local Curr_Weapon = nil;
  11.  
  12. -- Zones Array
  13. local Zones_Arr = {};
  14. local Selected_Zone = "Primis Field 1"
  15.  
  16. function Setup_Zones()
  17. -- Zones
  18. local Zones = game:GetService("Workspace").Enemies
  19.  
  20. -- Add all zones to array
  21. for i, Zone in pairs(Zones:GetChildren()) do
  22. table.insert(Zones_Arr, Zone.Name);
  23. end
  24. end
  25.  
  26. -- God Mode
  27. local gOdMoDe
  28. gOdMoDe = hookmetamethod(game, "__namecall", function(self, ...)
  29. local method = getnamecallmethod()
  30. local args = {...}
  31.  
  32. if not checkcaller() and self.Name == "Damage" and args[3] ~= nil and method == "FireServer" then
  33. return;
  34. end
  35.  
  36. return gOdMoDe(self, ...)
  37. end)
  38.  
  39. -- // Add GUI buttons/toggles/dropdowns \\
  40.  
  41. -- Capture and setup Zones dropdown
  42. Setup_Zones();
  43. local FarmZones = farm:Dropdown('Farm Zones', {flag = "FarmZones"; list = Zones_Arr;}, function(v)
  44. Selected_Zone = v;
  45. end)
  46.  
  47. -- Toggle Auto Farm
  48. local AutoFarm = farm:Toggle('Auto Farm', {flag = "AutoFarm"})
  49.  
  50. -- Auto Farm
  51. spawn(function()
  52. while wait() do
  53. if farm.flags.AutoFarm then
  54. print("-- Farming --")
  55. if Selected_Zone ~= "" then
  56. print("-- Farming: ".. Selected_Zone .." --")
  57. local xZone = game:GetService("Workspace").Enemies[Selected_Zone];
  58.  
  59. for x, Enemy in pairs(xZone:GetChildren()) do
  60. if Enemy.Name ~= "Tier" and farm.flags.AutoFarm then
  61. -- Teleport to Enemy (Game has section loading so we need to teleport first)
  62. Plr.Character.HumanoidRootPart.CFrame = Enemy.EnemyLocation.CFrame;
  63. wait(0.2)
  64.  
  65. local Curr_Enemy = Enemy:FindFirstChild(tostring(Enemy.Model.Value), true)
  66.  
  67. if Curr_Enemy then
  68. print("-- Farming: Fighting ".. tostring(Enemy.Model.Value) .." --")
  69.  
  70. -- Start Combat
  71. Enemy.CombatTrigger:FireServer("Solo")
  72. wait(0.3)
  73.  
  74. -- Auto Attack
  75. repeat
  76. local Curr_Enemy = Enemy:FindFirstChild(tostring(Enemy.Model.Value), true)
  77. game:GetService("ReplicatedStorage").Remotes.Damage:FireServer(Curr_Enemy, Curr_Weapon)
  78. wait(0.5);
  79. until Curr_Enemy == nil
  80. end
  81. end
  82. end
  83. end
  84. end
  85. end
  86. end)
  87.  
  88. farm:Section('Chests')
  89.  
  90. local chest = farm:Button('Grab Chests', function()
  91. local chests = game.Workspace.Chests:GetChildren()
  92. for i,v in pairs(chests) do
  93. if not v:FindFirstChild("Open") then
  94. plr.Character.HumanoidRootPart.CFrame = v.Giver.CFrame
  95. end
  96. wait(0.5)
  97. end
  98. end)
  99.  
  100.  
  101. farm:Section('Stat Leveling')
  102.  
  103. -- Plr Stats
  104. local Stats_Folder = Plr.PlayerData.Stats
  105.  
  106. -- Curr Stat
  107. local Stat = "Damage";
  108.  
  109. -- Stat List
  110. local StatList = farm:Dropdown('Stat', {flag = "PlrStats"; list = {"Damage"; "Shield"; "Health"; "Mana"; "Magic";};}, function(v)
  111. Stat = v;
  112. end)
  113.  
  114. local AutoStat = farm:Toggle('Auto Level Stat', {flag = "AutoStat"})
  115.  
  116. -- Auto Stat Level Function
  117. spawn(function()
  118. while wait(1) do
  119. if farm.flags.AutoStat then
  120. game:GetService("ReplicatedStorage").Remotes.StatsChange:FireServer(Stat)
  121. end
  122. end
  123. end)
  124.  
  125.  
  126. -- Auto update current weapon. Combatfolder spawns upon battle.
  127. game.Workspace.ChildAdded:Connect(function(child)
  128. if child.ClassName == "Folder" and child.Name == "CombatFolder" then
  129. for x,v in pairs(child:GetChildren()) do
  130. if v.ClassName == "Folder" then
  131. v.ChildAdded:Connect(function(weapon)
  132. Curr_Weapon = weapon;
  133. end)
  134. end
  135. end
  136. end;
  137. end);
Add Comment
Please, Sign In to add comment