Advertisement
Flic

FPS Gui v2.4

Nov 27th, 2020
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 32.54 KB | None | 0 0
  1. pcall(function()
  2.     local espcolor = Color3.fromRGB(255, 60, 20)
  3.     local wallhack_esp_transparency = .4
  4.     local gui_hide_button = {Enum.KeyCode.LeftControl, "h"}
  5.     local plrs = game:GetService("Players")
  6.     local lplr = game:GetService("Players").LocalPlayer
  7.     local TeamBased = true ; local teambasedswitch = "o"
  8.     local presskeytoaim = true; local aimkey = "e"
  9.     aimbothider = false; aimbothiderspeed = .5
  10.     local Aim_Assist = false ; Aim_Assist_Key = {Enum.KeyCode.LeftControl, "z"}
  11.     local espupdatetime = 3; autoesp = true; local charmsesp = true
  12.     local movementcounting = true
  13.    
  14.    
  15.     local mouselock = false
  16.     local canaimat = true
  17.     local lockaim = true; local lockangle = 5
  18.     local ver = "2.4"
  19.     local cam = game.Workspace.CurrentCamera
  20.     local BetterDeathCount = true
  21.     local ballisticsboost = 0
  22.    
  23.     local mouse = lplr:GetMouse()
  24.     local switch = false
  25.     local key = "k"
  26.     local aimatpart = nil
  27.     local lightesp = false
  28.    
  29.     local abs = math.abs
  30.    
  31.     local Gui = Instance.new("ScreenGui")
  32.     local Move = Instance.new("Frame")
  33.     local Main = Instance.new("Frame")
  34.     local EspStatus = Instance.new("TextLabel")
  35.     local st1 = Instance.new("TextLabel")
  36.     local st1_2 = Instance.new("TextLabel")
  37.     local st1_3 = Instance.new("TextBox")
  38.     local Name = Instance.new("TextLabel")
  39.     --Properties:
  40.    
  41.     Gui.Parent = game.CoreGui
  42.    
  43.    
  44.     local aimbotstatus = {"qc", "qr", "qe", "qd", "qi", "qt", "qs", "dd", "sp", "ql", "qa", "qd", "qs"}
  45.     local gotstring = 0
  46.     local function getrandomstring()
  47.         gotstring = gotstring+666
  48.         local str = ""
  49.         local randomstring = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "g", "k", "l", "m", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
  50.              "а","б","в","г","д","е","ё","ж","з","и","й","к","л","м","о","п","р","с","т","у","ф","х","ч","щ","ъ","ы","ъ","э","ю","я", "`", "$",
  51.             "0","1","2","3","4","5","6","7","8","9", }
  52.         local counting123 = 0
  53.         for i, v in ipairs(randomstring) do
  54.             counting123 = i
  55.         end
  56.         do
  57.             math.randomseed(tick()+gotstring)
  58.             for i = 3, math.random(1,100) do
  59.                     math.randomseed(i+tick()+gotstring)
  60.                    
  61.                     local oneortwo = math.random(1,2)
  62.                     if oneortwo == 2 then
  63.                         math.randomseed(i+tick()+gotstring)
  64.                         str = str..""..randomstring[math.random(1, counting123)]
  65.                     else
  66.                         math.randomseed(i+tick()+gotstring)
  67.                         str = str..""..string.upper(randomstring[math.random(1, counting123)])
  68.                     end
  69.                
  70.             end
  71.         end
  72.         return str
  73.     end
  74.     local mousedown = false
  75.     local isonmovething = false
  76.     local mouseoffset = Vector2.new()
  77.     local mousedown = false
  78.     local bspeed = 3584
  79.     local aimbotoffset = {dd = ":", sp = " ", qa = "a", qb = "b",qc = "c", qd = "d", qe = "e", qf = "f", qg = "g" , qh = "h" , qi = "i", qj = "j", qk = "k", ql = "l", qm = "m", qn = "n", qo = "o", qp = "p", qq = "q", qr = "r", qs = "s", qt = "t", qu = "u", qv = "w", qx = "x", qy = "y", qz = "z"}
  80.    
  81.    
  82.    
  83.     Gui.Name = getrandomstring()
  84.    
  85.     Move.Name = getrandomstring()
  86.     Move.Draggable = true
  87.     Move.Parent = Gui
  88.     Move.BackgroundColor3 = Color3.new(0.0431373, 1, 0.0745098)
  89.     Move.BackgroundTransparency = 0.40000000596046
  90.     Move.BorderSizePixel = 0
  91.     Move.Position = UDim2.new(0.5, 0,0.018, 0)
  92.     Move.Size = UDim2.new(0, 320, 0, 30)
  93.    
  94.     Move.MouseEnter:Connect(function()
  95.        
  96.         isonmovething = true
  97.        
  98.     end)
  99.     Move.MouseLeave:Connect(function()
  100.        
  101.         isonmovething = mousedown and true or false
  102.     end)
  103.     mouse.Button1Down:connect(function()
  104.         mousedown = true
  105.         mouseoffset = Move.AbsolutePosition - Vector2.new(mouse.X, mouse.Y)
  106.     end)
  107.     mouse.Button1Up:connect(function()
  108.         mousedown = false
  109.     end)
  110.    
  111.     mouse.Move:Connect(function()
  112.         if isonmovething == true and mousedown then
  113.             Move.Position = UDim2.new(0, mouseoffset.X + mouse.X, 0, mouseoffset.Y + mouse.Y)
  114.         end
  115.     end)
  116.     local function uc (st)
  117.         local ast = ""
  118.         for i, v in ipairs(st) do
  119.             local let = aimbotoffset[v]
  120.             ast = ast..let
  121.         end
  122.         return ast
  123.     end
  124.    
  125.     Main.Name = getrandomstring()
  126.     Main.Parent = Move
  127.     Main.BackgroundColor3 = Color3.new(0.176471, 0.176471, 0.176471)
  128.     Main.BackgroundTransparency = 0.69999998807907
  129.     Main.Position = UDim2.new(0, 0, 0.995670795, 0)
  130.     Main.Size = UDim2.new(1.0000006, 0, 11.2, 0)
  131.    
  132.     st1.Name = getrandomstring()
  133.     st1.Parent = Main
  134.     st1.BackgroundColor3 = Color3.new(1, 1, 1)
  135.     st1.BackgroundTransparency = 1
  136.     st1.Position = UDim2.new(0, 0, 0, 0)
  137.     st1.Size = UDim2.new(1, 0, 0.161862016, 0)
  138.     st1.Font = Enum.Font.ArialBold
  139.     st1.Text = uc(aimbotstatus)
  140.     st1.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
  141.     st1.TextScaled = true
  142.     st1.TextSize = 14
  143.     st1.TextWrapped = true
  144.    
  145.     st1_2.Name = getrandomstring()
  146.     st1_2.Parent = Main
  147.     st1_2.BackgroundColor3 = Color3.new(1, 1, 1)
  148.     st1_2.BackgroundTransparency = 1
  149.     st1_2.Position = UDim2.new(0, 0, 0.375590861, 0)
  150.     st1_2.Size = UDim2.new(0.999999881, 0, 0.161862016, 0)
  151.     st1_2.Font = Enum.Font.ArialBold
  152.     st1_2.TextXAlignment = Enum.TextXAlignment.Left
  153.     st1_2.Text = "Current ballistics: 0"
  154.     st1_2.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
  155.     st1_2.TextScaled = true
  156.     st1_2.TextSize = 14
  157.     st1_2.TextWrapped = true
  158.    
  159.     local aimbothiderbox = Instance.new("TextBox")
  160.     aimbothiderbox.Name = getrandomstring()
  161.     aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." off"
  162.     aimbothiderbox.Size = UDim2.new(1, 0,0.162, 0)
  163.     aimbothiderbox.TextScaled = true
  164.     aimbothiderbox.TextColor3 =Color3.fromRGB(255, 0, 0)
  165.     aimbothiderbox.Position = UDim2.new(0, 0,0.853, 0)
  166.     aimbothiderbox.BackgroundTransparency = 1
  167.     aimbothiderbox.Parent = Main
  168.    
  169.     st1_3.Name = getrandomstring()
  170.     st1_3.Parent = Main
  171.     st1_3.BackgroundColor3 = Color3.new(1, 1, 1)
  172.     st1_3.BackgroundTransparency = 1
  173.     st1_3.Position = UDim2.new(0, 0, 0.18558608, 0)
  174.     st1_3.Size = UDim2.new(0.999999881, 0, 0.161862016, 0)
  175.     st1_3.Font = Enum.Font.ArialBold
  176.     st1_3.Text = "Bullet speed = 3584"
  177.     st1_3.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
  178.     st1_3.TextScaled = true
  179.     st1_3.TextSize = 14
  180.     st1_3.TextWrapped = true
  181.     local teambasedstatus = st1_3:Clone()
  182.     teambasedstatus.Parent = Main
  183.     teambasedstatus.TextScaled = true
  184.     teambasedstatus.Position = UDim2.new(0, 0,.7, 0)
  185.     teambasedstatus.Size = UDim2.new(1, 0,.1, 0)
  186.     teambasedstatus.Name = getrandomstring()
  187.     teambasedstatus.Text = "Team Based: "..tostring(TeamBased)
  188.     local espstatustext = teambasedstatus:Clone()
  189.     espstatustext.Name = getrandomstring()
  190.     espstatustext.Position = UDim2.new(0, 0,0.58, 0)
  191.     espstatustext.Text = "Esp loop :"..tostring(autoesp)
  192.     espstatustext.Parent = Main
  193.     local hide = Instance.new("TextButton")
  194.     hide.Text = "_"
  195.     hide.BackgroundTransparency = 1
  196.     hide.TextScaled = true
  197.     hide.TextWrapped = true
  198.     hide.Size = UDim2.new(0.1, 0,1, 0)
  199.     hide.Position = UDim2.new(0.9, 0,-0.15, 0)
  200.     hide.Name = getrandomstring()
  201.     hide.Parent = Move
  202.     Name.Name = getrandomstring()
  203.     Name.Parent = Move
  204.     Name.BackgroundColor3 = Color3.new(1, 1, 1)
  205.     Name.BackgroundTransparency = 1
  206.     Name.Size = UDim2.new(0.838, 0, 1, 0)
  207.     Name.Font = Enum.Font.Arial
  208.     Name.Text = "FPS gui v"..ver
  209.     Name.TextColor3 = Color3.new(0, 0, 0)
  210.     Name.TextScaled = true
  211.     Name.TextSize = 14
  212.     Name.TextWrapped = true
  213.     Name.TextXAlignment = Enum.TextXAlignment.Left
  214.     local scr = Instance.new("ScrollingFrame")
  215.     scr.Size = Main.Size
  216.     scr.Position = Main.Position
  217.     scr.ScrollBarThickness = 0
  218.     scr.BackgroundTransparency = 1
  219.     scr.Name = getrandomstring()
  220.     Main.Size = UDim2.new(1, 0, 1, 0)
  221.     Main.Position = UDim2.new(0,0,0,0)
  222.     Main.Parent = scr
  223.     scr.Parent = Move
  224.     startpos = Main.Position
  225.     Move.Active = true
  226.    
  227.     -- Scripts:
  228.     hided = false
  229.     hide.MouseButton1Click:Connect(function()
  230.         if hided == false then
  231.             hided = true
  232.             Main:TweenPosition(UDim2.new(0, 0, -1.5, 0))
  233.         else
  234.             hided = false
  235.             Main:TweenPosition(startpos)
  236.         end
  237.     end)
  238.    
  239.    
  240.     aimbothiderbox.FocusLost:Connect(function()
  241.         local numb = tonumber(aimbothiderbox.Text)
  242.         if aimbothider == true then
  243.             aimbothiderbox.TextColor3 =Color3.fromRGB(11, 255, 19)
  244.         else
  245.             aimbothiderbox.TextColor3 =Color3.fromRGB(255, 0, 0)
  246.         end
  247.         if numb ~= nil then
  248.             aimbothiderspeed = numb
  249.             if aimbothider == true then
  250.                 aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." on"
  251.             else
  252.                 aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." off"
  253.             end
  254.         else
  255.             if aimbothider == true then
  256.                 aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." on"
  257.             else
  258.                 aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." off"
  259.             end
  260.         end
  261.     end)
  262.    
  263.    
  264.     local plrsforaim = {}
  265.    
  266.    
  267.     Move.Draggable = true
  268.     Gui.ResetOnSpawn = false
  269.     --Gui.Name = "Chat"
  270.     Gui.DisplayOrder = 999
  271.     pcall(function()
  272.     if not game:GetService("CoreGui") then
  273.         Gui.Parent = plrs.LocalPlayer.PlayerGui
  274.     else
  275.         Gui.Parent = game:GetService("CoreGui")
  276.     end
  277.     end)
  278.     local espheadthing
  279.     do
  280.     local BillboardGui = Instance.new("BillboardGui")
  281.     local PName = Instance.new("TextLabel")
  282.     local Pdist = Instance.new("TextLabel")
  283.     local ImageLabel = Instance.new("ImageLabel")
  284.     local ImageLabel_2 = Instance.new("ImageLabel")
  285.     --Properties:
  286.     --BillboardGui.Parent = game.Workspace.Part
  287.     BillboardGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  288.     BillboardGui.AlwaysOnTop = true
  289.     BillboardGui.LightInfluence = 0
  290.     BillboardGui.Size = UDim2.new(0, 100, 0, 46)
  291.     BillboardGui.Name = "headoverthing"
  292.     PName.Name = "PName"
  293.     PName.Parent = BillboardGui
  294.     PName.BackgroundColor3 = espcolor
  295.     PName.BackgroundTransparency = 0.55000001192093
  296.     PName.BorderSizePixel = 0
  297.     PName.Size = UDim2.new(0, 100, 0, 23)
  298.     PName.Font = Enum.Font.SourceSans
  299.     PName.Text = "urmom"
  300.     PName.TextColor3 = Color3.new(0, 0, 0)
  301.     PName.TextScaled = true
  302.     PName.TextSize = 14
  303.     PName.TextWrapped = true
  304.     st1.Text = uc(aimbotstatus)
  305.     Pdist.Name = "Pdist"
  306.     Pdist.Parent = BillboardGui
  307.     Pdist.AnchorPoint = Vector2.new(0.5, 0)
  308.     Pdist.BackgroundColor3 = espcolor
  309.     Pdist.BackgroundTransparency = 0.55000001192093
  310.     Pdist.BorderSizePixel = 0
  311.     Pdist.Position = UDim2.new(0.5, 0, 0.5, 0)
  312.     Pdist.Size = UDim2.new(0, 70, 0, 23)
  313.     Pdist.Font = Enum.Font.SourceSans
  314.     Pdist.Text = "666"
  315.     Pdist.TextColor3 = Color3.new(0, 0, 0)
  316.     Pdist.TextScaled = true
  317.     Pdist.TextSize = 14
  318.     Pdist.TextWrapped = true
  319.    
  320.     ImageLabel.Parent = BillboardGui
  321.     ImageLabel.BackgroundColor3 = Color3.new(0.298039, 1, 0)
  322.     ImageLabel.BackgroundTransparency = 1
  323.     ImageLabel.BorderColor3 = espcolor
  324.     ImageLabel.Position = UDim2.new(1, -15, 0.5, 0)
  325.     ImageLabel.Rotation = 180
  326.     ImageLabel.Size = UDim2.new(0, 15, 0, 23)
  327.     ImageLabel.Image = "rbxassetid://2832171824"
  328.     ImageLabel.ImageColor3 = espcolor
  329.     ImageLabel.ImageTransparency = 0.55000001192093
  330.    
  331.     ImageLabel_2.Parent = BillboardGui
  332.     ImageLabel_2.BackgroundColor3 = espcolor
  333.     ImageLabel_2.BackgroundTransparency = 1
  334.     ImageLabel_2.BorderColor3 = Color3.new(0.298039, 1, 0)
  335.     ImageLabel_2.Position = UDim2.new(0, 0, 0.5, 0)
  336.     ImageLabel_2.Rotation = 180
  337.     ImageLabel_2.Size = UDim2.new(0, 15, 0, 23)
  338.     ImageLabel_2.Image = "rbxassetid://2832177613"
  339.     ImageLabel_2.ImageColor3 = espcolor
  340.     ImageLabel_2.ImageTransparency = 0.55000001192093
  341.     espheadthing = BillboardGui
  342.     end
  343.    
  344.    
  345.    
  346.     f = {}
  347.     f.UpdateHeadUI = function(v)
  348.        
  349.            
  350.                 if v.Adornee and v.Adornee ~= nil then
  351.                     local destr = false
  352.                     if TeamBased then
  353.                         destr = true
  354.                         local plr = plrs:GetPlayerFromCharacter(v.Adornee.Parent)
  355.                         if plr and plr.Team and plr.Team.Name ~= lplr.Team.Name then
  356.                             destr = false
  357.                         end
  358.                     end
  359.                     if lightesp == true then
  360.                         v.Pdist.TextColor3 = Color3.new(1,1,1)
  361.                         v.PName.TextColor3 = Color3.new(1,1,1)
  362.                     else
  363.                         v.Pdist.TextColor3 = Color3.new(0,0,0)
  364.                         v.PName.TextColor3 = Color3.new(0,0,0)
  365.                     end
  366.                     local d = math.floor((cam.CFrame.p - v.Adornee.CFrame.p).magnitude)
  367.                     v.Pdist.Text = tostring(d)
  368.                     if d < 14 then
  369.                         v.Enabled = false
  370.                     else
  371.                         v.Enabled = true
  372.                     end
  373.                     v.StudsOffset = Vector3.new(0,.6+d/14,0)
  374.                     if destr then
  375.                         v:Destroy()
  376.                     end
  377.                 else
  378.                     v:Destroy()
  379.                 end
  380.            
  381.        
  382.     end
  383.     st1.Text = uc(aimbotstatus)
  384.     local espforlder
  385.     local partconverter = Instance.new("Part")
  386.     --local headsupdatelist = {}
  387.     st1_3.FocusLost:connect(function()
  388.         if tonumber(st1_3.Text) then
  389.             bspeed = tonumber(st1_3.Text)
  390.         else
  391.            
  392.         end
  393.     end)
  394.     f.addesp = function()
  395.         pcall(function()
  396.         --print("ESP ran")
  397.         if espforlder then
  398.             espforlder:Destroy()
  399.             espforlder = Instance.new("Folder")
  400.             espforlder.Parent = game.Workspace.CurrentCamera
  401.         else
  402.             espforlder = Instance.new("Folder")
  403.             espforlder.Parent = game.Workspace.CurrentCamera
  404.         end
  405.         for i, v in pairs(espforlder:GetChildren()) do
  406.             v:Destroy()
  407.         end
  408.         for _, plr in pairs(plrs:GetChildren()) do
  409.             if plr.Character and plr.Character.Humanoid.Health > 0 and plr.Name ~= lplr.Name then
  410.                 if TeamBased == true then
  411.                    
  412.                     if plr.Team.Name ~= plrs.LocalPlayer.Team.Name  then
  413.                         pcall(function()
  414.                         local e = espforlder:FindFirstChild(plr.Name)
  415.                         if not e then
  416.                             local fold = Instance.new("Folder", espforlder)
  417.                             fold.Name = plr.Name
  418.                            
  419.                             --partconverter.BrickColor = plr.Team.Color
  420.                             --local teamc = partconverter.Color
  421.                             for i, p in pairs(plr.Character:GetChildren()) do
  422.                                 if p:IsA("BasePart") and p.Name ~= "HumanoidRootPart" then
  423.                                     if charmsesp then
  424.                                     local urmom = Instance.new("BoxHandleAdornment")
  425.                                     urmom.ZIndex = 10
  426.                                     urmom.AlwaysOnTop = true
  427.                                     urmom.Color3 = espcolor
  428.                                     urmom.Size = p.Size
  429.                                     urmom.Adornee = p
  430.                                     urmom.Name = tick().." Ur mom has big gay"
  431.                                     urmom.Transparency = wallhack_esp_transparency
  432.                                     urmom.Parent = fold
  433.                                     if p.Name == "Head" then
  434.                                         local th = p:FindFirstChild("headoverthing")
  435.                                         if not th then
  436.                                             local ht = espheadthing:Clone()
  437.                                             ht.PName.Text = p.Parent.Name
  438.                                             ht.Adornee = p
  439.                                             --table.insert(headsupdatelist, ht)
  440.                                             delay(0, function()
  441.                                                 while wait(0.08) and plr and p do
  442.                                                     f.UpdateHeadUI(ht)
  443.                                                 end
  444.                                             end)
  445.                                             ht.Parent = p
  446.                                         end
  447.                                     end
  448.                                     end
  449.                                 end
  450.                             end
  451.                             plr.Character.Humanoid.Died:Connect(function()
  452.                                 fold:Destroy()
  453.                             end)
  454.                            
  455.                         end
  456.                         end)
  457.                     end
  458.                 else
  459.                     local e = espforlder:FindFirstChild(plr.Name)
  460.                     if not e then
  461.                         local fold = Instance.new("Folder", espforlder)
  462.                             fold.Name = plr.Name
  463.                            
  464.                             --partconverter.BrickColor = plr.Team.Color
  465.                             --local teamc = Move.BackgroundColor3
  466.                             for i, p in pairs(plr.Character:GetChildren()) do
  467.                                 if p:IsA("BasePart") and p.Name ~= "HumanoidRootPart" then
  468.                                     pcall(function()
  469.                                     if charmsesp then
  470.                                     local urmom = Instance.new("BoxHandleAdornment")
  471.                                     urmom.ZIndex = 10
  472.                                     urmom.AlwaysOnTop = true
  473.                                     urmom.Color3 = espcolor
  474.                                     urmom.Size = p.Size
  475.                                     urmom.Adornee = p
  476.                                     urmom.Name = tick().." Ur mom has big gay"
  477.                                     urmom.Transparency = wallhack_esp_transparency
  478.                                     urmom.Parent = fold
  479.                                     end
  480.                                     if p.Name == "Head" then
  481.                                         local th = p:FindFirstChild("headoverthing")
  482.                                         if not th then
  483.                                             local ht = espheadthing:Clone()
  484.                                             ht.PName.Text = p.Parent.Name
  485.                                             ht.Adornee = p
  486.                                             delay(0, function()
  487.                                                 while wait(0.08) and plr and p do
  488.                                                     f.UpdateHeadUI(ht)
  489.                                                 end
  490.                                             end)
  491.                                             --table.insert(headsupdatelist, ht)
  492.                                             ht.Parent = p
  493.                                         end
  494.                                     end
  495.                                     end)
  496.                                 end
  497.                             end
  498.                             plr.Character.Humanoid.Died:Connect(function()
  499.                                 fold:Destroy()
  500.                             end)
  501.                     end
  502.                 end
  503.                
  504.                
  505.             end
  506.         end
  507.         end)
  508.     end
  509.    
  510.     local uis = game:GetService("UserInputService")
  511.     local bringall = false
  512.     local hided2 = false
  513.     local upping = false
  514.     local downing = false
  515.     mouse.KeyDown:Connect(function(a)
  516.        
  517.         if a == "t" then
  518.             --print("worked1")
  519.             f.addesp()
  520.         elseif a == gui_hide_button[2] and uis:IsKeyDown(gui_hide_button[1]) then
  521.             if hided2 == false then
  522.                 hided2 = true
  523.                 autoesp =false
  524.                 if espforlder then
  525.                     espforlder:Destroy()
  526.                 end
  527.                 Gui.Enabled = false
  528.             else
  529.                 Gui.Enabled = true
  530.                 hided2 = false
  531.             end
  532.                
  533.         elseif a == "y" then
  534.             if aimbothider == false then
  535.                 aimbothider = true
  536.                 if aimbothider == true then
  537.                 aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." on"
  538.             else
  539.                 aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." off"
  540.             end
  541.             else
  542.                
  543.                 aimbothider = false
  544.                 if aimbothider == true then
  545.                 aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." on"
  546.             else
  547.                 aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." off"
  548.             end
  549.             end
  550.             if aimbothider == true then
  551.                 aimbothiderbox.TextColor3 =Color3.fromRGB(11, 255, 19)
  552.             else
  553.                 aimbothiderbox.TextColor3 =Color3.fromRGB(255, 0, 0)
  554.             end
  555.         elseif a == "l" then
  556.             if not uis:IsKeyDown(Enum.KeyCode.LeftControl) then
  557.                 if autoesp == false then
  558.                     autoesp = true
  559.                 else
  560.                     autoesp = false
  561.                 end
  562.             else
  563.                 if lightesp == true then
  564.                     lightesp = false
  565.                 else
  566.                     lightesp = true
  567.                 end
  568.             end
  569.         elseif a == "]" then
  570.             upping = true
  571.             downing = false
  572.         elseif a== "[" then
  573.             downing = true
  574.             upping = false
  575.         elseif a == Aim_Assist_Key[2] and uis:IsKeyDown(Aim_Assist_Key[1]) then
  576.             if Aim_Assist == true then
  577.                 Aim_Assist = false
  578.                 --print("disabled")
  579.             else
  580.                 Aim_Assist = true
  581.             end
  582.         end
  583.         if a == "j" then
  584.             if mouse.Target then
  585.                 mouse.Target:Destroy()
  586.             end
  587.         end
  588.         if a == key then
  589.             if switch == false then
  590.                 switch = true
  591.             else
  592.                 switch = false
  593.                 if aimatpart ~= nil then
  594.                     aimatpart = nil
  595.                 end
  596.             end
  597.         elseif a == "b" and uis:IsKeyDown(Enum.KeyCode.LeftControl) and not uis:IsKeyDown(Enum.KeyCode.R) then
  598.             if movementcounting then
  599.                 movementcounting = false
  600.             else
  601.                 movementcounting = true
  602.             end
  603.         elseif a == teambasedswitch then
  604.             if TeamBased == true then
  605.                 TeamBased = false
  606.                 teambasedstatus.Text = "Team Based: "..tostring(TeamBased)
  607.             else
  608.                 TeamBased = true
  609.                 teambasedstatus.Text = "Team Based: "..tostring(TeamBased)
  610.             end
  611.         elseif a == "b" and uis:IsKeyDown(Enum.KeyCode.LeftControl) and uis:IsKeyDown(Enum.KeyCode.R) then
  612.             ballisticsboost = 0
  613.         elseif a == aimkey then
  614.             if not aimatpart then
  615.                 local maxangle = math.rad(20)
  616.                 for i, plr in pairs(plrs:GetChildren()) do
  617.                     if plr.Name ~= lplr.Name and plr.Character and plr.Character.Head and plr.Character.Humanoid and plr.Character.Humanoid.Health > 1 then
  618.                         if TeamBased == true then
  619.                             if plr.Team.Name ~= lplr.Team.Name then
  620.                                 local an = checkfov(plr.Character.Head)
  621.                                 if an < maxangle then
  622.                                     maxangle = an
  623.                                     aimatpart = plr.Character.Head
  624.                                 end
  625.                             end
  626.                         else
  627.                             local an = checkfov(plr.Character.Head)
  628.                                 if an < maxangle then
  629.                                     maxangle = an
  630.                                     aimatpart = plr.Character.Head
  631.                                 end
  632.                                 --print(plr)
  633.                         end
  634.                         local old = aimatpart
  635.                         plr.Character.Humanoid.Died:Connect(function()
  636.                             --print("died")
  637.                             if aimatpart and aimatpart == old then
  638.                                 aimatpart = nil
  639.                             end
  640.                         end)
  641.                        
  642.                     end
  643.                 end
  644.             else
  645.                 aimatpart = nil
  646.                 canaimat = false
  647.                 delay(1.1, function()
  648.                     canaimat = true
  649.                 end)
  650.             end
  651.         end
  652.     end)
  653.    
  654.     function getfovxyz (p0, p1, deg)
  655.         local x1, y1, z1 = p0:ToOrientation()
  656.         local cf = CFrame.new(p0.p, p1.p)
  657.         local x2, y2, z2 = cf:ToOrientation()
  658.         local d = math.deg
  659.         if deg then
  660.             return Vector3.new(d(x1-x2), d(y1-y2), d(z1-z2))
  661.         else
  662.             return Vector3.new((x1-x2), (y1-y2), (z1-z2))
  663.         end
  664.     end
  665.    
  666.    
  667.     function aimat(part)
  668.         if part then
  669.             --print(part)
  670.             local d = (cam.CFrame.p - part.CFrame.p).magnitude
  671.             local calculatedrop
  672.             local timetoaim = 0
  673.             local pos2 = Vector3.new()
  674.             if movementcounting == true then
  675.                 timetoaim = d/bspeed
  676.                 pos2 = part.Velocity * timetoaim
  677.             end
  678.             local minuseddrop = (ballisticsboost+50)/50
  679.             if ballisticsboost ~= 0 then
  680.                 calculatedrop = d - (d/minuseddrop)
  681.                
  682.             else
  683.                 calculatedrop = 0
  684.             end
  685.             --print(calculatedrop)
  686.             local addative = Vector3.new()
  687.             if movementcounting then
  688.                 addative = pos2
  689.             end
  690.             local cf = CFrame.new(cam.CFrame.p, (addative + part.CFrame.p+ Vector3.new(0, calculatedrop, 0)))
  691.             if aimbothider == true or Aim_Assist == true then
  692.                 cam.CFrame = cam.CFrame:Lerp(cf, aimbothiderspeed)
  693.             else
  694.                
  695.                 cam.CFrame = cf
  696.             end
  697.             --print(cf)
  698.         end
  699.     end
  700.     function checkfov (part)
  701.         local fov = getfovxyz(game.Workspace.CurrentCamera.CFrame, part.CFrame)
  702.         local angle = math.abs(fov.X) + math.abs(fov.Y)
  703.         return angle
  704.     end
  705.     pcall(function()
  706.         delay(0, function()
  707.             while wait(.32) do
  708.                 if Aim_Assist and not aimatpart and canaimat and lplr.Character and lplr.Character.Humanoid and lplr.Character.Humanoid.Health > 0 then
  709.                     for i, plr in pairs(plrs:GetChildren()) do
  710.                        
  711.                        
  712.                             local minangle = math.rad(5.5)
  713.                             local lastpart = nil
  714.                             local function gg(plr)
  715.                                 pcall(function()
  716.                                 if plr.Name ~= lplr.Name and plr.Character and plr.Character.Humanoid and plr.Character.Humanoid.Health > 0 and plr.Character.Head then
  717.                                     local raycasted = false
  718.                                     local cf1 = CFrame.new(cam.CFrame.p, plr.Character.Head.CFrame.p) * CFrame.new(0, 0, -4)
  719.                                     local r1 = Ray.new(cf1.p, cf1.LookVector * 9000)
  720.                                     local obj, pos = game.Workspace:FindPartOnRayWithIgnoreList(r1,  {lplr.Character.Head})
  721.                                     local dist = (plr.Character.Head.CFrame.p- pos).magnitude
  722.                                     if dist < 4 then
  723.                                         raycasted = true
  724.                                     end
  725.                                     if raycasted == true then
  726.                                         local an1 = getfovxyz(cam.CFrame, plr.Character.Head.CFrame)
  727.                                         local an = abs(an1.X) + abs(an1.Y)
  728.                                         if an < minangle then
  729.                                             minangle = an
  730.                                             lastpart = plr.Character.Head
  731.                                         end
  732.                                     end
  733.                                 end
  734.                                 end)
  735.                             end
  736.                             if TeamBased then
  737.                                 if plr.Team.Name ~= lplr.Team.Name then
  738.                                     gg(plr)
  739.                                 end
  740.                             else
  741.                                 gg(plr)
  742.                             end
  743.                             --print(math.deg(minangle))
  744.                             if lastpart then
  745.                                 aimatpart = lastpart
  746.                                 aimatpart.Parent.Humanoid.Died:Connect(function()
  747.                                     if aimatpart == lastpart then
  748.                                         aimatpart = nil
  749.                                     end
  750.                                 end)
  751.                            
  752.                         end
  753.                     end
  754.                 end
  755.             end
  756.         end)
  757.     end)
  758.     local oldheadpos
  759.     local lastaimapart
  760.     game:GetService("RunService").RenderStepped:Connect(function(dt)
  761.         if uis:IsKeyDown(Enum.KeyCode.RightBracket) or uis:IsKeyDown(Enum.KeyCode.LeftBracket) then
  762.             if upping then
  763.                 ballisticsboost = ballisticsboost + dt/1.9
  764.             elseif downing then
  765.                 ballisticsboost = ballisticsboost - dt/1.9
  766.             end
  767.         end
  768.         if movementcounting then
  769.             st1_2.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
  770.             st1_2.Text = "Current ballistics: "..tostring(math.floor(ballisticsboost*10)/10)
  771.         else
  772.             st1_2.TextColor3 = Color3.new(1,0,0)
  773.         end
  774.         espstatustext.Text = "Esp loop :"..tostring(autoesp)
  775.         if aimatpart and lplr.Character and lplr.Character.Head then
  776.             if BetterDeathCount and lastaimapart and lastaimapart == aimatpart then
  777.                 local dist = (oldheadpos - aimatpart.CFrame.p).magnitude
  778.                 if dist > 40 then
  779.                     aimatpart = nil
  780.                 end
  781.             end
  782.             lastaimapart = aimatpart
  783.             oldheadpos = lastaimapart.CFrame.p
  784.             do
  785.                 if aimatpart.Parent == plrs.LocalPlayer.Character then
  786.                     aimatpart = nil
  787.                 end
  788.                 aimat(aimatpart)
  789.                 pcall(function()
  790.                     if Aim_Assist == true then
  791.                         local cf1 = CFrame.new(cam.CFrame.p, aimatpart.CFrame.p) * CFrame.new(0, 0, -4)
  792.                         local r1 = Ray.new(cf1.p, cf1.LookVector * 1000)
  793.                         local obj, pos = game.Workspace:FindPartOnRayWithIgnoreList(r1,  {lplr.Character.Head})
  794.                         local dist = (aimatpart.CFrame.p- pos).magnitude
  795.                         if obj then
  796.                             --print(obj:GetFullName())
  797.                         end
  798.                         if not obj or dist > 6 then
  799.                             aimatpart = nil
  800.                             --print("ooof")
  801.                         end
  802.                         canaimat = false
  803.                         delay(.5, function()
  804.                             canaimat = true
  805.                         end)
  806.                     end
  807.                 end)
  808.             end
  809.            
  810.            
  811.            
  812.         end
  813.     end)
  814.    
  815.    
  816.     delay(0, function()
  817.         while wait(espupdatetime) do
  818.             if autoesp == true then
  819.                 pcall(function()
  820.                 f.addesp()
  821.                 end)
  822.             end
  823.         end
  824.     end)
  825.     --warn("loaded")
  826.     end)
  827.    
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement