Advertisement
BjeffeHund

Universal Aimbot b)))

Apr 22nd, 2020
3,616
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.62 KB | None | 0 0
  1. local aimbot = false
  2. game:GetService("UserInputService").InputBegan:connect(function(a)
  3. if (a.UserInputType == Enum.UserInputType[_G.settings.ToggleAimbot]) then --and aimbot == false
  4. warn("a")
  5. aimbot = true
  6. end
  7. end)
  8. game:GetService("UserInputService").InputEnded:connect(function(a)
  9. if (a.UserInputType == Enum.UserInputType[_G.settings.ToggleAimbot]) then
  10. warn("b")
  11. aimbot = false
  12. end
  13. end)
  14. local cc = game.workspace.CurrentCamera
  15. local mouse = game.Players.LocalPlayer:GetMouse()
  16. function pos(a)
  17. return cc:WorldToViewportPoint(a)
  18. end
  19. function esp(char)
  20. local line = Drawing.new('Line')
  21. local box = Drawing.new('Square')
  22. local cham = Drawing.new('Circle')
  23. local text = Drawing.new('Text')
  24. line.Color = Color3.new(255,0,0)
  25. line.From = Vector2.new(cc.ViewportSize.x / 2, cc.ViewportSize.y)
  26. line.Thickness = 1
  27. box.Color = Color3.new(255,0,0)
  28. box.Thickness = 3
  29. cham.Color = Color3.new(255,0,0)
  30. cham.Filled = true
  31. cham.Transparency = 1
  32. text.Size = 20
  33. text.Color = Color3.new(255,0,0)
  34. game:GetService('RunService').Stepped:connect(function()
  35. function lolVis(ok)
  36. if _G.settings.esp_settings.Tracers then
  37. line.Visible = ok
  38. else
  39. line.Visible = false
  40. end
  41. if _G.settings.esp_settings.Box then
  42. box.Visible = ok
  43. text.Visible = ok
  44. else
  45. box.Visible = false
  46. text.Visible = false
  47. end
  48. if _G.settings.esp_settings.Chams then
  49. cham.Visible = ok
  50. else
  51. cham.Visible = false
  52. end
  53. end
  54. function lolClr(ok)
  55. line.Color = Color3.new(unpack(ok))
  56. box.Color = Color3.new(unpack(ok))
  57. cham.Color = Color3.new(unpack(ok))
  58. text.Color = Color3.new(unpack(ok))
  59. end
  60. if char and char:FindFirstChild("Head") and game.Players.LocalPlayer.Character and game.Players:GetPlayerFromCharacter(char) and _G.settings.esp_settings.Esp then
  61. local hum, vis = pos(char.Head.Position)
  62. local getPlayer = game.Players:GetPlayerFromCharacter(char)
  63. local name = getPlayer.Name
  64. box.Size = Vector2.new(40,40)
  65. box.Position = Vector2.new(hum.x - box.Size.x / 2, hum.y - box.Size.y / 2)--hum.x - box.Size.x / 2, hum.y - box.Size.y / 2
  66. cham.Radius = 500 / hum.Z
  67. cham.Position = Vector2.new(hum.x, hum.y)
  68. line.To = Vector2.new(hum.x + box.Size.x / 32, hum.y + box.Size.y / 2)
  69. if game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
  70. text.Text = getPlayer.Name .. "\n" .. tostring(math.floor((char:FindFirstChild("Head").Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).magnitude))
  71. end
  72. text.Position = Vector2.new(hum.x + box.Size.x * 1.1, hum.y - box.Size.y)
  73. local testing = false
  74. if game.PlaceId == 292439477 then
  75. for i,v in pairs(game.workspace.Players:GetChildren()) do
  76. if v:FindFirstChild(name) then
  77. testing = true
  78. end
  79. end
  80. if not testing or not vis then
  81. lolVis(false)
  82. elseif testing and vis then
  83. lolVis(true)
  84. end
  85. end
  86. if game.PlaceId ~= 292439477 then
  87. lolVis(vis)
  88. end
  89. if getPlayer then
  90. if getPlayer.TeamColor ~= game.Players.LocalPlayer.TeamColor and _G.settings.esp_settings.Teamcheck then
  91. lolClr({255,0,0}) --red
  92. elseif getPlayer.TeamColor == game.Players.LocalPlayer.TeamColor and _G.settings.esp_settings.Teamcheck then
  93. lolVis(false)
  94. elseif not _G.settings.esp_settings.Teamcheck and getPlayer.TeamColor == game.Players.LocalPlayer.TeamColor then
  95. lolClr({0,128,0}) --green
  96. end
  97. end
  98. else
  99. lolVis(false)
  100. end
  101. end)
  102. end
  103. function getClosestMouse(trg_part)
  104. local nearest = nil
  105. local last = math.huge
  106. local ignore = {}
  107. for i,v in pairs(game.Players:GetPlayers()) do
  108. 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 then -- and v.TeamColor ~= game.Players.LocalPlayer.TeamColor
  109. if game.Players.LocalPlayer.Character:FindFirstChild(trg_part) then
  110. local ePos = pos(v.Character[trg_part].Position)
  111. local AccPos = Vector2.new(ePos.x, ePos.y)
  112. local mousePos = Vector2.new(cc.ViewportSize.x / 2, cc.ViewportSize.y / 2) --local mousePos = Vector2.new(mouse.x, mouse.y)
  113. local distance = (AccPos - mousePos).magnitude
  114. if distance < last then
  115. last = distance
  116. nearest = v
  117. end
  118. end
  119. end
  120. end
  121. if nearest ~= nil then
  122. if game.PlaceId == 292439477 then
  123. for i,v in pairs(game.workspace.Players:GetChildren()) do
  124. if v:FindFirstChild(nearest.Name) then
  125. return nearest
  126. end
  127. end
  128. else
  129. return nearest
  130. end
  131. end
  132. end
  133. game:GetService('RunService').Stepped:connect(function()
  134. local nam = getClosestMouse(_G.settings.TargetPart)
  135. if nam ~= nil and nam then
  136. local move, vis = pos(getClosestMouse(_G.settings.TargetPart).Character[_G.settings.TargetPart].Position)
  137. if vis and aimbot then
  138. mousemoverel((move.x - mouse.x) * _G.settings.Smoothness, ((move.y * 0.93) - mouse.y) * _G.settings.Smoothness)
  139. if _G.settings.TriggerBot then
  140. mouse1press()
  141. game:GetService('RunService').Stepped:wait()
  142. mouse1release()
  143. end
  144. end
  145. end
  146. end)
  147. --Just creating esps and stuff
  148. for i,v in pairs(game.Players:GetPlayers()) do
  149. if v ~= game.Players.LocalPlayer then
  150. if v.Character then
  151. esp(v.Character)
  152. end
  153. v.CharacterAdded:connect(function(a)
  154. esp(a)
  155. end)
  156. end
  157. end
  158. function someEspShit(a)
  159. a.CharacterAdded:connect(function(b)
  160. print(b:GetFullName())
  161. esp(b)
  162. end)
  163. end
  164. game.Players.PlayerAdded:connect(someEspShit)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement