Advertisement
DianShadow

Roblox | Bad Business Aimbot & ESP SCRIPT!!!

Aug 25th, 2019
55,344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.71 KB | None | 0 0
  1. -- Created by Dian Shadow https://www.youtube.com/channel/UCRCEpIl517azRFPMNO98wdQ
  2. local LocalPlayer, Characters, ESPList, LocalCharacter = game:GetService('Players').LocalPlayer, workspace.Characters, {}
  3.  
  4. local Leaderboard = LocalPlayer.PlayerGui.LeaderboardGui.Leaderboard
  5. local function GetTeam(Player)
  6. local Name = Player.Name
  7. for i,v in next, Leaderboard.Teams:GetDescendants() do
  8. if v.Name == 'NameLabel' and v.Text == Name then
  9. return v.Parent.Parent.Parent
  10. end
  11. end
  12. end
  13.  
  14. local Camera, Div = workspace.CurrentCamera, Vector2.new(2,2)
  15. local function GetNearestToCenter()
  16. local Center = Camera.ViewportSize / Div
  17. local Character, CharacterDistance, ScreenPosition = nil, 0, nil
  18. -- Created by Peyton @ V3rmillion
  19. for i,v in next, Characters:GetChildren() do
  20. if v.Name ~= LocalPlayer.Name and GetTeam(v) ~= GetTeam(LocalPlayer) and v:FindFirstChild('Health') and v.Health.Value > 0 and v:FindFirstChild('Hitbox') and v.Hitbox:FindFirstChild('Head') then
  21. local Position, OnScreen = Camera:WorldToViewportPoint(v.Hitbox.Head.Position)
  22. if OnScreen then
  23. local Vec2 = Vector2.new(Position.X, Position.Y)
  24. local Distance = (Vec2 - Center).magnitude
  25. if not Character or CharacterDistance > Distance then
  26. Character, CharacterDistance, ScreenPosition = v, Distance, Vec2
  27. end
  28. end
  29. end
  30. end
  31. return ScreenPosition and Center and (ScreenPosition - Center) or nil
  32. end
  33.  
  34. local function NewCircle()
  35. local Circle = Drawing.new('Circle')
  36. Circle.Color = Color3.new(255, 0, 0)
  37. Circle.Filled = true
  38. Circle.Transparency = 0.5
  39. Circle.Visible = true
  40. return Circle
  41. end
  42. -- Created by Peyton @ V3rmillion
  43. local function Add(Character)
  44. if Character == workspace.Characters:FindFirstChild(LocalPlayer.Name) then
  45. LocalCharacter = Character
  46. elseif GetTeam(Character) ~= GetTeam(LocalPlayer) then
  47. ESPList[Character] = NewCircle()
  48. end
  49. end
  50.  
  51. local function Remove(Character)
  52. if ESPList[Character] then
  53. ESPList[Character]:Remove()
  54. ESPList[Character] = nil
  55. end
  56. end
  57.  
  58. local UserInputService, AimEnable = game:GetService('UserInputService'), false
  59. local function Update()
  60. for Character,v in next, ESPList do
  61. if Character and Character.Parent ~= Characters then
  62. Remove(Characters)
  63. elseif Character:FindFirstChild('Hitbox') and Character.Hitbox:FindFirstChild('Head') then
  64. local Position, OnScreen = workspace.CurrentCamera:WorldToViewportPoint(Character.Hitbox.Head.Position)
  65. v.Position = Vector2.new(Position.X, Position.Y)
  66. v.Radius = 700 / Position.Z
  67. v.Visible = OnScreen
  68. end
  69. end
  70.  
  71. if AimEnable and UserInputService.MouseBehavior ~= Enum.MouseBehavior.Default and Characters:FindFirstChild(LocalPlayer.Name) and Characters[LocalPlayer.Name].Health.Value ~= 0 then
  72. local ToMove = GetNearestToCenter()
  73. if ToMove then mousemoverel(ToMove.X, ToMove.Y) end
  74. else
  75. AimEnable = false
  76. end
  77. end
  78. -- Created by Peyton @ V3rmillion
  79. for i,v in next, Characters:GetChildren() do Add(v) end
  80. Characters.ChildAdded:Connect(Add)
  81. Characters.ChildRemoved:Connect(Remove)
  82. game:GetService('RunService').RenderStepped:Connect(Update)
  83. UserInputService.InputBegan:Connect(function(input, gameProcessed) if input.UserInputType == Enum.UserInputType.MouseButton2 then AimEnable = true end end)
  84. UserInputService.InputEnded:Connect(function(input, gameProcessed) if input.UserInputType == Enum.UserInputType.MouseButton2 then AimEnable = false end end)
  85.  
  86. print("Loaded Good Business by Peyton @ V3rmillion")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement