Honansik

Ro-Punch Man Auto Farm Script

Nov 29th, 2021
552
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. getgenv().settings = {
  2.     ['MinHP'] = 0,
  3.     ['MaxHP'] = 100
  4. }
  5.  
  6. local old
  7. local char = game:GetService("Players").LocalPlayer.Character
  8. local combat = game:GetService("ReplicatedStorage").Remotes.Melee.Combat
  9. local dash = game:GetService("ReplicatedStorage").Remotes.Player.Dash
  10.  
  11. if not char then warn("error") return end
  12. old = hookmetamethod(game, "__index", function(Index, Value)
  13.     if Value == "Position" and Index.Parent == char then
  14.         return Vector3.new(0,0,0)
  15.     end
  16.     return old(Index, Value)
  17. end)
  18.  
  19. local function attack()
  20.     for Index, Value in next, game:GetService("Workspace").FightableNPCS:GetChildren() do
  21.        
  22.         if Value:FindFirstChild("Humanoid") and Value.Humanoid.MaxHealth > settings.MinHP and Value.Humanoid.MaxHealth <= settings.MaxHP then
  23.             repeat
  24.                 char.HumanoidRootPart.CFrame = Value.PrimaryPart.CFrame + (Value.PrimaryPart.CFrame.lookVector*-5)
  25.                 combat:FireServer("Combat", 5)
  26.                
  27.                 game:GetService("RunService").Heartbeat:wait()
  28.                 dash:FireServer(Value.PrimaryPart.CFrame)
  29.             until not Value:FindFirstChild("Humanoid") or Value.Humanoid.Health <= 0
  30.         end
  31.     end
  32. end
  33.  
  34. local function addStamina()
  35.     game:GetService("ReplicatedStorage").Remotes.Player.STAMRemove:FireServer(-9e18)    
  36. end
  37.  
  38. addStamina()
  39. while wait() do
  40.     attack()
  41. end
RAW Paste Data