Advertisement
xpa1nx0

blade slayer cc

Oct 5th, 2024 (edited)
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.27 KB | None | 0 0
  1. local version = "v0.1"
  2.  
  3. function MainScript()
  4. local Fluent = loadstring(game:HttpGet("https://raw.githubusercontent.com/xpa1n/library/main/FluentLibrary.lua"))()
  5.  
  6. local Window = Fluent:CreateWindow({
  7. Title = "Blade Slayer 剧本",
  8. SubTitle = version,
  9. TabWidth = 160,
  10. Size = UDim2.fromOffset(580, 460),
  11. Acrylic = true, -- The blur may be detectable, setting this to false disables blur entirely
  12. Theme = "Dark",
  13. MinimizeKey = Enum.KeyCode.LeftControl -- Used when theres no MinimizeKeybind
  14. })
  15.  
  16. local Tabs = {
  17. main = Window:AddTab({ Title = "主要", Icon = "swords" }),
  18. }
  19.  
  20. do
  21.  
  22. local mainmain = Tabs.main:AddSection("自動農作")
  23.  
  24. local mobNames = {}
  25. local SelectMobsDropdown
  26.  
  27. local function RefreshMobDropdown()
  28. local uniqueMobs = {}
  29. for _, enemy in pairs(game.Workspace.Enemys:GetChildren()) do
  30. uniqueMobs[enemy.Name] = true
  31. end
  32.  
  33. table.clear(mobNames)
  34. for mobName in pairs(uniqueMobs) do
  35. table.insert(mobNames, mobName)
  36. end
  37.  
  38. if SelectMobsDropdown then
  39. SelectMobsDropdown:SetValues(mobNames)
  40. end
  41. end
  42.  
  43. mainmain:AddButton({
  44. Title = "刷新怪物",
  45. Callback = function()
  46. RefreshMobDropdown()
  47. end
  48. })
  49.  
  50. SelectMobsDropdown = mainmain:AddDropdown("SelectMobsDropdown", {
  51. Title = "選擇怪物",
  52. Description = "您可以選擇多個值",
  53. Values = mobNames,
  54. Multi = true,
  55. Default = {},
  56. })
  57.  
  58. -- Initial population of the dropdown
  59. RefreshMobDropdown()
  60.  
  61. local Values = {}
  62.  
  63. SelectMobsDropdown:OnChanged(function(Value)
  64. table.clear(Values)
  65. for i, v in pairs(Value) do
  66. table.insert(Values, i)
  67. end
  68. end)
  69.  
  70. local Players = game:GetService("Players")
  71. local Workspace = game:GetService("Workspace")
  72. local player = Players.LocalPlayer
  73. local char = player.Character or player.CharacterAdded:Wait()
  74. local hrp = char:WaitForChild("HumanoidRootPart")
  75. local currentTarget = nil
  76.  
  77. function findNewTarget()
  78. for _, v in pairs(Values) do
  79. for _, enemy in pairs(Workspace.Enemys:GetChildren()) do
  80. if enemy:IsA("Model") and
  81. enemy:FindFirstChild("HumanoidRootPart") and
  82. enemy:FindFirstChild("Humanoid") and
  83. enemy.Humanoid.Health > 0 and
  84. v == enemy.Name then
  85. return enemy
  86. end
  87. end
  88. end
  89. return nil
  90. end
  91.  
  92. function Autofarm()
  93. local function updateTarget()
  94. if not currentTarget or
  95. not currentTarget:FindFirstChild("Humanoid") or
  96. currentTarget.Humanoid.Health <= 0 then
  97. currentTarget = findNewTarget()
  98. end
  99. end
  100.  
  101. local function teleportToTarget()
  102. if currentTarget and currentTarget:FindFirstChild("HumanoidRootPart") then
  103. currentTarget.HumanoidRootPart.CFrame = hrp.CFrame * CFrame.new(0, 0, -7)
  104. end
  105. end
  106.  
  107. updateTarget()
  108. teleportToTarget()
  109. end
  110.  
  111. local FarmToggle = mainmain:AddToggle("FarmToggle", {Title = "開始農作", Default = false})
  112. FarmToggle:OnChanged(function()
  113. _G.AutoFarm = FarmToggle.Value
  114. currentTarget = nil -- Reset the current target when the toggle changes
  115. end)
  116.  
  117. coroutine.resume(coroutine.create(function()
  118. while task.wait() do
  119. if _G.AutoFarm and not _G.AutoHatchNearest then
  120. Autofarm()
  121. end
  122. end
  123. end))
  124.  
  125.  
  126. coroutine.resume(coroutine.create(function()
  127. while task.wait() do
  128. if _G.AutoFarm then
  129. local VirtualInputManager = game:GetService("VirtualInputManager")
  130. local X, Y = 0, 0
  131. VirtualInputManager:SendMouseButtonEvent(X, Y, 0, true, game, 1)
  132. VirtualInputManager:SendMouseButtonEvent(X, Y, 0, false, game, 1)
  133. end
  134. end
  135. end))
  136.  
  137. local other = Tabs.main:AddSection("其他")
  138.  
  139. local AutoEquipBestWeapon = other:AddToggle("AutoEquipBestWeapon", {Title = "自動裝備最佳武器", Default = false})
  140. AutoEquipBestWeapon:OnChanged(function()
  141. _G.AutoEquip = AutoEquipBestWeapon.Value
  142. end)
  143.  
  144. coroutine.resume(coroutine.create(function()
  145. while task.wait(2) do
  146. if _G.AutoEquip then
  147. game:GetService("ReplicatedStorage").Remotes.EquipBestWeapon:FireServer()
  148. end
  149. end
  150. end))
  151.  
  152. local AutoFuze = other:AddToggle("AutoFuze", {Title = "自動合成武器", Default = false})
  153. AutoFuze:OnChanged(function()
  154. _G.AutoFuze = AutoFuze.Value
  155. end)
  156.  
  157. coroutine.resume(coroutine.create(function()
  158. while task.wait(2) do
  159. if _G.AutoFuze then
  160. game:GetService("ReplicatedStorage").Remotes.FuseWeapon:FireServer()
  161. end
  162. end
  163. end))
  164.  
  165. local AutoRebirth = other:AddToggle("AutoRebirth", {Title = "自動重生", Default = false})
  166. AutoRebirth:OnChanged(function()
  167. _G.AutoRebirth = AutoRebirth.Value
  168. end)
  169.  
  170. coroutine.resume(coroutine.create(function()
  171. while task.wait(2) do
  172. if _G.AutoRebirth then
  173. game:GetService("ReplicatedStorage").Remotes.PlayerReborn:FireServer()
  174. end
  175. end
  176. end))
  177.  
  178. local other = Tabs.main:AddSection("英雄")
  179.  
  180. local AutoHatchNearest = other:AddToggle("AutoHatchNearest", {Title = "自動孵化英雄(最近的)", Default = false})
  181. AutoHatchNearest:OnChanged(function()
  182. _G.AutoHatchNearest = AutoHatchNearest.Value
  183. end)
  184.  
  185. coroutine.resume(coroutine.create(function()
  186. while task.wait() do
  187. if _G.AutoHatchNearest then
  188.  
  189. local mapsFolder = game.Workspace.Maps
  190. local currentmap = mapsFolder:GetChildren()[1]
  191.  
  192. if currentmap then
  193. local currentmap2 = currentmap:FindFirstChild("Map")
  194. if currentmap2 then
  195. local currentmapeggs = currentmap2:FindFirstChild("Eggs")
  196. if currentmapeggs then
  197. local Egg = currentmapeggs:GetChildren()[1]
  198. hrp.CFrame = Egg.CFrame
  199. task.wait()
  200. local button = game:service'VirtualInputManager'
  201. button:SendKeyEvent(true, "E", false, game)
  202. task.wait()
  203. button:SendKeyEvent(false, "E", false, game)
  204. end
  205. end
  206. end
  207.  
  208. end
  209. end
  210. end))
  211.  
  212.  
  213. local AutoEquipBestHero = other:AddToggle("AutoEquipBestHero", {Title = "自動裝備最佳英雄", Default = false})
  214. AutoEquipBestHero:OnChanged(function()
  215. _G.AutoEquipBestHero = AutoEquipBestHero.Value
  216. end)
  217.  
  218. coroutine.resume(coroutine.create(function()
  219. while task.wait(2) do
  220. if _G.AutoEquipBestHero then
  221. game:GetService("ReplicatedStorage").Remotes.AutoEquipBestHero:FireServer()
  222. end
  223. end
  224. end))
  225.  
  226. -- -- -- -- -- -- --
  227. end
  228. Window:SelectTab(1)
  229. end
  230.  
  231. MainScript()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement