Advertisement
BjeffeHund

Universal aimbot (v5)

Apr 30th, 2020
45,409
1
Never
4
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.42 KB | None | 1 0
  1. --[[
  2. pcall(function()
  3. loadstring(game:HttpGet('https://pastebin.com/raw/WvF4aN6G', true))()
  4. end)
  5. ]]--
  6. local library = loadstring(game:HttpGet(('https://pastebin.com/raw/FsJak6AT')))()
  7. local first_w = library:CreateWindow('Universal Aimbot!')
  8. local first_f = first_w:CreateFolder('Aimbot settings')
  9. local aimbot = false
  10. local accAimbot = false
  11. local toggleKey = 'MouseButton2'
  12. first_f:Toggle('Aimbot', function(a)
  13. accAimbot = a
  14. if not a then
  15. aimbot = false
  16. end
  17. end)
  18. local ffa = false
  19. local espStuff = false
  20. first_f:Toggle('FFA', function(a)
  21. ffa = a
  22. espStuff = a
  23. end)
  24. local targetPrt = "Head"
  25. first_f:Dropdown('Target part', {"Head", "HumanoidRootPart"}, function(a)
  26. targetPrt = a
  27. end)
  28. local toggleEsp = false
  29. local esp_f = first_w:CreateFolder('Esp settings')
  30. esp_f:Toggle('Esp', function(a)
  31. toggleEsp = a
  32. end)
  33. local debugMode = false
  34. local debug_f = first_w:CreateFolder('Debug stuff')
  35. debug_f:Toggle('Debug mode', function(a)
  36. debugMode = a
  37. end)
  38. local cc = game.workspace.CurrentCamera
  39. function pos(a)
  40. return cc:WorldToViewportPoint(a)
  41. end
  42. local mouse = game.Players.LocalPlayer:GetMouse()
  43. game:GetService("UserInputService").InputBegan:connect(function(a)
  44. if (a.UserInputType == Enum.UserInputType[toggleKey]) and accAimbot then
  45. warn("a")
  46. aimbot = true
  47. end
  48. end)
  49. game:GetService("UserInputService").InputEnded:connect(function(a)
  50. if (a.UserInputType == Enum.UserInputType[toggleKey]) and accAimbot then
  51. warn("b")
  52. aimbot = false
  53. end
  54. end)
  55. function getClosestMouse(trg_part)
  56. local nearest = nil
  57. local last = math.huge
  58. for i,v in pairs(game.Players:GetPlayers()) do
  59. if v ~= game.Players.LocalPlayer and game.Players.LocalPlayer.Character and v.Character and v.Character:FindFirstChild(trg_part) and (v.TeamColor ~= game.Players.LocalPlayer.TeamColor or espStuff) then
  60. if game.Players.LocalPlayer.Character:FindFirstChild(trg_part) then
  61. local lmao = true
  62. if checkIfObscured then
  63. local ignoreList = {game.Players.LocalPlayer.Character, v.Character}
  64. local cast = {game.Players.LocalPlayer.Character[trg_part].Position, v.Character[trg_part].Position}
  65. local parts = cc:GetPartsObscuringTarget(cast, ignoreList)
  66. if #parts ~= 0 then
  67. lmao = false
  68. end
  69. end
  70. local ePos = pos(v.Character[trg_part].Position)
  71. local AccPos = Vector2.new(ePos.x, ePos.y)
  72. local mousePos = Vector2.new(cc.ViewportSize.x / 2, cc.ViewportSize.y / 2)
  73. local distance = (AccPos - mousePos).magnitude
  74. if distance < last and lmao then
  75. last = distance
  76. nearest = v
  77. end
  78. end
  79. end
  80. end
  81. if nearest ~= nil then
  82. if game.PlaceId == 292439477 then
  83. for i,v in pairs(game.workspace.Players:GetChildren()) do
  84. if v:FindFirstChild(nearest.Name) then
  85. return nearest
  86. end
  87. end
  88. else
  89. return nearest
  90. end
  91. end
  92. end
  93. game:GetService('RunService').Stepped:connect(function()
  94. if aimbot then
  95. if getClosestMouse(targetPrt) ~= nil and getClosestMouse(targetPrt).Character ~= nil then
  96. local move, vis = pos(getClosestMouse(targetPrt).Character[targetPrt].Position)
  97. if vis then
  98. mousemoverel((move.x - mouse.x) * 0.2, ((move.y * 0.93) - mouse.y) * 0.2)
  99. end
  100. end
  101. end
  102. end)
  103. local test = {}
  104. local linePlrs = {}
  105. local textPlrs = {}
  106. game:GetService("RunService").RenderStepped:connect(function()
  107. if toggleEsp then
  108. for i,v in pairs(game.Players:GetPlayers()) do
  109. if test[v.Name] == nil then
  110. table.insert(linePlrs, Drawing.new('Line'))
  111. table.insert(textPlrs, Drawing.new('Text'))
  112. test[v.Name] = true
  113. end
  114. if v.Character and v.Character:FindFirstChild("HumanoidRootPart") and test[v.Name] ~= nil and v ~= game.Players.LocalPlayer and (v.TeamColor ~= game.Players.LocalPlayer.TeamColor or ffa) then
  115. local testing = false
  116. local hum, vis = pos(v.Character.HumanoidRootPart.Position)
  117. linePlrs[i].From = Vector2.new(cc.ViewportSize.x / 2, cc.ViewportSize.y)
  118. linePlrs[i].To = Vector2.new(hum.x, hum.y)
  119. linePlrs[i].Thickness = 2
  120. textPlrs[i].Size = 20
  121. if game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
  122. textPlrs[i].Text = tostring(math.floor((game.Players.LocalPlayer.Character.HumanoidRootPart.Position - v.Character.HumanoidRootPart.Position).magnitude))
  123. end
  124. textPlrs[i].Position = Vector2.new(hum.x, hum.y + 30)
  125. if v.TeamColor ~= game.Players.LocalPlayer.TeamColor then
  126. linePlrs[i].Color = Color3.new(255,0,0)
  127. textPlrs[i].Color = Color3.new(255,0,0)
  128. else
  129. linePlrs[i].Color = Color3.new(0,128,0)
  130. textPlrs[i].Color = Color3.new(0,128,0)
  131. end
  132. if game.PlaceId ~= 292439477 then
  133. linePlrs[i].Visible = vis
  134. textPlrs[i].Visible = vis
  135. end
  136. if game.PlaceId == 292439477 then
  137. for i2,v2 in pairs(game.workspace.Players:GetChildren()) do
  138. if v2:FindFirstChild(v.Name) then
  139. testing = true
  140. end
  141. end
  142. if not testing or not vis then
  143. linePlrs[i].Visible = false
  144. textPlrs[i].Visible = false
  145. elseif testing and vis then
  146. linePlrs[i].Visible = true
  147. textPlrs[i].Visible = true
  148. end
  149. end
  150. elseif v.Character and not v.Character:FindFirstChild("HumanoidRootPart") then
  151. linePlrs[i].Visible = false
  152. textPlrs[i].Visible = false
  153. elseif not ffa then --(v.TeamColor ~= game.Players.LocalPlayer.TeamColor or ffa)
  154. linePlrs[i].Visible = false
  155. textPlrs[i].Visible = false
  156. end
  157. end
  158. else
  159. for i,v in pairs(linePlrs) do
  160. v.Visible = false
  161. end
  162. for i,v in pairs(textPlrs) do
  163. v.Visible = false
  164. end
  165. end
  166. end)
  167. local ScreenGui = Instance.new("ScreenGui")
  168. local Frame = Instance.new("Frame")
  169. local TextLabel = Instance.new("TextLabel")
  170. ScreenGui.Parent = game.CoreGui
  171. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  172. Frame.Parent = ScreenGui
  173. Frame.BackgroundColor3 = Color3.new(1, 1, 1)
  174. Frame.Position = UDim2.new(0.717458367, 0, 0.128992632, 0)
  175. Frame.Size = UDim2.new(0, 401, 0, 140)
  176. TextLabel.Parent = Frame
  177. TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  178. TextLabel.Position = UDim2.new(0.0994343385, 0, 0.22857143, 0)
  179. TextLabel.Size = UDim2.new(0, 320, 0, 75)
  180. TextLabel.Font = Enum.Font.SourceSans
  181. TextLabel.TextColor3 = Color3.new(0, 0, 0)
  182. TextLabel.TextScaled = true
  183. Frame.Visible = false
  184. local run = true
  185. function check(a)
  186. local newTab = {}
  187. for i,v in pairs(test) do
  188. table.insert(newTab, i)
  189. if i == a then
  190. run = false
  191. --print(i, table.find(newTab, a), '\n')
  192. linePlrs[table.find(newTab, a)]:Remove()
  193. textPlrs[table.find(newTab, a)]:Remove()
  194. table.remove(linePlrs, table.find(newTab, a))
  195. table.remove(textPlrs, table.find(newTab, a))
  196. table.remove(newTab, table.find(newTab, a))
  197. if debugMode then
  198. TextLabel.Text = a .. "'s tracer should've gone away"
  199. wait(1)
  200. Frame.Visible = false
  201. end
  202. run = true
  203. end
  204. end
  205. end
  206. game.Players.PlayerRemoving:connect(function(a)
  207. repeat wait() until run
  208. if debugMode then
  209. Frame.Visible = true
  210. TextLabel.Text = a.Name .. " Left"
  211. end
  212. warn(a.Name, ' THIS WAS CALLED FROM SCRIPT OK ', '\n', 'lol')
  213. wait(1)
  214. check(a.Name)
  215. end)
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement