Advertisement
Guest User

Weapon Fighting Op Script

a guest
Feb 3rd, 2022
19,493
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.97 KB | None | 0 0
  1.  
  2. --[[
  3. https://www.roblox.com/games/8554378337/
  4. loadstring(game:HttpGet("https://www.scriptblox.com/raw/WFS-or-Autofarm_393")()
  5. --]]
  6.  
  7. repeat wait() until game:IsLoaded()
  8.  
  9. _G.autofarm = false
  10. _G.farmType = "Nearest"
  11. _G.autoCollect = false
  12. _G.autoGamble = false
  13. _G.autoBoss = false
  14.  
  15. local bb = game:GetService("VirtualUser")
  16. local tickk = tick()
  17. local area = {}
  18. local bossArea = {}
  19.  
  20. game:GetService("Players").LocalPlayer.Idled:Connect(function()
  21. bb:CaptureController()
  22. bb:ClickButton2(Vector2.new())
  23. end)
  24.  
  25. table.insert(area,"-- Select Area --")
  26. for i, v in pairs(game:GetService("Workspace").Fight:GetChildren()) do
  27. if string.find(v.Name,"FightArea") and not table.find(area,v.Name)then
  28. table.insert(area,v.Name)
  29. end
  30. end
  31. table.sort(area)
  32.  
  33. table.insert(bossArea,"-- Select Area -- ")
  34. for i, v in pairs(game:GetService("Workspace").Fight:GetChildren()) do
  35. if v:FindFirstChild("BossTeleports") and not table.find(bossArea,v.Name) then
  36. table.insert(bossArea,v.Name)
  37. end
  38. end
  39. table.sort(bossArea)
  40.  
  41. if _G.AreaLoad then _G.AreaLoad:Disconnect() end
  42. _G.AreaLoad = game:GetService("Workspace").Fight.ChildAdded:Connect(function(asd)
  43. if string.find(asd.Name,"FightArea") then
  44. table.clear(area)
  45. for i, v in pairs(game:GetService("Workspace").Fight:GetChildren()) do
  46. if string.find(v.Name,"FightAre") and not table.find(area,v.Name)then
  47. table.insert(area,v.Name)
  48. end
  49. end
  50. table.sort(area)
  51. end
  52. if asd:FindFirstChild("BossTeleports") then
  53. table.clear(bossArea)
  54. table.insert(bossArea,"-- Select Area -- ")
  55. for i, v in pairs(game:GetService("Workspace").Fight:GetChildren()) do
  56. if v:FindFirstChild("BossTeleports") and not table.find(bossArea,v.Name)then
  57. table.insert(bossArea,v.Name)
  58. end
  59. end
  60. table.sort(bossArea)
  61. end
  62. end)
  63.  
  64. function getHighest()
  65. local high = {}
  66. for i, v in pairs(game:GetService("Workspace").Fight.Chests:GetChildren()) do
  67. for x, y in pairs(game.Workspace.Fight[_G.selectedArea].Root:GetChildren()) do
  68. if v.Name == y.Name then
  69. table.insert(high,v.ChestHp.Value)
  70. table.sort(high, function(a,b) return a > b end)
  71. end
  72. end
  73. end
  74.  
  75. for a, b in pairs(game:GetService("Workspace").Fight.Chests:GetChildren()) do
  76. for x, y in pairs(game.Workspace.Fight[_G.selectedArea].Root:GetChildren()) do
  77. if b.Name == y.Name and high[1] == b.ChestHp.Value then
  78. return b.Name
  79. end
  80. end
  81. end
  82. end
  83.  
  84. function getMid()
  85. local mid = {}
  86. for i, v in pairs(game:GetService("Workspace").Fight.Chests:GetChildren()) do
  87. for x, y in pairs(game.Workspace.Fight[_G.selectedArea].Root:GetChildren()) do
  88. if v.Name == y.Name then
  89. table.insert(mid,v.ChestHp.Value)
  90. table.sort(mid, function(a,b) return a < b end)
  91. end
  92. end
  93. end
  94.  
  95. for a, b in pairs(game:GetService("Workspace").Fight.Chests:GetChildren()) do
  96. for x, y in pairs(game.Workspace.Fight[_G.selectedArea].Root:GetChildren()) do
  97. if b.Name == y.Name and mid[tonumber(string.format("%.g",#mid/2))] == b.ChestHp.Value then
  98. return b.Name
  99. end
  100. end
  101. end
  102. end
  103.  
  104. function getLowest()
  105. local low = {}
  106. for i, v in pairs(game:GetService("Workspace").Fight.Chests:GetChildren()) do
  107. for x, y in pairs(game.Workspace.Fight[_G.selectedArea].Root:GetChildren()) do
  108. if v.Name == y.Name then
  109. table.insert(low,v.ChestHp.Value)
  110. table.sort(low, function(a,b) return a < b end)
  111. end
  112. end
  113. end
  114.  
  115. for a, b in pairs(game:GetService("Workspace").Fight.Chests:GetChildren()) do
  116. for x, y in pairs(game.Workspace.Fight[_G.selectedArea].Root:GetChildren()) do
  117. if b.Name == y.Name and low[1] == b.ChestHp.Value then
  118. return b.Name
  119. end
  120. end
  121. end
  122. end
  123.  
  124. function getNear()
  125. local near;
  126. local nearr = math.huge
  127. local plr = game.Players.LocalPlayer.Character.HumanoidRootPart
  128.  
  129. for i, v in pairs(game:GetService("Workspace").Fight.ClientChests:GetChildren()) do
  130. if (plr.Position - v.Root.Position).Magnitude < nearr then
  131. near = v
  132. nearr = (plr.Position - v.Root.Position).Magnitude
  133. end
  134. end
  135.  
  136. return near
  137. end
  138.  
  139. function getQiChest()
  140. for i, v in pairs(game:GetService("Workspace").Fight.Chests:GetChildren()) do
  141. for x, y in pairs(game.Workspace.Fight[_G.selectedArea].Root:GetChildren()) do
  142. if v.Name == y.Name and string.find(v.Value,"ChestBaoXiang") then
  143. return v.Name
  144. end
  145. end
  146. end
  147. end
  148.  
  149. local alive = true
  150.  
  151. if _G.checkAlive then _G.checkAlive:Disconnect() end
  152. _G.checkAlive = game.Players.LocalPlayer.Character:WaitForChild("Humanoid").Died:Connect(function()
  153. alive = false print(alive) wait(6) alive = true print(alive)
  154. game.Players.LocalPlayer.CharacterAdded:Connect(function(a)
  155. a:WaitForChild("Humanoid").Died:Connect(function()
  156. alive = false wait(6) alive = true
  157. end)
  158. end)
  159. end)
  160.  
  161. function teleport(part)
  162. local player = game.Players.LocalPlayer.Character.HumanoidRootPart
  163. player.CFrame = part.CFrame * CFrame.new(0,2,5)
  164. end
  165.  
  166. function MoveTo(enemy)
  167. game.Players.LocalPlayer.Character.Humanoid:MoveTo(enemy.Position)
  168. end
  169.  
  170. function hrt()
  171. local lol = game.Players.LocalPlayer.Character.HumanoidRootPart
  172. return lol
  173. end
  174.  
  175. function sendKey(key)
  176. game:GetService('VirtualInputManager'):SendKeyEvent(true, key, false, game) wait()
  177. game:GetService('VirtualInputManager'):SendKeyEvent(false, key, false, game)
  178. end
  179.  
  180. local library = loadstring(game:HttpGet("https://pastebin.com/raw/Uz6HijUN", true))()
  181. local w = library:CreateWindow("Farming")
  182. local a = library:CreateWindow("Gamble")
  183. local c = library:CreateWindow("Boss")
  184. local b = library:CreateWindow("Misc")
  185.  
  186. w:Toggle("Enabled", {flag = "a"}, function(value)
  187. _G.autofarm = value
  188.  
  189. task.spawn(function()
  190. while task.wait() do
  191. if not _G.autofarm then break end
  192. pcall(function()
  193. local tickk = tick()
  194. if alive == true then
  195. if _G.farmType == "Nearest" then
  196. local nearest = getNear()
  197.  
  198. if (hrt().Position - nearest.Root.Position).Magnitude < 50 then
  199. MoveTo(nearest.Root)
  200. else
  201. teleport(nearest.Root)
  202. end
  203.  
  204. wait(.5)
  205. fireclickdetector(nearest.Root.ClickDetector,69)
  206. repeat task.wait()
  207. MoveTo(nearest.Root)
  208. until nearest.Root == nil or not _G.autofarm or alive == false or tick()-tickk > 45
  209. elseif _G.farmType == "High Hp" then
  210. local highest = getHighest()
  211. local highestChest = game:GetService("Workspace").Fight.ClientChests[highest].Root
  212.  
  213. if (hrt().Position - highestChest.Position).Magnitude < 50 then
  214. MoveTo(highestChest)
  215. else
  216. teleport(highestChest)
  217. end
  218.  
  219. wait(.5)
  220. fireclickdetector(highestChest.ClickDetector,69)
  221. repeat task.wait()
  222. MoveTo(highestChest)
  223. until not game:GetService("Workspace").Fight.ClientChests[highest].Root or not _G.autofarm or alive == false or tick()-tickk > 45
  224. elseif _G.farmType == "Mid Hp" then
  225. local mid = getMid()
  226. local midChest = game:GetService("Workspace").Fight.ClientChests[mid].Root
  227.  
  228. if (hrt().Position - midChest.Position).Magnitude < 50 then
  229. MoveTo(midChest)
  230. else
  231. teleport(midChest)
  232. end
  233.  
  234. wait(.5)
  235. fireclickdetector(midChest.ClickDetector,69)
  236. repeat task.wait()
  237. MoveTo(midChest)
  238. until not game:GetService("Workspace").Fight.ClientChests[mid].Root or not _G.autofarm or alive == false or tick()-tickk > 45
  239. elseif _G.farmType == "Low Hp" then
  240. local lowest = getLowest()
  241. local lowestChest = game:GetService("Workspace").Fight.ClientChests[lowest].Root
  242.  
  243. if (hrt().Position - lowestChest.Position).Magnitude < 50 then
  244. MoveTo(lowestChest)
  245. else
  246. teleport(lowestChest)
  247. end
  248.  
  249. wait(.5)
  250. fireclickdetector(lowestChest.ClickDetector,69)
  251. repeat task.wait()
  252. MoveTo(lowestChest)
  253. until not game:GetService("Workspace").Fight.ClientChests[lowest].Root or not _G.autofarm or alive == false or tick()-tickk > 45
  254. elseif _G.farmType == "Qi Chest" then
  255. local qiChest = getQiChest()
  256. local chest = game:GetService("Workspace").Fight.ClientChests[qiChest].Root
  257.  
  258. if (hrt().Position - chest.Position).Magnitude < 50 then
  259. MoveTo(chest)
  260. else
  261. teleport(chest)
  262. end
  263.  
  264. wait(.5)
  265. fireclickdetector(chest.ClickDetector,69)
  266. repeat task.wait()
  267. MoveTo(chest)
  268. until not game:GetService("Workspace").Fight.ClientChests[qiChest].Root or not _G.autofarm or alive == false or tick()-tickk > 45
  269. end
  270. end
  271. end)
  272. end
  273. end)
  274. end)
  275.  
  276. w:Dropdown("Farm Type", {flag = "b" ,list = {"Nearest","High Hp","Mid Hp","Low Hp","Qi Chest"}}, function(v)
  277. _G.farmType = v
  278. end)
  279.  
  280. w:Dropdown("Select Area", {flag = "c", list = area}, function(v)
  281. _G.selectedArea = v
  282. end)
  283.  
  284. w:Toggle("Collect Rewards", {flag = "d"}, function(value)
  285. _G.autoCollect = value
  286.  
  287. local d = require(game:GetService("ReplicatedStorage").CommonConfig.CfgGlobal)
  288.  
  289. if _G.autoCollect then
  290. d.RewardCollectRadius = 9e99
  291. else
  292. d.RewardCollectRadius = 12
  293. end
  294. end)
  295.  
  296. a:Toggle("Enabled", {flag = "ad"}, function(v)
  297. _G.autoGamble = v
  298.  
  299. task.spawn(function()
  300. while task.wait() do
  301. if not _G.autoGamble then break end
  302. for i, v in pairs(game.Workspace.Fight[_G.areatoGamble].Gamble:GetChildren()) do
  303. if v:IsA("Part") then
  304. teleport(v)
  305. sendKey("E")
  306. end
  307. end
  308. end
  309. end)
  310. end)
  311.  
  312. a:Dropdown("Select Area", {flag = "zad", list = area}, function(v)
  313. _G.areatoGamble = v
  314. end)
  315.  
  316. c:Toggle("Enabled", { flag = "e",}, function(value)
  317. _G.autoBoss = value
  318.  
  319. task.spawn(function()
  320. while task.wait() do
  321. if not _G.autoBoss then break end
  322. pcall(function()
  323. local tickk = tick()
  324. wait(1)
  325. game:GetService("ReplicatedStorage").CommonLibrary.Tool.RemoteManager.Funcs.DataPullFunc:InvokeServer("ArenaTeleportLeaveChannel", "Out")
  326. wait(1)
  327. teleport(game:GetService("Workspace").Fight[_G.selectedBossArea].BossTeleports.Platform.Platform)
  328. wait(1)
  329. game:GetService("ReplicatedStorage").CommonLibrary.Tool.RemoteManager.Events.BossRoomStartEvent:FireServer("room1")
  330. game:GetService("ReplicatedStorage").CommonLibrary.Tool.RemoteManager.Events.BossRoomStartEvent:FireServer("room2")
  331. wait(1)
  332. local near = getNear()
  333. teleport(near.Root)
  334. wait(.5)
  335. fireclickdetector(near.Root.ClickDetector,69)
  336. repeat task.wait()
  337. teleport(near.Root)
  338. until not near.Root or not _G.autoBoss or alive == false or tick()-tickk > 69
  339. end)
  340. end
  341. end)
  342. end)
  343.  
  344. c:Dropdown("Select Area", { flag = "f", list = bossArea}, function(v)
  345. _G.selectedBossArea = v
  346. end)
  347.  
  348. b:Button("Unlock Gamepass", function()
  349. local a = require(game:GetService("ReplicatedStorage").CommonLogic.Model.GamePasses)
  350. a.HasGamePass = function() return true end
  351.  
  352. game:GetService("Players").LocalPlayer.PlayerGui.MainGui.ScreenGui.MainLeftBarView.FrameChild4.BgTeleport.ImgMask.Visible = false
  353. end)
  354.  
  355. b:Button("Invisible", function()
  356. pcall(function()
  357. for i, v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  358. if v:IsA("MeshPart") and v.Name ~= "Head" and v.Name ~= "LowerTorso" and v.Name ~= "UpperTorso" then
  359. v:Destroy()
  360. end
  361. end
  362. game.Players.LocalPlayer.Character.Humanoid.Animator:Destroy() wait(1)
  363. game.Players.LocalPlayer.Character.LowerTorso.Root:Destroy()
  364. game.Players.LocalPlayer.Character.NameTag:Destroy()
  365. end)
  366. end)
  367.  
  368. b:Button("Reload Script", function()
  369. loadstring(game:HttpGet("https://pastebin.com/raw/Bd6R0GaC"))()
  370. end)
  371.  
  372. b:Section("Script by Uzu")
  373.  
  374. b:Button("discord.gg/waAsQFwcBn", function()
  375. setclipboard(tostring("discord.gg/waAsQFwcBn"))
  376. end)
  377.  
  378. warn("script took",string.format("%.0f",tick()-tickk),"seconds to load")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement