SHARE
TWEET

swqdgasd

HairyW0ng Jul 17th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local function CreateInstance(cls,props)
  2. local inst = Instance.new(cls)
  3. for i,v in pairs(props) do
  4.     inst[i] = v
  5. end
  6. return inst
  7. end
  8.    
  9.    
  10. -- GUI Properties
  11.  
  12. local ScreenGui = CreateInstance('ScreenGui',{DisplayOrder=0,Enabled=true,ResetOnSpawn=true,Name='ScreenGui', Parent=game.CoreGui})
  13. local Frame = CreateInstance('Frame',{Style=Enum.FrameStyle.RobloxRound,Active=false,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(1, 1, 1),BackgroundTransparency=0,BorderColor3=Color3.new(0.105882, 0.164706, 0.207843),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.0440165065, 0, 0.228893057, 0),Rotation=0,Selectable=false,Size=UDim2.new(0.163823947, 0, 0.433302015, 0),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=true,ZIndex=1,Name = 'Frame',Parent = ScreenGui})
  14. local tit = CreateInstance('TextLabel',{Font=Enum.Font.SourceSans,FontSize=Enum.FontSize.Size14,Text='CBRO FUCKER',TextColor3=Color3.new(0, 0, 0),TextScaled=true,TextSize=14,TextStrokeColor3=Color3.new(1, 1, 1),TextStrokeTransparency=0,TextTransparency=0,TextWrapped=true,TextXAlignment=Enum.TextXAlignment.Center,TextYAlignment=Enum.TextYAlignment.Center,Active=false,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(1, 1, 1),BackgroundTransparency=1,BorderColor3=Color3.new(0.105882, 0.164706, 0.207843),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.059902817, 0, -0.00422154181, 0),Rotation=0,Selectable=false,Size=UDim2.new(0.894231141, 0, 0.140872791, 0),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=true,ZIndex=1,Name='tit',Parent = Frame})
  15. local aim = CreateInstance('TextButton',{Font=Enum.Font.SourceSans,FontSize=Enum.FontSize.Size32,Text='Aimbot',TextColor3=Color3.new(0, 0, 0),TextScaled=true,TextSize=29,TextStrokeColor3=Color3.new(1, 0, 0),TextStrokeTransparency=0,TextTransparency=0,TextWrapped=true,TextXAlignment=Enum.TextXAlignment.Center,TextYAlignment=Enum.TextYAlignment.Center,AutoButtonColor=true,Modal=false,Selected=false,Style=Enum.ButtonStyle.RobloxRoundButton,Active=true,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(1, 1, 1),BackgroundTransparency=0,BorderColor3=Color3.new(0.105882, 0.164706, 0.207843),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.0519183464, 0, 0.139057815, 0),Rotation=0,Selectable=true,Size=UDim2.new(0.828904986, 0, 0.350968957, 0),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=true,ZIndex=1,Name='aim',Parent = Frame})
  16. local esp = CreateInstance('TextButton',{Font=Enum.Font.SourceSans,FontSize=Enum.FontSize.Size48,Text='ESP',TextColor3=Color3.new(0, 0, 0),TextScaled=false,TextSize=40,TextStrokeColor3=Color3.new(1, 0, 0),TextStrokeTransparency=0,TextTransparency=0,TextWrapped=true,TextXAlignment=Enum.TextXAlignment.Center,TextYAlignment=Enum.TextYAlignment.Center,AutoButtonColor=true,Modal=false,Selected=false,Style=Enum.ButtonStyle.RobloxRoundButton,Active=true,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(1, 1, 1),BackgroundTransparency=0,BorderColor3=Color3.new(0.105882, 0.164706, 0.207843),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.0569307506, 0, 0.490196466, 0),Rotation=0,Selectable=true,Size=UDim2.new(0.828905046, 0, 0.388759494, 0),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=true,ZIndex=1,Name='esp',Parent = Frame})
  17. local tit = CreateInstance('TextLabel',{Font=Enum.Font.SourceSans,FontSize=Enum.FontSize.Size14,Text='Credits to the owners of the script.',TextColor3=Color3.new(0, 0, 0),TextScaled=true,TextSize=14,TextStrokeColor3=Color3.new(1, 1, 1),TextStrokeTransparency=0,TextTransparency=0,TextWrapped=true,TextXAlignment=Enum.TextXAlignment.Center,TextYAlignment=Enum.TextYAlignment.Center,Active=false,AnchorPoint=Vector2.new(0, 0),BackgroundColor3=Color3.new(1, 1, 1),BackgroundTransparency=1,BorderColor3=Color3.new(0.105882, 0.164706, 0.207843),BorderSizePixel=1,ClipsDescendants=false,Draggable=false,Position=UDim2.new(0.0263175964, 0, 0.879086673, 0),Rotation=0,Selectable=false,Size=UDim2.new(0.894231141, 0, 0.140872791, 0),SizeConstraint=Enum.SizeConstraint.RelativeXY,Visible=true,ZIndex=1,Name='tit',Parent = Frame})
  18.  
  19. -- SCRIPTS
  20.  
  21. Frame.Active = true
  22. Frame.Draggable = true
  23.  
  24.  
  25. -- ESP
  26.  
  27.  
  28. esp.MouseButton1Click:Connect(function()
  29.     -- -----------------------------------
  30. --  ___      _   _   _              --
  31. -- / __| ___| |_| |_(_)_ _  __ _ ___--
  32. -- \__ \/ -_)  _|  _| | ' \/ _` (_-<--
  33. -- |___/\___|\__|\__|_|_||_\__, /__/--
  34. --                         |___/    --
  35. -- -----------------------------------
  36. -- -----------------------------------
  37.                                 ALLYCOLOR = {0,255,255}     --//Color of the ESP  of people on the same team
  38.                                 ENEMYCOLOR =  {255,0,0}     --//Color of the ESP  of people on NOT the same team
  39.                                 TRANSPARENCY = 0.5          --//Transparency of the ESP
  40.                                 HEALTHBAR_ACTIVATED = true  --//Renders the Healthbar
  41. --
  42. --
  43.  
  44. --                          !!!Don't Change Anything Below Here Unless You Know What You're Doing!!!
  45.  
  46. function createFlex()
  47. -- -----------------------------------------------------------------------------------
  48. --[VARIABLES] //Changing may result in Errors!
  49. players = game:GetService("Players") --//Required for PF
  50. faces = {"Front","Back","Bottom","Left","Right","Top"} --//Every possible Enum face
  51. currentPlayer = nil --//Used for the Team-Check
  52. lplayer = players.LocalPlayer --//The LocalPlayer
  53. -- -----------------------------------------------------------------------------------
  54. players.PlayerAdded:Connect(function(p)
  55.     currentPlayer = p
  56.         p.CharacterAdded:Connect(function(character) --//For when a new Player joins the game
  57.             createESP(character)           
  58.         end)       
  59. end)
  60. -- -----------------------------------------------------------------------------------
  61. function checkPart(obj)  if (obj:IsA("Part") or obj:IsA("MeshPart")) and obj.Name~="HumanoidRootPart" then return true end end --//Check if the Part is suitable
  62. -- -----------------------------------------------------------------------------------
  63. function actualESP(obj)
  64.    
  65.     for i=0,5 do
  66.         surface = Instance.new("SurfaceGui",obj) --//Creates the SurfaceGui
  67.         surface.Face = Enum.NormalId[faces[i+1]] --//Adjusts the Face and chooses from the face table
  68.         surface.AlwaysOnTop = true
  69.  
  70.         frame = Instance.new("Frame",surface)   --//Creates the viewable Frame
  71.         frame.Size = UDim2.new(1,0,1,0)
  72.         frame.BorderSizePixel = 0                                              
  73.         frame.BackgroundTransparency = TRANSPARENCY
  74.             if currentPlayer.Team == players.LocalPlayer.Team then --//Checks the Players Team
  75.                     frame.BackgroundColor3 = Color3.new(ALLYCOLOR[1],ALLYCOLOR[2],ALLYCOLOR[3]) --//If in same Team                                        
  76.             else
  77.                 frame.BackgroundColor3 = Color3.new(ENEMYCOLOR[1],ENEMYCOLOR[2],ENEMYCOLOR[3])  --//If in another Team
  78.             end
  79.                                                            
  80.     end
  81. end
  82. -- -----------------------------------------------------------------------------------
  83. function createHealthbar(hrp)
  84.     board =Instance.new("BillboardGui",hrp) --//Creates the BillboardGui with HumanoidRootPart as the Parent
  85.     board.Name = "total"
  86.     board.Size = UDim2.new(1,0,1,0)
  87.     board.StudsOffset = Vector3.new(3,1,0)
  88.     board.AlwaysOnTop = true
  89.  
  90.     bar = Instance.new("Frame",board) --//Creates the red background
  91.     bar.BackgroundColor3 = Color3.new(255,0,0)
  92.     bar.BorderSizePixel = 0
  93.     bar.Size = UDim2.new(0.2,0,4,0)
  94.     bar.Name = "total2"
  95.                                                
  96.     health = Instance.new("Frame",bar) --//Creates the changing green Frame
  97.     health.BackgroundColor3 = Color3.new(0,255,0)
  98.     health.BorderSizePixel = 0
  99.     health.Size = UDim2.new(1,0,hrp.Parent.Humanoid.Health/100,0)
  100.         hrp.Parent.Humanoid.Changed:Connect(function(property) --//Triggers when any Property changed
  101.             hrp.total.total2.Frame.Size = UDim2.new(1,0,hrp.Parent.Humanoid.Health/100,0) --//Adjusts the size of the green Frame                              
  102.         end)
  103. end
  104. -- -----------------------------------------------------------------------------------
  105. function createESP(c) --//Checks and calls the proper function
  106.     bugfix = c:WaitForChild("Head") --// *Used so the children of the character arent nil.
  107.     for i,v in pairs(c:GetChildren()) do
  108.         if checkPart(v) then
  109.         actualESP(v)
  110.         end
  111.     end
  112.     if HEALTHBAR_ACTIVATED then --//If the user decided to
  113.         createHealthbar(c:WaitForChild("HumanoidRootPart")) --//Calls the function of the creation
  114.     end
  115. end
  116. -- -----------------------------------------------------------------------------------
  117. for i,people in pairs(players:GetChildren())do
  118.     if people ~= players.LocalPlayer then
  119.         currentPlayer = people
  120.                                                                 --//Used for Players already in the Game
  121.         createESP(people.Character)
  122.             people.CharacterAdded:Connect(function(character)
  123.                 createESP(character)           
  124.             end)
  125.     end
  126. end
  127. -- -----------------------------------------------------------------------------------
  128. end --//End of the entire function
  129.  
  130. createFlex() --// Does exactly that :)
  131. end)
  132.  
  133.  
  134.  
  135.  
  136. -- Aimbot
  137.  
  138. aim.MouseButton1Click:Connect(function()
  139.     local plrs = game:GetService("Players")
  140. local TeamBased = true ; local teambasedswitch = "o"
  141. local presskeytoaim = true; local aimkey = "e"
  142. local raycast = false
  143.  
  144. local espupdatetime = 5; autoesp = false
  145.  
  146.  
  147.  
  148. local lockaim = true; local lockangle = 5
  149.  
  150.  
  151.  
  152. --function findwat(folder, what)
  153. --  for i, smth in pairs(folder:GetChildren()) do
  154. --      if string.find(string.lower(tostring(smth)), string.lower(what)) then
  155. --          return smth
  156. --      end
  157. --  end
  158. --end
  159. --
  160. --local plrs = findwat(game, "Players")
  161.  
  162.  
  163.  
  164.  
  165. local Gui = Instance.new("ScreenGui")
  166. local Move = Instance.new("Frame")
  167. local Main = Instance.new("Frame")
  168. local EspStatus = Instance.new("TextLabel")
  169. local st1 = Instance.new("TextLabel")
  170. local st1_2 = Instance.new("TextLabel")
  171. local st1_3 = Instance.new("TextLabel")
  172. local Name = Instance.new("TextLabel")
  173. --Properties:
  174. Gui.Name = "Gui"
  175. Gui.Parent = plrs.LocalPlayer:WaitForChild("PlayerGui")
  176.  
  177. Move.Name = "Move"
  178. Move.Parent = Gui
  179. Move.BackgroundColor3 = Color3.new(0.0431373, 1, 0.0745098)
  180. Move.BackgroundTransparency = 0.40000000596046
  181. Move.BorderSizePixel = 0
  182. Move.Position = UDim2.new(0.005, 0,0.018, 0)
  183. Move.Size = UDim2.new(0.28141585, 0, 0.0320388414, 0)
  184.  
  185. Main.Name = "Main"
  186. Main.Parent = Move
  187. Main.BackgroundColor3 = Color3.new(0.176471, 0.176471, 0.176471)
  188. Main.BackgroundTransparency = 0.69999998807907
  189. Main.Position = UDim2.new(0, 0, 0.995670795, 0)
  190. Main.Size = UDim2.new(1.0000006, 0, 9.79697132, 0)
  191.  
  192. EspStatus.Name = "EspStatus"
  193. EspStatus.Parent = Main
  194. EspStatus.BackgroundColor3 = Color3.new(1, 1, 1)
  195. EspStatus.BackgroundTransparency = 1
  196. EspStatus.Size = UDim2.new(0.272955924, 0, 0.161862016, 0)
  197. EspStatus.Font = Enum.Font.ArialBold
  198. EspStatus.Text = "Press T to update Esp"
  199. EspStatus.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
  200. EspStatus.TextScaled = true
  201. EspStatus.TextSize = 14
  202. EspStatus.TextWrapped = true
  203.  
  204. st1.Name = "st1"
  205. st1.Parent = Main
  206. st1.BackgroundColor3 = Color3.new(1, 1, 1)
  207. st1.BackgroundTransparency = 1
  208. st1.Position = UDim2.new(0.271787882, 0, 0, 0)
  209. st1.Size = UDim2.new(0.728211343, 0, 0.161862016, 0)
  210. st1.Font = Enum.Font.ArialBold
  211. st1.Text = "Press "..aimkey.." to lock on a person inside ur view"
  212. st1.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
  213. st1.TextScaled = true
  214. st1.TextSize = 14
  215. st1.TextWrapped = true
  216.  
  217. st1_2.Name = "st1"
  218. st1_2.Parent = Main
  219. st1_2.BackgroundColor3 = Color3.new(1, 1, 1)
  220. st1_2.BackgroundTransparency = 1
  221. st1_2.Position = UDim2.new(0, 0, 0.375590861, 0)
  222. st1_2.Size = UDim2.new(0.999999881, 0, 0.161862016, 0)
  223. st1_2.Font = Enum.Font.ArialBold
  224. st1_2.Text = "Press L to enable esp loop"
  225. st1_2.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
  226. st1_2.TextScaled = true
  227. st1_2.TextSize = 14
  228. st1_2.TextWrapped = true
  229.  
  230. st1_3.Name = "st1"
  231. st1_3.Parent = Main
  232. st1_3.BackgroundColor3 = Color3.new(1, 1, 1)
  233. st1_3.BackgroundTransparency = 1
  234. st1_3.Position = UDim2.new(0, 0, 0.18558608, 0)
  235. st1_3.Size = UDim2.new(0.999999881, 0, 0.161862016, 0)
  236. st1_3.Font = Enum.Font.ArialBold
  237. st1_3.Text = "Press O to change team based mode"
  238. st1_3.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
  239. st1_3.TextScaled = true
  240. st1_3.TextSize = 14
  241. st1_3.TextWrapped = true
  242. local teambasedstatus = st1_3:Clone()
  243. teambasedstatus.Parent = st1_3
  244. teambasedstatus.TextScaled = true
  245. teambasedstatus.Position = UDim2.new(0, 0,0.694, 0)
  246. teambasedstatus.Text = tostring(TeamBased)
  247.  
  248. Name.Name = "Name"
  249. Name.Parent = Move
  250. Name.BackgroundColor3 = Color3.new(1, 1, 1)
  251. Name.BackgroundTransparency = 1
  252. Name.Size = UDim2.new(0.838, 0, 0.980000019, 0)
  253. Name.Font = Enum.Font.Arial
  254. Name.Text = "FPS gui v1.0"
  255. Name.TextColor3 = Color3.new(0, 0, 0)
  256. Name.TextScaled = true
  257. Name.TextSize = 14
  258. Name.TextWrapped = true
  259. Name.TextXAlignment = Enum.TextXAlignment.Left
  260. -- Scripts:
  261.  
  262.  
  263. local plrsforaim = {}
  264.  
  265. local lplr = game:GetService("Players").LocalPlayer
  266. Move.Draggable = true
  267. Gui.ResetOnSpawn = false
  268. Gui.Name = "Chat"
  269. Gui.DisplayOrder = 999
  270.  
  271.     Gui.Parent = plrs.LocalPlayer.PlayerGui
  272.  
  273.  
  274. f = {}
  275. local espforlder
  276.  
  277. f.addesp = function()
  278.     --print("ESP ran")
  279.     if espforlder then
  280.     else
  281.         espforlder = Instance.new("Folder")
  282.         espforlder.Parent = game.Workspace.CurrentCamera
  283.     end
  284.     for i, v in pairs(espforlder:GetChildren()) do
  285.         v:Destroy()
  286.     end
  287.     for _, plr in pairs(plrs:GetChildren()) do
  288.         if plr.Character and plr.Character.Humanoid.Health > 0 and plr.Name ~= lplr.Name then
  289.             if TeamBased == true then
  290.                 if plr.Team.Name ~= plrs.LocalPlayer.Team.Name  then
  291.                     local e = espforlder:FindFirstChild(plr.Name)
  292.                     if not e then
  293.                         --print("Added esp for team based")
  294.                         local bill = Instance.new("BillboardGui", espforlder)
  295.                         bill.Name = plr.Name
  296.                         bill.AlwaysOnTop = true
  297.                         bill.Size = UDim2.new(1,0,1,0)
  298.                         bill.Adornee = plr.Character.Head
  299.                         local Frame = Instance.new('Frame',bill)
  300.                         Frame.Active = true
  301.                         Frame.BackgroundColor3 = Color3.new(0/255,255/255,0/255)
  302.                         Frame.BackgroundTransparency = 0
  303.                         Frame.BorderSizePixel = 0
  304.                         Frame.AnchorPoint = Vector2.new(.5, .5)
  305.                         Frame.Position = UDim2.new (0.5,0,0.5,0)
  306.                         Frame.Size = UDim2.new (1,0,1,0)
  307.                         Frame.Rotation = 0
  308.                         plr.Character.Humanoid.Died:Connect(function()
  309.                             bill:Destroy()
  310.                         end)
  311.                     end
  312.                 end
  313.             else
  314.                 local e = espforlder:FindFirstChild(plr.Name)
  315.                 if not e then
  316.                     --print("Added esp")
  317.                     local bill = Instance.new("BillboardGui", espforlder)
  318.                     bill.Name = plr.Name
  319.                     bill.AlwaysOnTop = true
  320.                     bill.Size = UDim2.new(1,0,1,0)
  321.                     bill.Adornee = plr.Character.Head
  322.                     local Frame = Instance.new('Frame',bill)
  323.                     Frame.Active = true
  324.                     Frame.BackgroundColor3 = Color3.new(0/255,255/255,0/255)
  325.                     Frame.BackgroundTransparency = 0
  326.                     Frame.BorderSizePixel = 0
  327.                     Frame.AnchorPoint = Vector2.new(.5, .5)
  328.                     Frame.Position = UDim2.new (0.5,0,0.5,0)
  329.                     Frame.Size = UDim2.new (1,0,1,0)
  330.                     Frame.Rotation = 0
  331.                     plr.Character.Humanoid.Died:Connect(function()
  332.                         bill:Destroy()
  333.                     end)
  334.                 end
  335.             end
  336.            
  337.            
  338.         end
  339.     end
  340. end
  341. local cam = game.Workspace.CurrentCamera
  342.  
  343. local mouse = lplr:GetMouse()
  344. local switch = false
  345. local key = "k"
  346. local aimatpart = nil
  347. mouse.KeyDown:Connect(function(a)
  348.     if a == "t" then
  349.         print("worked1")
  350.         f.addesp()
  351.     elseif a == "u" then
  352.         if raycast == true then
  353.             raycast = false
  354.         else
  355.             raycast = true
  356.         end
  357.     elseif a == "l" then
  358.         if autoesp == false then
  359.             autoesp = true
  360.         else
  361.             autoesp = false
  362.         end
  363.     end
  364.     if a == "j" then
  365.         if mouse.Target then
  366.             mouse.Target:Destroy()
  367.         end
  368.     end
  369.     if a == key then
  370.         if switch == false then
  371.             switch = true
  372.         else
  373.             switch = false
  374.             if aimatpart ~= nil then
  375.                 aimatpart = nil
  376.             end
  377.         end
  378.     elseif a == teambasedswitch then
  379.         if TeamBased == true then
  380.             TeamBased = false
  381.             teambasedstatus.Text = tostring(TeamBased)
  382.         else
  383.             TeamBased = true
  384.             teambasedstatus.Text = tostring(TeamBased)
  385.         end
  386.     elseif a == aimkey then
  387.         if not aimatpart then
  388.             local maxangle = math.rad(20)
  389.             for i, plr in pairs(plrs:GetChildren()) do
  390.                 if plr.Name ~= lplr.Name and plr.Character and plr.Character.Head and plr.Character.Humanoid and plr.Character.Humanoid.Health > 1 then
  391.                     if TeamBased == true then
  392.                         if plr.Team.Name ~= lplr.Team.Name then
  393.                             local an = checkfov(plr.Character.Head)
  394.                             if an < maxangle then
  395.                                 maxangle = an
  396.                                 aimatpart = plr.Character.Head
  397.                             end
  398.                         end
  399.                     else
  400.                         local an = checkfov(plr.Character.Head)
  401.                             if an < maxangle then
  402.                                 maxangle = an
  403.                                 aimatpart = plr.Character.Head
  404.                             end
  405.                             print(plr)
  406.                     end
  407.                     plr.Character.Humanoid.Died:Connect(function()
  408.                         if aimatpart.Parent == plr.Character or aimatpart == nil then
  409.                             aimatpart = nil
  410.                         end
  411.                     end)
  412.                 end
  413.             end
  414.         else
  415.             aimatpart = nil
  416.         end
  417.     end
  418. end)
  419.  
  420. function getfovxyz (p0, p1, deg)
  421.     local x1, y1, z1 = p0:ToOrientation()
  422.     local cf = CFrame.new(p0.p, p1.p)
  423.     local x2, y2, z2 = cf:ToOrientation()
  424.     --local d = math.deg
  425.     if deg then
  426.         --return Vector3.new(d(x1-x2), d(y1-y2), d(z1-z2))
  427.     else
  428.         return Vector3.new((x1-x2), (y1-y2), (z1-z2))
  429.     end
  430. end
  431.  
  432. function getaimbotplrs()
  433.     plrsforaim = {}
  434.     for i, plr in pairs(plrs:GetChildren()) do
  435.         if plr.Character and plr.Character.Humanoid and plr.Character.Humanoid.Health > 0 and plr.Name ~= lplr.Name and plr.Character.Head then
  436.            
  437.             if TeamBased == true then
  438.                 if plr.Team.Name ~= lplr.Team.Name then
  439.                     local cf = CFrame.new(game.Workspace.CurrentCamera.CFrame.p, plr.Character.Head.CFrame.p)
  440.                     local r = Ray.new(cf, cf.LookVector * 10000)
  441.                     local ign = {}
  442.                     for i, v in pairs(plrs.LocalPlayer.Character:GetChildren()) do
  443.                         if v:IsA("BasePart") then
  444.                             table.insert(ign , v)
  445.                         end
  446.                     end
  447.                     local obj = game.Workspace:FindPartOnRayWithIgnoreList(r, ign)
  448.                     if obj.Parent == plr.Character and obj.Parent ~= lplr.Character then
  449.                         table.insert(plrsforaim, obj)
  450.                     end
  451.                 end
  452.             else
  453.                 local cf = CFrame.new(game.Workspace.CurrentCamera.CFrame.p, plr.Character.Head.CFrame.p)
  454.                 local r = Ray.new(cf, cf.LookVector * 10000)
  455.                 local ign = {}
  456.                 for i, v in pairs(plrs.LocalPlayer.Character:GetChildren()) do
  457.                     if v:IsA("BasePart") then
  458.                         table.insert(ign , v)
  459.                     end
  460.                 end
  461.                 local obj = game.Workspace:FindPartOnRayWithIgnoreList(r, ign)
  462.                 if obj.Parent == plr.Character and obj.Parent ~= lplr.Character then
  463.                     table.insert(plrsforaim, obj)
  464.                 end
  465.             end
  466.            
  467.            
  468.         end
  469.     end
  470. end
  471.  
  472. function aimat(part)
  473.     cam.CFrame = CFrame.new(cam.CFrame.p, part.CFrame.p)
  474. end
  475. function checkfov (part)
  476.     local fov = getfovxyz(game.Workspace.CurrentCamera.CFrame, part.CFrame)
  477.     local angle = math.abs(fov.X) + math.abs(fov.Y)
  478.     return angle
  479. end
  480.  
  481. game:GetService("RunService").RenderStepped:Connect(function()
  482.     if aimatpart then
  483.         aimat(aimatpart)
  484.         if aimatpart.Parent == plrs.LocalPlayer.Character then
  485.             aimatpart = nil
  486.         end
  487.     end
  488.    
  489.    
  490. --  if switch == true then
  491. --      local maxangle = 99999
  492. --     
  493. --      --print("Loop")
  494. --      if true and raycast == false then
  495. --          for i, plr in pairs(plrs:GetChildren()) do
  496. --              if plr.Name ~= lplr.Name and plr.Character and plr.Character.Head and plr.Character.Humanoid and plr.Character.Humanoid.Health > 1 then
  497. --                  if TeamBased then
  498. --                      if plr.Team.Name ~= lplr.Team.Name or plr.Team.TeamColor ~= lplr.Team.TeamColor then
  499. --                          local an = checkfov(plr.Character.Head)
  500. --                          if an < maxangle then
  501. --                              maxangle = an
  502. --                              aimatpart = plr.Character.Head
  503. --                              if an < lockangle then
  504. --                                  break
  505. --                              end
  506. --                          end
  507. --                      end
  508. --                  else
  509. --                      local an = checkfov(plr.Character.Head)
  510. --                          if an < maxangle then
  511. --                              maxangle = an
  512. --                              aimatpart = plr.Character.Head
  513. --                              if an < lockangle then
  514. --                                  break
  515. --                              end
  516. --                          end
  517. --                  end
  518. --                 
  519. --                 
  520. --                 
  521. --                 
  522. --              end
  523. --          end
  524. --      elseif raycast == true then
  525. --         
  526. --      end
  527.        
  528.         if raycast == true and switch == false and not aimatpart then
  529.             getaimbotplrs()
  530.             aimatpart = nil
  531.             local maxangle = 999
  532.             for i, v in ipairs(plrsforaim) do
  533.                 if v.Parent ~= lplr.Character then
  534.                     local an = checkfov(v)
  535.                     if an < maxangle and v ~= lplr.Character.Head then
  536.                         maxangle = an
  537.                         aimatpart = v
  538.                         print(v:GetFullName())
  539.                         v.Parent.Humanoid.Died:connect(function()
  540.                             aimatpart = nil
  541.                         end)
  542.                     end
  543.                 end
  544.             end
  545.        
  546.     end
  547. end)
  548. delay(0, function()
  549.     while wait(espupdatetime) do
  550.         if autoesp == true then
  551.             pcall(function()
  552.             f.addesp()
  553.             end)
  554.         end
  555.     end
  556. end)
  557. warn("loaded")
  558. end)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top