Advertisement
GodNecromancers

Weapon Fighting simulator script

Jul 21st, 2022
713
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.60 KB | None | 1 0
  1.  
  2. -- Dont Use on your main account for safety
  3. --https://www.roblox.com/games/8554378337/
  4.  
  5. _G.farmNearest = false
  6. _G.farmHighest = false
  7. _G.farmLowest = false
  8. _G.autoCollect = false
  9.  
  10. local plr = game.Players.LocalPlayer.Character.HumanoidRootPart
  11.  
  12. function getHighest()
  13. local high = {}
  14. for i, v in pairs(game:GetService("Workspace").Fight.Chests:GetChildren()) do
  15. for a, b in pairs(game:GetService("Workspace").Fight.ClientChests:GetChildren()) do
  16. if v.Name == b.Name then
  17. table.insert(high,v.ChestHp.Value)
  18. table.sort(high, function(a,b) return a > b end)
  19. end
  20. end
  21. end
  22.  
  23. for a, b in pairs(game:GetService("Workspace").Fight.Chests:GetChildren()) do
  24. if high[1] == b.ChestHp.Value then
  25. return b.Name
  26. end
  27. end
  28. end
  29.  
  30. function getLowest()
  31. local low = {}
  32. for i, v in pairs(game:GetService("Workspace").Fight.Chests:GetChildren()) do
  33. for a, b in pairs(game:GetService("Workspace").Fight.ClientChests:GetChildren()) do
  34. if v.Name == b.Name then
  35. table.insert(low,v.ChestHp.Value)
  36. table.sort(low, function(a,b) return a < b end)
  37. end
  38. end
  39. end
  40.  
  41. for a, b in pairs(game:GetService("Workspace").Fight.Chests:GetChildren()) do
  42. if low[1] == b.ChestHp.Value then
  43. return b.Name
  44. end
  45. end
  46. end
  47.  
  48. function getNear()
  49. local near;
  50. local nearr = math.huge
  51.  
  52. for i, v in pairs(game:GetService("Workspace").Fight.ClientChests:GetChildren()) do
  53. if (plr.Position - v.Root.Position).Magnitude < nearr then
  54. near = v
  55. nearr = (plr.Position - v.Root.Position).Magnitude
  56. end
  57. end
  58.  
  59. return near
  60. end
  61.  
  62. local title = "Weapon Fighting Simulator"
  63. for i, v in pairs(game.CoreGui:GetChildren()) do
  64. if v.Name == title then
  65. v:Destroy()
  66. end
  67. end
  68.  
  69. local library = loadstring(game:HttpGet("https://raw.githubusercontent.com/zxciaz/VenyxUI/main/Reuploaded"))()
  70. local venyx = library.new(tostring(title), 5012544693)
  71.  
  72. local themes = {
  73. Background = Color3.fromRGB(24, 24, 24),
  74. Glow = Color3.fromRGB(0, 0, 0),
  75. Accent = Color3.fromRGB(10, 10, 10),
  76. LightContrast = Color3.fromRGB(20, 20, 20),
  77. DarkContrast = Color3.fromRGB(14, 14, 14),
  78. TextColor = Color3.fromRGB(255, 255, 255)
  79. }
  80.  
  81. local page1 = venyx:addPage("Main", 5012544693)
  82. local sec1 = page1:addSection("Farm")
  83.  
  84. sec1:addToggle("Farm Nearest", nil, function(v)
  85. _G.farmNearest = v
  86.  
  87. spawn(function()
  88. while task.wait() do
  89. if not _G.farmNearest then break end
  90. pcall(function()
  91. local nearest = getNear()
  92.  
  93. plr.CFrame = nearest.Root.CFrame * CFrame.new(0,0,10)
  94. wait(.2)
  95.  
  96. workspace.Fight.Events.FightAttack:InvokeServer(0,nearest.Name)
  97.  
  98. repeat task.wait()
  99. plr.CFrame = nearest.Root.CFrame * CFrame.new(0,0,10)
  100. until nearest.Root == nil or not _G.farmNearest
  101. end)
  102. end
  103. end)
  104. end)
  105.  
  106. sec1:addToggle("Farm Highest", nil, function(v)
  107. _G.farmHighest = v
  108.  
  109. spawn(function()
  110. while task.wait() do
  111. if not _G.farmHighest then break end
  112. pcall(function()
  113. local highest = getHighest()
  114.  
  115. plr.CFrame = game:GetService("Workspace").Fight.ClientChests[highest].Root.CFrame * CFrame.new(0,0,10)
  116. wait(.2)
  117.  
  118. workspace.Fight.Events.FightAttack:InvokeServer(0,highest)
  119.  
  120. repeat task.wait()
  121. plr.CFrame = game:GetService("Workspace").Fight.ClientChests[highest].Root.CFrame * CFrame.new(0,0,10)
  122. until not game:GetService("Workspace").Fight.ClientChests[highest] or not _G.farmHighest
  123. end)
  124. end
  125. end)
  126. end)
  127.  
  128. sec1:addToggle("Farm Lowest", nil, function(v)
  129. _G.farmLowest = v
  130.  
  131. spawn(function()
  132. while task.wait() do
  133. if not _G.farmLowest then break end
  134. pcall(function()
  135. local lowest = getLowest()
  136.  
  137. plr.CFrame = game:GetService("Workspace").Fight.ClientChests[lowest].Root.CFrame * CFrame.new(0,0,10)
  138. wait(.2)
  139.  
  140. workspace.Fight.Events.FightAttack:InvokeServer(0,lowest)
  141.  
  142. repeat task.wait()
  143. plr.CFrame = game:GetService("Workspace").Fight.ClientChests[lowest].Root.CFrame * CFrame.new(0,0,10)
  144. until not game:GetService("Workspace").Fight.ClientChests[lowest] or not _G.farmLowest
  145. end)
  146. end
  147. end)
  148. end)
  149.  
  150. sec1:addToggle("Collect Rewards", nil, function(v)
  151. _G.autoCollect = v
  152.  
  153. spawn(function()
  154. while task.wait() do
  155. if not _G.autoCollect then break end
  156. for i, v in pairs(game:GetService("Workspace").Rewards:GetChildren()) do
  157. if v ~= nil then
  158. v.CFrame = plr.CFrame
  159. end
  160. end
  161. end
  162. end)
  163. end)
  164.  
  165. local miscPage = venyx:addPage("Misc", 5012544693)
  166. local miscSec = miscPage:addSection("Credits")
  167.  
  168. miscSec:addButton("Created by Uzu", function()
  169. print("ASD")
  170. end)
  171.  
  172. miscSec:addKeybind("Keybind", Enum.KeyCode.LeftControl, function()
  173. venyx:toggle()
  174. end)
  175.  
  176. miscSec:addButton("Delete Gui", function()
  177. for i, v in pairs(game.CoreGui:GetChildren()) do
  178. if v.Name == title then
  179. v:Destroy()
  180. end
  181. end
  182. end)
  183.  
  184. venyx:SelectPage(venyx.pages[1], true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement