Advertisement
JacosAlt

Arsenal autofarm

Feb 9th, 2022
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.76 KB | None | 0 0
  1. local library = loadstring(game:HttpGet(('https://pastebin.com/raw/FsJak6AT')))() -- It's obfuscated, I won't let you see my ugly coding skills. =)
  2.  
  3. local w = library:CreateWindow("Ph and Aresnal")
  4.  
  5. local b = w:CreateFolder("Main Functions")
  6.  
  7. b:Label("Credits: V3RMillion-Banckielol03, Discord-mario1234#6807",Color3.fromRGB(38,38,38),Color3.fromRGB(100, 149, 237))
  8.  
  9. b:Toggle("AutoFarm",function(bool)
  10.    if bool then
  11.        wait(5)
  12.        getgenv().AutoFarm = true
  13.        local camera = game.Workspace.CurrentCamera
  14.        function getClosest()
  15.            local closestdistance = math.huge
  16.            local ClosetPlayer = nil
  17.            for i,v in pairs(game.Players:GetChildren()) do
  18.                if v ~= game.Players.LocalPlayer and v.Team ~= game.Players.LocalPlayer.Team then
  19.                    local distance = (game.Players.LocalPlayer.Character.HumanoidRootPart.Position - v.Character.HumanoidRootPart.Position).magnitude
  20.                    if distance < closestdistance then
  21.                        closestdistance = distance
  22.                        ClosetPlayer = v
  23.                    end
  24.                end
  25.            end
  26.            return ClosetPlayer
  27.        end
  28.  
  29.        game:GetService("RunService").Stepped:connect(function()
  30.            if getgenv().AutoFarm == true then
  31.            game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = getClosest().Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, 4)
  32.            camera.CFrame = CFrame.new(camera.CFrame.Position, getClosest().Character.Head.Position)
  33.            mouse1press()
  34.            wait()
  35.            mouse1release()
  36.            keypress(0x52)
  37.            end
  38.        end)
  39.    else
  40.        print("Stopped")
  41.        getgenv().AutoFarm = false
  42.    end
  43. end)
  44.  
  45. b:DestroyGUI()
  46.  
  47. b:GuiSettings()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement