Advertisement
trixade

Untitled

Apr 20th, 2022
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.97 KB | None | 0 0
  1. local Farming = false
  2. local Hopped = false
  3. local TimeLeft = 30
  4. local TurnBack = 4
  5. local CheckTick = tick()
  6. local PlayerLocked
  7. local Back = true
  8.  
  9. function DetectPlayer()
  10.     local Blacklist = {workspace.CurrentCamera}
  11.     if game:GetService("Players").LocalPlayer.Character then
  12.         table.insert(Blacklist, game:GetService("Players").LocalPlayer.Character)
  13.     end
  14.     if workspace:FindFirstChild("Map") then
  15.         table.insert(Blacklist, workspace.Map)
  16.     end
  17.  
  18.     local RaycastParam = RaycastParams.new()
  19.     RaycastParam.FilterType = Enum.RaycastFilterType.Blacklist
  20.     RaycastParam.FilterDescendantsInstances = Blacklist
  21.  
  22.     local NewRay = Ray.new(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(0, 1.5, 0), workspace.CurrentCamera.CFrame.LookVector * 50000, RaycastParam)
  23.     local PlayerGot
  24.  
  25.     if NewRay.Instance then
  26.         if NewRay.Instance:IsDescendantOf(workspace) then
  27.             if NewRay.Instance.Parent:IsA("Model") then
  28.                 if game:GetService("Players"):GetPlayerFromCharacter(NewRay.Instance.Parent) then
  29.                     PlayerGot = game:GetService("Players"):GetPlayerFromCharacter(NewRay.Instance.Parent)
  30.                 end
  31.             elseif NewRay.Instance.Parent:IsA("Accessory") then
  32.                 if game:GetService("Players"):GetPlayerFromCharacter(NewRay.Instance.Parent.Parent) then
  33.                     PlayerGot = game:GetService("Players"):GetPlayerFromCharacter(NewRay.Instance.Parent.Parent)
  34.                 end
  35.             end
  36.         end
  37.  
  38.         if PlayerGot and PlayerGot.Status.Team.Value ~= game:GetService("Players").LocalPlayer.Status.Team.Value and PlayerGot.NRPBS.Health.Value > 0 then
  39.             return true
  40.         end
  41.     end
  42.  
  43.     return false
  44. end
  45.  
  46.  
  47. function StartAutofarm()
  48.     repeat wait() until game:GetService("ReplicatedStorage").wkspc.Status.RoundOver.Value == false
  49.     if game:GetService("ReplicatedStorage").wkspc.Status.LastGamemode.Value:lower():find("hackula") then ServerHop() return end
  50.    
  51.     Farming = true
  52.     for i,v in pairs(game:GetService("ReplicatedStorage").wkspc:GetDescendants()) do if v.Name:lower():find("curse") then v.Value = "Infinite Ammo" end end
  53.     -- lol infinite ammo, didn't feel like making my own script to modify the client's local variables, so I figure why not just use hackula's built in infinite ammo?
  54.  
  55.  
  56.  
  57.     spawn(function()
  58.         repeat
  59.             if game:GetService("Players").LocalPlayer.Status.Team.Value ~= "Spectator" then
  60.                 for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  61.                     if v ~= game:GetService("Players").LocalPlayer then
  62.                         if v.Character then
  63.                             if v.NRPBS.Health.Value > 0 then
  64.                                 if v.Status.Team.Value ~= "Spectator" then
  65.                                     if v.Character:FindFirstChild("Spawned") and v.Status.Team.Value ~= game:GetService("Players").LocalPlayer.Status.Team.Value then
  66.                                         TimeLeft = 25
  67.                                         TurnBack = 4
  68.                                         Back = true
  69.                                         repeat
  70.                                             PlayerLocked = v
  71.                                             wait(.1)
  72.                                             TurnBack = TurnBack - 0.1
  73.                                             if TurnBack <= 0 then
  74.                                                 Back = false
  75.                                             elseif TurnBack <= -4 then
  76.                                                 break
  77.                                             end
  78.                                         until game:GetService("ReplicatedStorage").wkspc.Status.RoundOver.Value or not v or not v.Character or not v.Character:FindFirstChild("Spawned") or v.NRPBS.Health.Value <= 0 or v.Status.Team.Value == "Spectator" or v.Status.Alive.Value == false or game:GetService("Players").LocalPlayer.Status.Team.Value == v.Status.Team.Value
  79.                                     end
  80.                                 end
  81.                             end
  82.                         end
  83.                     end
  84.                 end
  85.             end
  86.             wait(1)
  87.         until game:GetService("ReplicatedStorage").wkspc.Status.RoundOver.Value == true
  88.  
  89.         wait(5)
  90.         print("f")
  91.     end)
  92. end
  93.  
  94. spawn(function()
  95.     while wait(3) do
  96.         game:GetService("VirtualUser"):Button2Down(Vector2.new(0, 0), workspace.CurrentCamera.CFrame)
  97.         wait(1)
  98.         game:GetService("VirtualUser"):Button2Up(Vector2.new(0, 0), workspace.CurrentCamera.CFrame)
  99.     end
  100. end)
  101.  
  102. spawn(function()
  103.     while wait(1) do
  104.         if game:GetService("Players").LocalPlayer.NRPBS.Health.Value <= 0 and game:GetService("Players").LocalPlayer.Status.Team.Value ~= "Spectator" then
  105.             game:GetService("ReplicatedStorage").Events.LoadCharacter:FireServer()
  106.         end
  107.     end
  108. end)
  109. spawn(function()
  110.     while wait(1) do
  111.        
  112.                 if game:GetService("ReplicatedStorage").wkspc.Status.LastGamemode.Value:lower():find("hackula") then
  113.                     print("f")
  114.                     break
  115.                 end
  116. end
  117. end)
  118. local num = 6
  119. local up = 0
  120. game:GetService("RunService").RenderStepped:Connect(function()
  121.     if Farming then
  122.         if workspace:FindFirstChild("Map") and PlayerLocked and PlayerLocked.Character and PlayerLocked.NRPBS.Health.Value > 0 and PlayerLocked.Character:FindFirstChild("HeadHB") then
  123.             workspace.CurrentCamera.CFrame = CFrame.new(workspace.CurrentCamera.CFrame.Position, PlayerLocked.Character.HeadHB.Position)
  124.             if Back then num = 2 up = 0 else num = -2 up = 2 end
  125.             game:GetService("Players").LocalPlayer.Character:SetPrimaryPartCFrame(
  126.                 PlayerLocked.Character.HumanoidRootPart.CFrame * CFrame.new(-1.0, up, num)
  127.             )
  128.            
  129.             local RayParams = RaycastParams.new()
  130.             RayParams.FilterType = Enum.RaycastFilterType.Blacklist
  131.             RayParams.FilterDescendantsInstances = {workspace.CurrentCamera, game:GetService("Players").LocalPlayer.Character, workspace.Map.Ignore, workspace.Map.Clips}
  132.                
  133.             local Result = workspace:Raycast(workspace.CurrentCamera.CFrame.Position, workspace.CurrentCamera.CFrame.LookVector * 10000, RayParams)
  134.             local Player
  135.            
  136.             if Result and Result.Instance then
  137.                 if Result.Instance:IsDescendantOf(PlayerLocked.Character) then
  138.                     game:GetService("VirtualUser"):Button1Down(Vector2.new(0, 0), workspace.CurrentCamera.CFrame)
  139.                 end
  140.             end
  141.         end
  142.     end
  143.    
  144.     if game:GetService("ReplicatedStorage").wkspc.Status.RoundOver.Value == true then PlayerLocked = nil end
  145.     if not game:GetService("Players").LocalPlayer.Character then PlayerLocked = nil end
  146.     if game:GetService("Players").LocalPlayer.NRPBS.Health.Value <= 0 then PlayerLocked = nil end
  147. end)
  148. for i,v in next, game.ReplicatedStorage.Weapons:GetChildren() do
  149. for i,c in next, v:GetChildren() do -- for some reason, using GetDescendants dsent let you modify weapon ammo, so I do this instead
  150. for i,x in next, getconnections(c.Changed) do
  151. x:Disable() -- probably not needed
  152. end
  153. if c.Name == "Ammo" or c.Name == "StoredAmmo" then
  154. c.Value = 300 -- don't set this above 300 or else your guns wont work
  155. elseif c.Name == "AReload" or c.Name == "RecoilControl" or c.Name == "EReload" or c.Name == "SReload" or c.Name == "ReloadTime" or c.Name == "EquipTime" or c.Name == "Spread" or c.Name == "MaxSpread" then
  156. c.Value = 0
  157. elseif c.Name == "Range" then
  158. c.Value = 9e9
  159. elseif c.Name == "Auto" then
  160. c.Value = true
  161. elseif c.Name == "FireRate" or c.Name == "BFireRate" then
  162. c.Value = 0.02 -- don't set this lower than 0.02 or else your game will crash
  163. end
  164. end
  165. end
  166. game:GetService('RunService').Stepped:connect(function() -- Infinite Ammo by Frontman#9917
  167.         game:GetService("Players").LocalPlayer.PlayerGui.GUI.Client.Variables.ammocount.Value = 999 -- dont do it higher then 999
  168.         game:GetService("Players").LocalPlayer.PlayerGui.GUI.Client.Variables.ammocount2.Value = 999
  169. end)
  170. StartAutofarm()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement