Facebook
From Cobalt Bongo, 5 Years ago, written in Plain Text.
This paste is a reply to Untitled from Ungracious Macaw - view diff
Embed
Download Paste or View Raw
Hits: 397
  1. --Updated aimbot it will now work!
  2. ESP = true --Do you want ESP?
  3. Aimbot = true --Do you want Aimbot?
  4. IgnoreWalls = true --Do you want to shoot through walls?
  5. _G.Legit = true --Do you always want to shoot headshots?
  6. BeepEffect = true --Do you want it to make a sound when someone comes close to you from behind?
  7. BeepSound = 138081500 --What sound do you want to play when someone comes behind you (BeepEffect must be enabled for it to work)
  8. BeepSize = 8 --How large should the red dot be?
  9. BeepVolume = 1 --Max volume for the SoundID(1 is max, 0 is nothing.)
  10. TimeDelay = 6 --If you look at the person it won't beep again until the timedelay is up (BeepEffect must be enabled)
  11. SoundDelay = 2 --Time before a new sound is played. (Useful if many people spawn on the same person so you won't hear 999 beeps)
  12. DetectionTime = 1 --How long should you wait to make sure the person is looking at you to beep?
  13. BehindDetectionTime = 1 --How long should you wait to check if the person is behind you?
  14.  
  15. Sniper = {"INTERVENTION", "REMINGTON 700", "AWS", "L115A3", "MOSIN NAGANT", "OBREZ"}
  16. SpecialSniper = {"BFG 50", "SFG 50"}
  17. WeakSniper = {"MK11", "SKS", "SCAR SSR", "DRAGUNOV SVU", "HENRY 45-70"}
  18. SMG = {"SCAR-H", "AG-3", "M4A1", "G36C", "M4", "L22", "SCAR PDW", "SR-3M", "P90", "AUG A3 PARA", "AK12", "AN-94", "AS VAL", "SCAR-L", "AUG A1", "M16A4", "G36", "M16A3", "AUG A2", "FAMAS", "AK44", "AUG A3", "L85A2", "HONEY BADGER", "AK74", "AKM", "M231"}
  19. WeakSMG = {"MP5K", "UMP45", "MP7", "MAC10", "MP5", "COLT SMG 635", "MP5SD", "MP10", "MP5/10", "KRISS VECTOR"}
  20. ShotGun = {"REMINGTON 870", "KSG 12", "KS-23M", "SERBU SHOTGUN"}
  21. LMG = {"COLT LMG", "M60", "AUG HBAR", "MG36", "L86 LSW", "RPK", "SCAR HAMR", "RPK74"}
  22. Other = {"M9", "GLOCK 17", "M1911", "DEAGLE 44", "GLOCK 18", "M93R", "TEC9", "MP412 REX"}
  23. Melee = {"KNIFE", "MACHETE"}
  24.  
  25. warn("Version: 1.0.0, Welcome To Project Bear's ESP, Report bugs to the Project Bear Discord.")
  26.  
  27.  
  28. local camera = workspace.CurrentCamera
  29. local ScreenX, ScreenY = workspace.CurrentCamera.ViewportSize.X, workspace.CurrentCamera.ViewportSize.Y
  30. local inversePi = 1 / math.pi
  31. _G.FOV = 9
  32. local magic = _G.FOV*inversePi
  33. _G.ignoreFOV = false
  34. local aim_through_list = {nil, nil, nil}
  35. local distance
  36. local ignore
  37. local distance2
  38. Pixels = ScreenX * ScreenY
  39. local mouse = game:GetService("Players").LocalPlayer:GetMouse()
  40. Radius = math.sqrt(Pixels*magic)
  41. local viable
  42. local your_head = game:GetService("Players").LocalPlayer.Character:FindFirstChild("Head")
  43. local ray_start
  44. local vector
  45. _G.ignoreWalls = true
  46. _G.ShootingTeam = false
  47. local enabled = false
  48. local target
  49.  
  50.  
  51. local function ReturnF(player, bone)
  52. if not bone and player.Character:FindFirstChild(bone) then
  53. return {_, false}
  54. end
  55. return camera:WorldToScreenPoint(player.Character[bone].Position)
  56. end
  57. local function checksight(player)
  58. local screen_position, in_fov = ReturnF(player, "Head") -- end my life
  59. if not (in_fov or _G.ignoreFOV) then
  60. return false
  61. else -- bug here with fov checks
  62. if (not _G.ignoreFOV) and (_G.FOV~=-1) then
  63. local distance2 = (Vector2.new(screen_position.X, screen_position.Y) - Vector2.new(mouse.X, mouse.Y)).magnitude
  64. if distance2<=Radius then
  65. return player, screen_position
  66. end
  67. return false
  68. else
  69. return player, screen_position
  70. end
  71. end
  72. end
  73.  
  74.  
  75. local function ViableP()
  76. aim_through_list[1] = game:GetService("Players").LocalPlayer.Character
  77. local distance = 1000
  78. local closest_distance = 1000
  79. local most_viable_player = nil
  80. for i, player_being_checked in pairs(game:GetService("Players"):GetPlayers()) do
  81. local player_or_false, targets_coordinates = checksight(player_being_checked)
  82. if (player_or_false) then
  83. local char = player_being_checked.Character
  84. local target_torso = char and char:FindFirstChild "Torso"
  85. if (camera.Focus.p - camera.CoordinateFrame.p).magnitude <= 1 then
  86. ray_start = your_head.Position + your_head.CFrame.lookVector * 16 + Vector3.new(0, 4, 0)
  87. else
  88. ray_start = your_head.Position + Vector3.new(0, 4, 0)
  89. end
  90. if not targets_coordinates then
  91. distance = (Vector2.new(targets_coordinates.X, targets_coordinates.Y) - Vector2.new(mouse.X, mouse.Y)).magnitude
  92. else
  93. distance = (Vector2.new(targets_coordinates.X, targets_coordinates.Y) - Vector2.new(mouse.X, mouse.Y)).magnitude
  94. end
  95. vector = (target_torso.Position - ray_start)
  96. if char:FindFirstChild("Head") then
  97. if (not targets_coordinates) or (distance <= closest_distance) then
  98. local new_ray = Ray.new(ray_start, vector.unit * 1000) -- "fire" ray and make sure to ignore our own character
  99. local hit, position = workspace:FindPartOnRayWithIgnoreList(new_ray, aim_through_list) -- check if the ray hit anything and if it's a descendant of the target's character
  100. if (hit and hit:isDescendantOf(char)) or _G.ignoreWalls then
  101. if char.HumanoidRootPart:FindFirstChild("ESP") then
  102. if char.HumanoidRootPart.ESP.Frame.BackgroundColor3 == Color3.new(1, 0.666667, 0) or char.HumanoidRootPart.ESP.Frame.BackgroundColor3 == Color3.new(0, 1, 0.498039) then
  103. closest_distance = distance
  104. most_viable_player = player_being_checked
  105. target = player_being_checked
  106. else
  107.         if IgnoreWalls == false then
  108.         most_viable_player = nil
  109. target = nil
  110.         elseif IgnoreWalls == true then
  111.         closest_distance = distance
  112. most_viable_player = player_being_checked
  113. target = player_being_checked
  114.        
  115. end
  116. end
  117. else
  118.  
  119. if IgnoreWalls == false then
  120.         most_viable_player = nil
  121. target = nil
  122.         elseif IgnoreWalls == true then
  123.         closest_distance = distance
  124. most_viable_player = player_being_checked
  125. target = player_being_checked
  126.        
  127. end
  128.  
  129. end
  130. else
  131. most_viable_player = nil
  132. target = nil
  133. end -- hit or ignore walls
  134. end -- meets distance or no priority
  135. end
  136. end
  137. end
  138. return most_viable_player
  139. end
  140.  
  141.  
  142.  
  143.  
  144.  
  145. game:GetService("RunService").Heartbeat:connect(function()
  146.  
  147.  
  148.  
  149.  
  150.  
  151. if Aimbot == true then
  152. ViableP()
  153. workspace.DeadBody:ClearAllChildren()
  154. wep = nil
  155. for i,v in pairs(workspace.Camera:GetChildren()) do
  156.         if v:FindFirstChild("Flame") then
  157.                 wep = v
  158.                 break
  159.         end
  160. end
  161. if wep and target ~= nil then
  162. if target.TeamColor ~= game:GetService("Players").LocalPlayer.TeamColor then
  163. wep.Flame.Size = Vector3.new(1,5,1)
  164. wep.Flame.Anchored = true
  165. if target.Character:FindFirstChild("Head") then
  166. if _G.Legit == false then
  167. wep.Flame.CFrame = target.Character.Head.CFrame*CFrame.new(0,0,1.9) -- this is where the magic is
  168. elseif _G.Legit == true then
  169.         wep = false
  170.         Type = nil
  171.        
  172.         Current = nil
  173.                                 for i,v in pairs(workspace.CurrentCamera:GetChildren()) do
  174.                                         if v.Name ~= "Right Arm" and v.Name ~= "Left Arm" then
  175.                                                 if v:IsA("Model") then
  176.                                                         if v:FindFirstChild("Flame") then
  177.                                                                 Current = v
  178.                                                                 break
  179.                                                         end
  180.                                                 end
  181.                                         end
  182.                                 end                    
  183.        
  184.                         if wep == false then
  185.                                 for i = 1,#LMG do
  186.                                         if Current ~= nil then
  187.                                                 if LMG[i] == Current.Name then
  188.                                                         wep = true
  189.                                                         Type = "LMG"
  190.                                                         break
  191.                                                 end
  192.                                         end
  193.                                 end
  194.                         end    
  195.                        
  196.                         if wep == false then
  197.                                 for i = 1,#SMG do
  198.                                         if Current ~= nil then
  199.                                                 if SMG[i] == Current.Name then
  200.                                                         wep = true
  201.                                                         Type = "SMG"
  202.                                                         break
  203.                                                 end
  204.                                         end
  205.                                 end
  206.                         end    
  207.                        
  208.                         if wep == false then
  209.                                 for i = 1,#WeakSMG do
  210.                                         if Current ~= nil then
  211.                                                 if WeakSMG[i] == Current.Name then
  212.                                                         wep = true
  213.                                                         Type = "WeakSMG"
  214.                                                         break
  215.                                                 end
  216.                                         end
  217.                                 end
  218.                         end    
  219.                        
  220.                         if wep == false then
  221.                                 for i = 1,#Other do
  222.                                         if Current ~= nil then
  223.                                                 if Other[i] == Current.Name then
  224.                                                         wep = true
  225.                                                         Type = "Other"
  226.                                                         break
  227.                                                 end
  228.                                         end
  229.                                 end
  230.                         end    
  231.                        
  232.                         if wep == false then
  233.                                 for i = 1,#ShotGun do
  234.                                         if Current ~= nil then
  235.                                                 if ShotGun[i] == Current.Name then
  236.                                                         wep = true
  237.                                                         Type = "ShotGun"
  238.                                                         break
  239.                                                 end
  240.                                         end
  241.                                 end
  242.                         end    
  243.         if Type == nil then
  244.         random = math.random(1,3)
  245.         if random == 1 then
  246.                 Current.Flame.CFrame = target.Character.Head.CFrame*CFrame.new(0,0,0.1) -- this is where the magic is
  247.         end
  248.         if random >= 2 and random <= 3 then
  249.                 Current.Flame.CFrame = target.Character.Torso.CFrame*CFrame.new(0,0,0.1) -- this is where the magic is
  250.         end
  251.         elseif Type == "LMG" then
  252.         if ((game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position - target.Character.HumanoidRootPart.Position).magnitude) <= 150 then
  253.                 random = math.random(1,6)
  254.         if random == 1 then
  255.                 Current.Flame.CFrame = target.Character.Head.CFrame*CFrame.new(0,0,0.1) -- this is where the magic is
  256.         end
  257.         if random >= 2 and random <= 3 then
  258.                 Current.Flame.CFrame = target.Character.Torso.CFrame*CFrame.new(0,0,0.1) -- this is where the magic is
  259.         end
  260.         if random >= 4 and random <= 6 then
  261.                 Current.Flame.CFrame = CFrame.new(0,0,0)
  262.         end
  263.         else
  264.                 random = math.random(1,10)
  265.         if random == 1 then
  266.                 Current.Flame.CFrame = target.Character.Head.CFrame*CFrame.new(0,0,0.1) -- this is where the magic is
  267.         end
  268.         if random >= 2 and random <= 3 then
  269.                 Current.Flame.CFrame = target.Character.Torso.CFrame*CFrame.new(0,0,0.1) -- this is where the magic is
  270.         end
  271.         if random >= 4 and random <= 10 then
  272.                 Current.Flame.CFrame = CFrame.new(0,0,0)
  273.         end
  274.        
  275.         end
  276.         elseif Type == "ShotGun" then
  277.                 random = math.random(1,5)
  278.         if random == 1 then
  279.                 Current.Flame.CFrame = target.Character.Head.CFrame*CFrame.new(0,0,0.1) -- this is where the magic is
  280.         end
  281.         if random >= 2 and random <= 3 then
  282.                 Current.Flame.CFrame = target.Character.Torso.CFrame*CFrame.new(0,0,0.1) -- this is where the magic is
  283.         end
  284.         if random >= 4 and random <= 5 then
  285.                 Current.Flame.CFrame = CFrame.new(0,0,0)
  286.         end
  287.         elseif Type == "WeakSMG" or Type == "SMG" then
  288.                 if ((game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position - target.Character.HumanoidRootPart.Position).magnitude) <= 125 then
  289.                 random = math.random(1,6)
  290.         if random == 1 then
  291.                 Current.Flame.CFrame = target.Character.Head.CFrame*CFrame.new(0,0,0.1) -- this is where the magic is
  292.         end
  293.         if random >= 2 and random <= 3 then
  294.                 Current.Flame.CFrame = target.Character.Torso.CFrame*CFrame.new(0,0,0.1) -- this is where the magic is
  295.         end
  296.         if random >= 4 and random <= 6 then
  297.                 Current.Flame.CFrame = CFrame.new(0,0,0)
  298.         end
  299.                 else
  300.                 random = math.random(1,8)
  301.         if random == 1 then
  302.                 Current.Flame.CFrame = target.Character.Head.CFrame*CFrame.new(0,0,0.1) -- this is where the magic is
  303.         end
  304.         if random >= 2 and random <= 3 then
  305.                 Current.Flame.CFrame = target.Character.Torso.CFrame*CFrame.new(0,0,0.1) -- this is where the magic is
  306.         end
  307.         if random >= 4 and random <= 8 then
  308.                 Current.Flame.CFrame = CFrame.new(0,0,0)
  309.         end
  310.                
  311.         end
  312.         elseif Type == "Other" then
  313.                 random = math.random(1,6)
  314.         if random == 1 then
  315.                 Current.Flame.CFrame = target.Character.Head.CFrame*CFrame.new(0,0,0.1) -- this is where the magic is
  316.         end
  317.         if random >= 2 and random <= 4 then
  318.                 Current.Flame.CFrame = target.Character.Torso.CFrame*CFrame.new(0,0,0.1) -- this is where the magic is
  319.         end
  320.         if random >= 5 and random <= 6 then
  321.                 Current.Flame.CFrame = CFrame.new(0,0,0)
  322.         end
  323.         end
  324. end
  325. end
  326. end
  327. end
  328. end
  329.  
  330.  
  331.  
  332.  
  333.  
  334. if ESP == true then
  335. for i,v in pairs(game:GetService("Players"):GetChildren()) do
  336. pass = false
  337. if workspace:FindFirstChild(v.Name) then
  338. if v.Team == game:GetService("Players").LocalPlayer.Team then
  339. if v.Character:FindFirstChild("HumanoidRootPart") then
  340. if v.Character.HumanoidRootPart:FindFirstChild("ESP") then
  341. v.Character.HumanoidRootPart.ESP:Destroy()
  342. end
  343. end
  344. end
  345. if v.Team ~= game:GetService("Players").LocalPlayer.Team then
  346. if v.Character:FindFirstChild("HumanoidRootPart") then
  347. for i,v in pairs(v.Character:GetChildren()) do
  348. if v:IsA("Model") then
  349. pass = true
  350. break
  351. end
  352. end
  353.  
  354. shirt = nil
  355. passer = false
  356. for i,v in pairs(v.Character:GetChildren()) do
  357.         if v:IsA("Shirt") then
  358.                 shirt = v
  359.                 break
  360.         end
  361. end
  362.  
  363. for i,v in pairs(game:GetService("Players").LocalPlayer.Character:GetChildren()) do
  364.         if v:IsA("Shirt") then
  365.                 if shirt ~= nil then
  366.                 if v.Name ~= shirt.Name then
  367.                 passer = true
  368.                 break
  369.                 end
  370.                 end
  371.         end
  372. end
  373.  
  374. if passer == true then
  375. if v.Character:FindFirstChild("HumanoidRootPart") then
  376. if v.Character.HumanoidRootPart:FindFirstChild("ESP") then
  377.                
  378.                 v.Character.HumanoidRootPart.ESP.TextLabel.Text = v.Name.." Distance: "..math.floor(((game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position - v.Character.HumanoidRootPart.Position).magnitude))
  379.  
  380.                 hitting = false
  381.  
  382.  
  383.                 local ray = Ray.new(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame.p, (v.Character.HumanoidRootPart.CFrame.p - game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame.p).unit * 2000)
  384.                 local part, position = workspace:FindPartOnRayWithIgnoreList(ray, {game:GetService("Players").LocalPlayer.Character, workspace.CurrentCamera, workspace.Ignore}, false, true)
  385.                 if part then
  386.                         if part.Parent == v.Character then
  387.                                 hitting = true
  388.                         end
  389.                 end                                    
  390.                                         if hitting == false then
  391.                                         elseif hitting == true then
  392.                                                 v.Character.HumanoidRootPart.ESP.Frame.BackgroundColor3 = Color3.new(0, 1, 0.498039)
  393.                                         end
  394.                
  395.                 if hitting == false then
  396.                 local ray = Ray.new(game:GetService("Players").LocalPlayer.Character.Head.CFrame.p, (v.Character.Head.CFrame.p - game:GetService("Players").LocalPlayer.Character.Head.CFrame.p).unit * 2000)
  397.                 local part, position = workspace:FindPartOnRayWithIgnoreList(ray, {game:GetService("Players").LocalPlayer.Character, workspace.CurrentCamera, workspace.Ignore}, false, true)
  398.                 if part then
  399.                         if part.Parent == v.Character then
  400.                                 hitting = true
  401.                         end
  402.                 end                                    
  403.                                         if hitting == false then
  404.                                                 v.Character.HumanoidRootPart.ESP.Frame.BackgroundColor3 = Color3.new(1, 0, 0)
  405.                                         elseif hitting == true then
  406.                                                 v.Character.HumanoidRootPart.ESP.Frame.BackgroundColor3 = Color3.new(0, 1, 0.498039)
  407.                                         end
  408.                                        
  409.                         if hitting == false then
  410.                                         elseif hitting == true then
  411.                                                 v.Character.HumanoidRootPart.ESP.Frame.BackgroundColor3 = Color3.new(0, 1, 0.498039)
  412.                         end
  413.                        
  414.                        
  415.        
  416.        
  417.        
  418.        
  419.        
  420.        
  421.        
  422.        
  423.        
  424.                         if hitting == false then
  425.                 local ray = Ray.new(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame.p, (v.Character.HumanoidRootPart.CFrame.p - game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame.p).unit * 2000)
  426.                 local part, position = workspace:FindPartOnRayWithIgnoreList(ray, {game:GetService("Players").LocalPlayer.Character, workspace.CurrentCamera, workspace.Ignore}, false, true)
  427.                 if part then
  428.                         if part:IsA("BasePart") then
  429.                                
  430.                                 CurrentGun = nil
  431.                                 for i,v in pairs(workspace.CurrentCamera:GetChildren()) do
  432.                                         if v.Name ~= "Right Arm" and v.Name ~= "Left Arm" then
  433.                                                 if v:IsA("Model") then
  434.                                                         if v:FindFirstChild("Flame") then
  435.                                                                 CurrentGun = v
  436.                                                                 break
  437.                                                         end
  438.                                                 end
  439.                                         end
  440.                                 end                            
  441.                                
  442.                                 found = false                          
  443.                                
  444.                                 if found == false then
  445.                                 for i = 1,#Sniper do
  446.                                         if CurrentGun ~= nil then
  447.                                                 if Sniper[i] == CurrentGun.Name then
  448.                                                         found = true
  449.                                                         Min = 2.75
  450.                                                         Max = 3
  451.                                                         break
  452.                                                 end
  453.                                         end
  454.                                 end
  455.                                 end
  456.                                
  457.                                 if found == false then
  458.                                 for i = 1,#SpecialSniper do
  459.                                         if CurrentGun ~= nil then
  460.                                                 if SpecialSniper[i] == CurrentGun.Name then
  461.                                                         found = true
  462.                                                         Min = 3.25
  463.                                                         Max = 3.5
  464.                                                         break
  465.                                                 end
  466.                                         end
  467.                                 end
  468.                                 end
  469.                                
  470.                                 if found == false then
  471.                                 for i = 1,#WeakSniper do
  472.                                         if CurrentGun ~= nil then
  473.                                                 if WeakSniper[i] == CurrentGun.Name then
  474.                                                         found = true
  475.                                                         Min = 2.75
  476.                                                         Max = 3
  477.                                                         break
  478.                                                 end
  479.                                         end
  480.                                 end
  481.                                 end
  482.                                
  483.                                 if found == false then
  484.                                 for i = 1,#WeakSMG do
  485.                                         if CurrentGun ~= nil then
  486.                                                 if WeakSMG[i] == CurrentGun.Name then
  487.                                                         found = true
  488.                                                         Min = 2.25
  489.                                                         Max = 3
  490.                                                         break
  491.                                                 end
  492.                                         end
  493.                                 end
  494.                                 end
  495.                                
  496.                                 if found == false then
  497.                                 for i = 1,#SMG do
  498.                                         if CurrentGun ~= nil then
  499.                                                 if SMG[i] == CurrentGun.Name then
  500.                                                         found = true
  501.                                                         Min = 2.5
  502.                                                         Max = 3
  503.                                                         break
  504.                                                 end
  505.                                         end
  506.                                 end
  507.                                 end
  508.                                
  509.                                 if found == false then
  510.                                 for i = 1,#ShotGun do
  511.                                         if CurrentGun ~= nil then
  512.                                                 if ShotGun[i] == CurrentGun.Name then
  513.                                                         found = true
  514.                                                         Min = 2.75
  515.                                                         Max = 3
  516.                                                         break
  517.                                                 end
  518.                                         end
  519.                                 end
  520.                                 end
  521.                                
  522.                                 if found == false then
  523.                                 for i = 1,#LMG do
  524.                                         if CurrentGun ~= nil then
  525.                                                 if LMG[i] == CurrentGun.Name then
  526.                                                         found = true
  527.                                                         Min = 2.5
  528.                                                         Max = 3
  529.                                                         break
  530.                                                 end
  531.                                         end
  532.                                 end
  533.                                 end
  534.                                
  535.                                 if found == false then
  536.                                 for i = 1,#Other do
  537.                                         if CurrentGun ~= nil then
  538.                                                 if Other[i] == CurrentGun.Name then
  539.                                                         found = true
  540.                                                         Min = 0
  541.                                                         Max = 0
  542.                                                         break
  543.                                                 end
  544.                                         end
  545.                                 end
  546.                                 end
  547.                                
  548.                                 if found == false then
  549.                                 for i = 1,#Melee do
  550.                                         if CurrentGun ~= nil then
  551.                                                 if Melee[i] == CurrentGun.Name then
  552.                                                         found = true
  553.                                                         Min = 0
  554.                                                         Max = 0
  555.                                                         break
  556.                                                 end
  557.                                         end
  558.                                 end
  559.                                 end
  560.                                
  561.                                 if found == false then
  562.                                         Min = 0
  563.                                         Max = 0
  564.                                 end
  565.                                
  566.                                 if part.Parent.Name == "Map" then
  567.                                 if part.Size.X <= Min and part.Size.Z <= Min and part.Size.Y >= Max then
  568.                                 hitting = true
  569.                                 parter = part
  570.                                 elseif part.Size.X <= Min and part.Size.Z >= Max and part.Size.Y >= Max then
  571.                                         hitting = true
  572.                                 parter = part
  573.                                 elseif part.Size.X <= Min and part.Size.Z >= Max and part.Size.Y <= Min then
  574.                                         hitting = true
  575.                                 parter = part
  576.                                 elseif part.Size.X <= Min and part.Size.Z <= Min and part.Size.Y <= Min then
  577.                                         hitting = true
  578.                                 parter = part
  579.                                 elseif part.Size.X <= Min and part.Size.Z >= Min and part.Size.Y <= Min then
  580.                                         hitting = true
  581.                                 parter = part
  582.                                 elseif part.Size.X >= Max and part.Size.Z <= Min and part.Size.Y <= Min then
  583.                                         hitting = true
  584.                                 parter = part
  585.                                 elseif part.Size.X >= Max and part.Size.Z >= Max and part.Size.Y <= Min-1 then
  586.                                         hitting = true
  587.                                 parter = part
  588.                                 elseif part.Size.X <= Min and part.Size.Z <= Min and part.Size.Y <= Max then
  589.                                         hitting = true
  590.                                 parter = part
  591.                                 elseif part.Size.X <= Min and part.Size.Z <= Min and part.Size.Y >= Max then
  592.                                         hitting = true
  593.                                 parter = part
  594.                                 elseif part.Size.X <= Min or part.Size.Z <= Min or part.Size.Z <= Min then
  595.                                         hitting = true
  596.                                 parter = part
  597.                                 end
  598.                                 end
  599.                         end
  600.                 end                                    
  601.                                         if hitting == true then
  602.                                                                 hitting = false
  603.                                                                 part = parter
  604.                                                                 list = {}
  605.                                                                 pos1 = part.Position - (part.Size/2) - Vector3.new(0.01,0.01,0.01)
  606.                                                                 pos2 = part.Position + (part.Size/2) + Vector3.new(0.01,0.01,0.01)
  607.                                                                 Reg = Region3.new(pos1, pos2)
  608.                                                                 TouchingParts = game.Workspace:FindPartsInRegion3(Reg)
  609.                                                                 o = 1
  610.                                                                 if TouchingParts ~= nil then
  611.                                                                 for i,v in pairs(TouchingParts) do
  612.                                                                 if v ~= parter then
  613.                                                                        
  614.                                                                        
  615.                                                                         part = v
  616.                                                                         if part.Parent.Name == "Map" then
  617.                                 if part.Size.X <= Min and part.Size.Z <= Min and part.Size.Y >= Max then
  618.                                 hitting = true
  619.                                 parter = part
  620.                                 elseif part.Size.X <= Min and part.Size.Z >= Max and part.Size.Y >= Max then
  621.                                         hitting = true
  622.                                 parter = part
  623.                                 elseif part.Size.X <= Min and part.Size.Z >= Max and part.Size.Y <= Min then
  624.                                         hitting = true
  625.                                 parter = part
  626.                                 elseif part.Size.X <= Min and part.Size.Z <= Min and part.Size.Y <= Min then
  627.                                         hitting = true
  628.                                 parter = part
  629.                                 elseif part.Size.X <= Min and part.Size.Z >= Min and part.Size.Y <= Min then
  630.                                         hitting = true
  631.                                 parter = part
  632.                                 elseif part.Size.X >= Max and part.Size.Z <= Min and part.Size.Y <= Min then
  633.                                         hitting = true
  634.                                 parter = part
  635.                                 elseif part.Size.X >= Max and part.Size.Z >= Max and part.Size.Y <= Min-1 then
  636.                                         hitting = true
  637.                                 parter = part
  638.                                 elseif part.Size.X <= Min and part.Size.Z <= Min and part.Size.Y <= Max then
  639.                                         hitting = true
  640.                                 parter = part
  641.                                 elseif part.Size.X <= Min and part.Size.Z <= Min and part.Size.Y >= Max then
  642.                                         hitting = true
  643.                                 parter = part
  644.                                 elseif part.Size.X <= Min or part.Size.Z <= Min or part.Size.Z <= Min then
  645.                                         hitting = true
  646.                                 parter = part
  647.                                 end            
  648.                                 end                                                    
  649.                                                                        
  650.                                                                        
  651.                                                                         if hitting == true then
  652.                                                                         table.insert(list, o, v)
  653.                                                                         o = o + 1
  654.                                                                         end
  655.                                                                 end
  656.                                                                 end    
  657.                                                                 end
  658.                                                                
  659.                                                                 hitting = false
  660.                                                                
  661.                                                                 part = parter
  662.                                                                
  663.                                                                 pos1 = part.Position + (part.Size/2) + Vector3.new(0.01,0.01,0.01)
  664.                                                                 pos2 = part.Position - (part.Size/2) - Vector3.new(0.01,0.01,0.01)                                                                                     
  665.                                                                
  666.                                                                 local ray = Ray.new(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame.p, (v.Character.HumanoidRootPart.CFrame.p - game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame.p).unit * 2000)
  667.                                                                 local part, position = workspace:FindPartOnRayWithIgnoreList(ray, {game:GetService("Players").LocalPlayer.Character, workspace.CurrentCamera, workspace.Ignore, parter, unpack(list)}, false, true)
  668.                                                                 if part then
  669.                                                                         if part.Parent == v.Character then
  670.                                                                                 hitting = true
  671.                                                                         end
  672.                                                                 end                                    
  673.                                                                                         if hitting == false then
  674.                                                                                                 v.Character.HumanoidRootPart.ESP.Frame.BackgroundColor3 = Color3.new(1, 0, 0)
  675.                                                                                         elseif hitting == true then
  676.                                                                                                 if ((parter.Position - v.Character.HumanoidRootPart.Position).magnitude) <= 40 then
  677.                                                                                                         v.Character.HumanoidRootPart.ESP.Frame.BackgroundColor3 = Color3.new(1, 0.666667, 0)
  678.                                                                                                         else
  679.                                                                                                 v.Character.HumanoidRootPart.ESP.Frame.BackgroundColor3 = Color3.new(1, 0, 0)
  680.                                                                                                 end
  681.                                                                                         end                                    
  682.                                                
  683.                                         elseif hitting == false then
  684.                                                 v.Character.HumanoidRootPart.ESP.Frame.BackgroundColor3 = Color3.new(1, 0, 0)
  685.                                         end
  686.                                         end                                    
  687.        
  688.        
  689.        
  690.        
  691.        
  692.        
  693.        
  694.                                
  695.                        
  696.                
  697.                 if hitting == false then
  698.                 local ray = Ray.new(game:GetService("Players").LocalPlayer.Character.Head.CFrame.p, (v.Character.Head.CFrame.p - game:GetService("Players").LocalPlayer.Character.Head.CFrame.p).unit * 2000)
  699.                 local part, position = workspace:FindPartOnRayWithIgnoreList(ray, {game:GetService("Players").LocalPlayer.Character, workspace.CurrentCamera, workspace.Ignore}, false, true)
  700.                 if part then
  701.                         if part:IsA("BasePart") then
  702.  
  703.                                 CurrentGun = nil
  704.                                 for i,v in pairs(workspace.CurrentCamera:GetChildren()) do
  705.                                         if v.Name ~= "Right Arm" and v.Name ~= "Left Arm" then
  706.                                                 if v:IsA("Model") then
  707.                                                         if v:FindFirstChild("Flame") then
  708.                                                                 CurrentGun = v
  709.                                                                 break
  710.                                                         end
  711.                                                 end
  712.                                         end
  713.                                 end                            
  714.                                
  715.                                 found = false                          
  716.                                
  717.                                 if found == false then
  718.                                 for i = 1,#Sniper do
  719.                                         if CurrentGun ~= nil then
  720.                                                 if Sniper[i] == CurrentGun.Name then
  721.                                                         found = true
  722.                                                         Min = 2.75
  723.                                                         Max = 3
  724.                                                         break
  725.                                                 end
  726.                                         end
  727.                                 end
  728.                                 end
  729.                                
  730.                                 if found == false then
  731.                                 for i = 1,#SpecialSniper do
  732.                                         if CurrentGun ~= nil then
  733.                                                 if SpecialSniper[i] == CurrentGun.Name then
  734.                                                         found = true
  735.                                                         Min = 3.25
  736.                                                         Max = 3.5
  737.                                                         break
  738.                                                 end
  739.                                         end
  740.                                 end
  741.                                 end
  742.                                
  743.                                 if found == false then
  744.                                 for i = 1,#WeakSniper do
  745.                                         if CurrentGun ~= nil then
  746.                                                 if WeakSniper[i] == CurrentGun.Name then
  747.                                                         found = true
  748.                                                         Min = 2.75
  749.                                                         Max = 3
  750.                                                         break
  751.                                                 end
  752.                                         end
  753.                                 end
  754.                                 end
  755.                                
  756.                                 if found == false then
  757.                                 for i = 1,#WeakSMG do
  758.                                         if CurrentGun ~= nil then
  759.                                                 if WeakSMG[i] == CurrentGun.Name then
  760.                                                         found = true
  761.                                                         Min = 2.25
  762.                                                         Max = 3
  763.                                                         break
  764.                                                 end
  765.                                         end
  766.                                 end
  767.                                 end
  768.                                
  769.                                 if found == false then
  770.                                 for i = 1,#SMG do
  771.                                         if CurrentGun ~= nil then
  772.                                                 if SMG[i] == CurrentGun.Name then
  773.                                                         found = true
  774.                                                         Min = 2.5
  775.                                                         Max = 3
  776.                                                         break
  777.                                                 end
  778.                                         end
  779.                                 end
  780.                                 end
  781.                                
  782.                                 if found == false then
  783.                                 for i = 1,#ShotGun do
  784.                                         if CurrentGun ~= nil then
  785.                                                 if ShotGun[i] == CurrentGun.Name then
  786.                                                         found = true
  787.                                                         Min = 2.75
  788.                                                         Max = 3
  789.                                                         break
  790.                                                 end
  791.                                         end
  792.                                 end
  793.                                 end
  794.                                
  795.                                 if found == false then
  796.                                 for i = 1,#LMG do
  797.                                         if CurrentGun ~= nil then
  798.                                                 if LMG[i] == CurrentGun.Name then
  799.                                                         found = true
  800.                                                         Min = 2.5
  801.                                                         Max = 3
  802.                                                         break
  803.                                                 end
  804.                                         end
  805.                                 end
  806.                                 end
  807.                                
  808.                                 if found == false then
  809.                                 for i = 1,#Other do
  810.                                         if CurrentGun ~= nil then
  811.                                                 if Other[i] == CurrentGun.Name then
  812.                                                         found = true
  813.                                                         Min = 0
  814.                                                         Max = 0
  815.                                                         break
  816.                                                 end
  817.                                         end
  818.                                 end
  819.                                 end
  820.                                
  821.                                 if found == false then
  822.                                 for i = 1,#Melee do
  823.                                         if CurrentGun ~= nil then
  824.                                                 if Melee[i] == CurrentGun.Name then
  825.                                                         found = true
  826.                                                         Min = 0
  827.                                                         Max = 0
  828.                                                         break
  829.                                                 end
  830.                                         end
  831.                                 end
  832.                                 end
  833.                                
  834.                                 if found == false then
  835.                                         Min = 0
  836.                                         Max = 0
  837.                                 end
  838.                                
  839.                                 if part.Parent.Name == "Map" then
  840.                                 if part.Size.X <= Min and part.Size.Z <= Min and part.Size.Y >= Max then
  841.                                 hitting = true
  842.                                 parter = part
  843.                                 elseif part.Size.X <= Min and part.Size.Z >= Max and part.Size.Y >= Max then
  844.                                         hitting = true
  845.                                 parter = part
  846.                                 elseif part.Size.X <= Min and part.Size.Z >= Max and part.Size.Y <= Min then
  847.                                         hitting = true
  848.                                 parter = part
  849.                                 elseif part.Size.X <= Min and part.Size.Z <= Min and part.Size.Y <= Min then
  850.                                         hitting = true
  851.                                 parter = part
  852.                                 elseif part.Size.X <= Min and part.Size.Z >= Min and part.Size.Y <= Min then
  853.                                         hitting = true
  854.                                 parter = part
  855.                                 elseif part.Size.X >= Max and part.Size.Z <= Min and part.Size.Y <= Min then
  856.                                         hitting = true
  857.                                 parter = part
  858.                                 elseif part.Size.X >= Max and part.Size.Z >= Max and part.Size.Y <= Min-1 then
  859.                                         hitting = true
  860.                                 parter = part
  861.                                 elseif part.Size.X <= Min and part.Size.Z <= Min and part.Size.Y <= Max then
  862.                                         hitting = true
  863.                                 parter = part
  864.                                 elseif part.Size.X <= Min and part.Size.Z <= Min and part.Size.Y >= Max then
  865.                                         hitting = true
  866.                                 parter = part
  867.                                 elseif part.Size.X <= Min or part.Size.Z <= Min or part.Size.Z <= Min then
  868.                                         hitting = true
  869.                                 parter = part
  870.                                 end
  871.                                 end
  872.                         end
  873.                 end                                    
  874.                                         if hitting == true then
  875.                                                                 hitting = false
  876.                                                                 part = parter
  877.                                                                 list = {}
  878.                                                                 pos1 = part.Position - (part.Size/2) - Vector3.new(0.01,0.01,0.01)
  879.                                                                 pos2 = part.Position + (part.Size/2) + Vector3.new(0.01,0.01,0.01)
  880.                                                                 Reg = Region3.new(pos1, pos2)
  881.                                                                 TouchingParts = game.Workspace:FindPartsInRegion3(Reg)
  882.                                                                 o = 1
  883.                                                                 if TouchingParts ~= nil then
  884.                                                                 for i,v in pairs(TouchingParts) do
  885.                                                                 if v ~= parter then
  886.                                                                        
  887.                                                                        
  888.                                                                         part = v
  889.                                                                         if part.Parent.Name == "Map" then
  890.                                 if part.Size.X <= Min and part.Size.Z <= Min and part.Size.Y >= Max then
  891.                                 hitting = true
  892.                                 parter = part
  893.                                 elseif part.Size.X <= Min and part.Size.Z >= Max and part.Size.Y >= Max then
  894.                                         hitting = true
  895.                                 parter = part
  896.                                 elseif part.Size.X <= Min and part.Size.Z >= Max and part.Size.Y <= Min then
  897.                                         hitting = true
  898.                                 parter = part
  899.                                 elseif part.Size.X <= Min and part.Size.Z <= Min and part.Size.Y <= Min then
  900.                                         hitting = true
  901.                                 parter = part
  902.                                 elseif part.Size.X <= Min and part.Size.Z >= Min and part.Size.Y <= Min then
  903.                                         hitting = true
  904.                                 parter = part
  905.                                 elseif part.Size.X >= Max and part.Size.Z <= Min and part.Size.Y <= Min then
  906.                                         hitting = true
  907.                                 parter = part
  908.                                 elseif part.Size.X >= Max and part.Size.Z >= Max and part.Size.Y <= Min-1 then
  909.                                         hitting = true
  910.                                 parter = part
  911.                                 elseif part.Size.X <= Min and part.Size.Z <= Min and part.Size.Y <= Max then
  912.                                         hitting = true
  913.                                 parter = part
  914.                                 elseif part.Size.X <= Min and part.Size.Z <= Min and part.Size.Y >= Max then
  915.                                         hitting = true
  916.                                 parter = part
  917.                                 elseif part.Size.X <= Min or part.Size.Z <= Min or part.Size.Z <= Min then
  918.                                         hitting = true
  919.                                 parter = part
  920.                                 end    
  921.                                 end                                                            
  922.                                                                        
  923.                                                                        
  924.                                                                         if hitting == true then
  925.                                                                         table.insert(list, o, v)
  926.                                                                         o = o + 1
  927.                                                                         end
  928.                                                                 end
  929.                                                                 end    
  930.                                                                 end
  931.                                                                
  932.                                                                 hitting = false
  933.                                                                
  934.                                                                 part = parter
  935.                                                                
  936.                                                                 pos1 = part.Position + (part.Size/2) + Vector3.new(0.01,0.01,0.01)
  937.                                                                 pos2 = part.Position - (part.Size/2) - Vector3.new(0.01,0.01,0.01)                                             
  938.                                                                
  939.                                                                 local ray = Ray.new(game:GetService("Players").LocalPlayer.Character.Head.CFrame.p, (v.Character.Head.CFrame.p - game:GetService("Players").LocalPlayer.Character.Head.CFrame.p).unit * 2000)
  940.                                                                 local part, position = workspace:FindPartOnRayWithIgnoreList(ray, {game:GetService("Players").LocalPlayer.Character, workspace.CurrentCamera, workspace.Ignore, parter, unpack(list)}, false, true)
  941.                                                                 if part then
  942.                                                                         if part.Parent == v.Character then
  943.                                                                                 hitting = true
  944.                                                                         end
  945.                                                                 end                                    
  946.                                                                                         if hitting == false then
  947.                                                                                                 v.Character.HumanoidRootPart.ESP.Frame.BackgroundColor3 = Color3.new(1, 0, 0)
  948.                                                                                         elseif hitting == true then
  949.                                                                                                 if ((parter.Position - v.Character.HumanoidRootPart.Position).magnitude) <= 40 then
  950.                                                                                                         v.Character.HumanoidRootPart.ESP.Frame.BackgroundColor3 = Color3.new(1, 0.666667, 0)
  951.                                                                                                         else
  952.                                                                                                 v.Character.HumanoidRootPart.ESP.Frame.BackgroundColor3 = Color3.new(1, 0, 0)
  953.                                                                                                 end
  954.                                                                                         end                                            
  955.                                                
  956.                                         elseif hitting == false then
  957.                                                 v.Character.HumanoidRootPart.ESP.Frame.BackgroundColor3 = Color3.new(1, 0, 0)
  958.                                         end
  959.                                         end                            
  960.                                         end
  961.                
  962.        
  963.  
  964. elseif pass == true then
  965. local ESP = Instance.new("BillboardGui",v.Character.HumanoidRootPart)
  966. ESP.Name = "ESP"
  967. ESP.Size = UDim2.new(6, 0, 8, 0)
  968. ESP.StudsOffset = Vector3.new(0, 0.75, 0)
  969. ESP.AlwaysOnTop = true
  970. local Frame = Instance.new("Frame",ESP)
  971. Frame.ZIndex = 1000
  972. Frame.Size = UDim2.new(0.6, 0, 0.8, 0)
  973. Frame.Position = UDim2.new(0.2, 0, 0.3, 0)
  974. Frame.BorderSizePixel = 3
  975. Frame.BackgroundTransparency = 0.3
  976. Frame.BackgroundColor3 = Color3.new(1, 0.666667, 0)
  977. Label = Instance.new("TextLabel", ESP)
  978. Label.Position = UDim2.new(0, 0, -0.1, 0)
  979. Label.Size = UDim2.new(1, 0, 0.3, 0)
  980. Label.Font = "SourceSansLight"
  981. Label.TextColor3 = Color3.new(1,1,1)
  982. Label.TextStrokeColor3 = Color3.new(0,0,0)
  983. Label.TextStrokeTransparency = 0
  984. Label.BackgroundColor3 = Color3.new(1, 1, 1)
  985. Label.TextScaled = true
  986. Label.Text = v.Name.." Distance: "..math.floor(((game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position - v.Character.HumanoidRootPart.Position).magnitude))
  987. Label.BackgroundTransparency = 1
  988. end
  989. end
  990. end
  991. end
  992. end
  993. end
  994. end
  995. end
  996. end)