Advertisement
Guest User

Untitled

a guest
May 26th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.40 KB | None | 0 0
  1. --// written by gouttes
  2. --[[ to set the mobs you want to kill just add the number corresponding to the mbo to index_list table
  3. eg: index_list[#index_list + 1] = 7 would add the "Human" to the target list, same thing goes for selected key,
  4. just select the attack based off the key_list table, 5 being the mouseclick attack
  5.  
  6. feel free to make this into a gui, :), a script this simple shouldn't be paid
  7. ]]--
  8.  
  9.  
  10.  
  11.  
  12.  
  13. local index_list = {3, 2, 1}
  14. local tweenservice = game:GetService("TweenService")
  15. local workspace = game:GetService("Workspace")
  16. local Players = game:GetService("Players")
  17. local client = Players.LocalPlayer
  18. local plrrem = client.Character:FindFirstChild("Remotes")
  19. local npcs = workspace.NPCSpawns:GetChildren()
  20. local selected_key = 5
  21. local pressrem = plrrem.KeyEvent
  22. local tp_offset = Vector3.new(1, 0, 0)
  23. local remotepw
  24. local mouse = client:GetMouse()
  25. client.CameraMode = Enum.CameraMode.Classic
  26. client.CameraMinZoomDistance = 20
  27.  
  28.  
  29. local npc_table = {
  30. [1] = "Low Rank Aogiri Member",
  31. [2] = "Mid Rank Aogiri Member",
  32. [3] = "High Rank Aogiri Member",
  33. [4] = "Rank 1 Investigator",
  34. [5] = "Rank 2 Investigator",
  35. [6] = "First Class Investigator",
  36. [7] = "Human",
  37. [8] = "Athlete",
  38. }
  39.  
  40. local key_list = {
  41. [1] = "C",
  42. [2] = "E",
  43. [3] = "F",
  44. [4] = "R",
  45. [5] = "Mouse1",
  46. }
  47.  
  48.  
  49. local toggles = {
  50. ["autofarm"] = true,
  51.  
  52. }
  53.  
  54.  
  55. function grabKey()
  56. local key
  57. for i,v in next,(debug.getregistry()) do
  58. if type(v) == "function" then
  59. for i,v in next, debug.getupvalues(v) do
  60. if tostring(i) == "HRPPosition1" then
  61. key = v
  62. end
  63. end
  64. end
  65. end
  66. return key
  67. end
  68.  
  69. remotepw = grabKey()
  70.  
  71.  
  72. function checkOff(remotes)
  73. if remotes:FindFirstChild("GetPos") and remotes:FindFirstChild("StatUpdate") and remotes:FindFirstChild("UpdateAll") then
  74. --remotes:FindFirstChild("GetPos").RobloxLocked = true
  75. remotes:FindFirstChild("StatUpdate").RobloxLocked = true
  76. --remotes:FindFirstChild("UpdateAll").RobloxLocked = true
  77. else
  78. warn("checks are off")
  79. end
  80. end
  81.  
  82.  
  83. function getNPC(indexes)
  84. local npc_grab = {}
  85. for x,index in next, (indexes) do
  86. for i,v in next, (npcs) do
  87. if v:FindFirstChild(npc_table[index]) then
  88. table.insert(npc_grab, v:FindFirstChild(npc_table[index]))
  89. print("found " .. i)
  90. else
  91. warn("not found " .. i)
  92. end
  93. end
  94. end
  95. return npc_grab
  96. end
  97.  
  98. function eatCorpse()
  99. client.CameraMode = Enum.CameraMode.LockFirstPerson
  100. wait(1)
  101. mouse1click()
  102. wait(1)
  103. client.CameraMode = Enum.CameraMode.Classic
  104. client.CameraMinZoomDistance = 20
  105. end
  106.  
  107.  
  108.  
  109.  
  110.  
  111. function pressKey(key)
  112. pressrem:FireServer(remotepw, key_list[key], "Down", mouse.Hit)
  113. end
  114.  
  115. function tweenMove(model, target)
  116.  
  117. local CFrameValue = Instance.new("CFrameValue")
  118. CFrameValue.Value = model:GetPrimaryPartCFrame()
  119.  
  120. CFrameValue:GetPropertyChangedSignal("Value"):connect(function()
  121. model:SetPrimaryPartCFrame(CFrameValue.Value)
  122. end)
  123.  
  124.  
  125. local Info = TweenInfo.new(
  126.  
  127. ((model:GetPrimaryPartCFrame().Position - target.Position).magnitude)/ 250, -- Length
  128.  
  129. Enum.EasingStyle.Linear, -- Easing Style
  130.  
  131. Enum.EasingDirection.Out, -- Easing Direction
  132.  
  133. 0, -- Times repeated
  134.  
  135. false, -- Reverse
  136.  
  137. 0 -- Delay
  138.  
  139. )
  140. local tween = tweenservice:Create(CFrameValue, Info, {Value = target.CFrame})
  141.  
  142. tween:Play()
  143. end
  144.  
  145.  
  146. --// MAIN LOOP
  147.  
  148. local char = client.Character
  149. char.PrimaryPart = char.HumanoidRootPart
  150.  
  151. checkOff(plrrem)
  152. wait()
  153. -- index_list[#index_list + 1] = 1
  154.  
  155.  
  156. while toggles["autofarm"] do
  157. for i,o in next,getNPC(index_list) do
  158. while o:FindFirstChild("HumanoidRootPart") do
  159. tweenMove(char, o:FindFirstChild("HumanoidRootPart"))
  160. pressKey(selected_key)
  161. wait()
  162. end
  163. eatCorpse()
  164. end
  165. wait()
  166. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement