Deviliishh

Limitless rpg autofarm

Aug 24th, 2019
70
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if _G.common == nil then
  2.     _G.common = false
  3. end
  4. if _G.uncommon == nil then
  5.     _G.uncommon = false
  6. end
  7. if _G.rare == nil then
  8. _G.rare = false
  9. end
  10. if _G.legendary == nil then
  11. _G.legendary = true
  12. end
  13. if _G.mythic == nil then
  14. _G.mythic = true
  15. end
  16. if _G.godly == nil then
  17. _G.godly = true
  18. end
  19. if _G.autosell == nil then
  20. _G.autosell = true
  21. end
  22. if _G.MinimumStrength == nil then
  23. _G.MinimumStrength = 0
  24. end
  25.  
  26.  
  27. _G.ok = not _G.ok
  28.  
  29. local player = game.Players.LocalPlayer
  30. local remote = game:GetService("ReplicatedStorage").Remotes.RemoteEvent
  31. local server = game:GetService("ReplicatedStorage").ServerNetwork
  32. local quests = player.PlayerGui.UI.ItemShop.Background.Frame.Background.Frame
  33. local VirtualUser = game:GetService('VirtualUser')
  34. local map = player:WaitForChild("CurrentMap").Value
  35. game:GetService("Players").LocalPlayer.Idled:connect(function()
  36.     VirtualUser:CaptureController()
  37.     VirtualUser:ClickButton2(Vector2.new())
  38. end)
  39. game:GetService("RunService"):BindToRenderStep("",0,function()
  40.     if not _G.ok then
  41.         game.Players.LocalPlayer.Character:findFirstChildOfClass("Humanoid"):ChangeState(18)
  42.     else
  43.         game.Players.LocalPlayer.Character:findFirstChildOfClass("Humanoid"):ChangeState(11)
  44.     end
  45. end)
  46. spawn(function()
  47.     while _G.ok do
  48.         if not _G.ok then
  49.             break
  50.         end
  51.         if quests.Godly.Timer.Text == "READY" and _G.godly then
  52.             server:InvokeServer("ItemShopPurchase", 6)
  53.         end
  54.         if quests.Mythic.Timer.Text == "READY" and _G.mythic then
  55.             server:InvokeServer("ItemShopPurchase", 5)
  56.         end
  57.         if quests.Legendary.Timer.Text == "READY" and _G.legendary then
  58.             server:InvokeServer("ItemShopPurchase", 4)
  59.         end
  60.         if quests.Rare.Timer.Text == "READY" and _G.rare then
  61.             server:InvokeServer("ItemShopPurchase", 3)
  62.         end
  63.         if quests.Uncommon.Timer.Text == "READY" and _G.uncommon then
  64.             server:InvokeServer("ItemShopPurchase", 2)
  65.         end
  66.         if quests.Common.Timer.Text == "READY" and _G.common then
  67.             server:InvokeServer("ItemShopPurchase", 1)
  68.         end
  69.         wait(10)
  70.     end
  71. end)
  72. spawn(function()
  73.     while _G.ok do
  74.         if not _G.ok then
  75.             break
  76.         end
  77.         local equipped = false
  78.         if #player.Quests:GetChildren() > 0 then
  79.             for i,v in pairs(player.Quests:GetChildren()) do
  80.                 if v.Equipped.Value then
  81.                     equipped = true
  82.                 end
  83.             end
  84.             if not equipped then
  85.                 if player.Quests:FindFirstChild("Godly") then
  86.                     server:InvokeServer("QuestFunction", "EquipQuest", player.Quests:FindFirstChild("Godly"))
  87.                 else
  88.                     server:InvokeServer("QuestFunction", "EquipQuest", player.Quests:GetChildren()[1])
  89.                 end
  90.             end
  91.         end
  92.         wait(5)
  93.     end
  94. end)
  95. spawn(function()
  96.     while _G.ok do
  97.         if not _G.ok then
  98.             break
  99.         end
  100.         if _G.autosell then
  101.             for i,v in pairs(player.Weapons:GetChildren()) do
  102.                 if not _G.ok then
  103.                     break
  104.                 end
  105.                 if v.Damage.Value < _G.MinimumStrength then
  106.                     server:InvokeServer("WeaponFunction","MassTrash",{v.GUID.Value})
  107.                 end
  108.             end
  109.         end
  110.         wait(5)
  111.     end
  112. end)
  113. while _G.ok do
  114.     wait()
  115.     if not _G.ok then
  116.         break
  117.     end
  118.     for i,v in pairs(workspace.Enemies[map]:GetChildren()) do
  119.         if not _G.ok then
  120.             break
  121.         end
  122.         player.Character.HumanoidRootPart.CFrame = v.HumanoidRootPart.CFrame + Vector3.new(0,-10,0)
  123.         v.HumanoidRootPart.Anchored = true
  124.         repeat wait()
  125.             if not _G.ok then
  126.                 break
  127.             end
  128.             remote:FireServer("DamageInvoke", v, "FireBall", false)
  129.         until not v:FindFirstChild("Humanoid") or v.Humanoid.Health < 1
  130.     end
  131. end
  132. if not _G.ok then
  133.     player.Character.HumanoidRootPart.CFrame = workspace.TeleportParts:WaitForChild(map).CFrame
  134. end
RAW Paste Data