Advertisement
The_One123

Untitled

Oct 11th, 2019
1,239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 31.42 KB | None | 0 0
  1. --| Ace [ Old GS Premium ]
  2. --| Written by Avexus#1866
  3.  
  4. local TweenService = game:GetService("TweenService")
  5. local Insert = table.insert
  6. local V2 = Vector2
  7. local V3 = Vector3
  8. local CF = CFrame
  9. local UD2 = UDim2
  10. local C3 = Color3
  11. local sin = math.sin
  12. local str_match, str_lower = string.match, string.lower
  13. local floor, abs, huge, deg, atan2 = math.floor, math.abs, math.huge, math.deg, math.atan2
  14. local nV = V3.new()
  15.  
  16. Aim = {
  17.     Key = Enum.UserInputType.MouseButton2,
  18.     MouseBased = true,
  19.     AimPart = "Head",
  20.     SuppressShotsWhenNotLockedOn = true,
  21.     AimLock = true,
  22.     TargetMode = "Fov",
  23.     TargetDebounce = 0,
  24.     Toggle = false,
  25.     VelocityCompensation = 0.8,
  26.     DropCompensation = 0.9,
  27.     X_Sensitivity = 0.3,
  28.     Y_Sensitivity = 0.3,
  29.     Wallbang = true,
  30.     Toggled = false,
  31.     FovPx = 300,
  32.     -- Internal, do not touch
  33.     KeyHeld = false,
  34.     AimingIn = false
  35. }
  36.  
  37. Wallbang = {
  38.     Enabled = true,
  39.     MaxWalls = 5,
  40.     MaxStuds = 2.8,
  41.     MaxDist = 500,
  42. }
  43.  
  44. Esp = {
  45.     ShowVisibleOnly = false,
  46. }
  47.  
  48. TriggerBot = {
  49.     Enabled = false,
  50.     MustBeScopedIn = false,
  51.     -- 1/4.5 is average human reaction time.
  52.     Delay = 0.5,
  53.     MaxPxOffset = 2
  54. }
  55.  
  56. Chams = {
  57.     Enabled = true,
  58.     ShowVisibleOnly = false,
  59.     Transparency = 1/3,
  60.     WallbangColor = C3.new(1,1,0),
  61.     VisibleColor = C3.new(0,1,0),
  62.     HiddenColor = C3.new(1,0,0)
  63. }
  64.  
  65. Box = {
  66.     Enabled = true,
  67.     Thickness = 1,
  68.     MaxDistance = 500,
  69.     FadeWithMaxDistance = false,
  70.     ShowVisibleOnly = false,
  71.     WallbangColor = C3.new(1,1,0),
  72.     VisibleColor = C3.new(0,1,0),
  73.     HiddenColor = C3.new(1,1,1)
  74. }
  75.  
  76. Tracers = {
  77.     Enabled = true,
  78.     Thickness = 2,
  79.     MaxDistance = 1000,
  80.     FadeWithMaxDistance = true,
  81.     HighlightVisible = false,
  82.     HighlightColor = C3.new(0,1,0),
  83.     Origin = "Center",
  84. }
  85.  
  86. NameTag = {
  87.     Enabled = true
  88. }
  89.  
  90. Wallhack = {
  91.     Enabled = true,
  92.     PerformanceMode = false, -- Slows updating slightly, but increases performance.
  93. }
  94.  
  95. Gun = {
  96.     Esp = true,
  97.     MaxDistance = 50, -- for esp.
  98.     BulletSpeed = 2650,
  99. }
  100.  
  101. Miscellanous = {
  102.     HideArms = false,
  103.     Fullbright = false,
  104.     RemoveSky = true
  105. }
  106.  
  107. local UseDistance = str_lower(Aim.TargetMode) == "distance"
  108.  
  109. local StoredPlayers
  110. local StoredCharacters
  111. local Running = false
  112.  
  113. local Players = game:GetService("Players")
  114. local RunService = game:GetService("RunService")
  115. local InputService = game:GetService("UserInputService")
  116. local Lighting = game:GetService("Lighting")
  117. local PlayerList = {
  118.     GetPlayers = function(self, EnemiesOnly)
  119.         local PlayersVar = {}
  120.        
  121.         for Key, Value in next, self do
  122.             if type(Value) ~= "function" and Key ~= Players.LocalPlayer.Name then
  123.                 if EnemiesOnly and Client.Player.TeamColor ~= self[Key].Player.TeamColor then
  124.                     Insert(PlayersVar, Value)
  125.                 else
  126.                     Insert(PlayersVar, Value)
  127.                 end
  128.             end
  129.         end
  130.            
  131.         return PlayersVar
  132.     end,
  133.     GetCharacters = function(self, EnemiesOnly)
  134.         local Characters = {}
  135.        
  136.         for _, Player in next, StoredPlayers do
  137.             if (EnemiesOnly and Player.IsEnemy) or not EnemiesOnly then
  138.                 local Character = Player.Character
  139.                 if Character then
  140.                     Insert(Characters, Player.Character)
  141.                 end
  142.             end
  143.         end
  144.         return Characters
  145.     end
  146. }
  147.  
  148. local PlayerGui = Players.LocalPlayer:WaitForChild("PlayerGui")
  149. local CoreGui = game.CoreGui
  150. local Camera = workspace.CurrentCamera
  151. local Mouse = Players.LocalPlayer:GetMouse()
  152. local SpawnPoint = workspace.Lobby.Spawn1
  153.  
  154. local WindowFocused = true
  155. local Aiming = false
  156. local AimTarget = nil
  157.  
  158. local CurrentDebounce = Aim.TargetDebounce
  159. local CalculateTrajectory = loadstring(game:HttpGet("https://pastebin.com/raw/2JQ2Hbwe", true))()
  160.  
  161. local BaseLine = Instance.new("Frame")
  162. BaseLine.Name = "BaseLine"
  163. BaseLine.BorderSizePixel = 0
  164. BaseLine.BorderColor3 = C3.new()
  165.  
  166. local function RandomCharGenerator(Length)
  167.     local tb = {}
  168.     for i = 1, Length do
  169.         tb[i] = string.char(math.random(0, 100))
  170.     end
  171.     return table.concat(tb)
  172. end
  173.  
  174. local Ace = Instance.new("ScreenGui", CoreGui)
  175. Ace.Name = RandomCharGenerator(20)
  176. print(Ace.Name)
  177.  
  178. local VPAce = Ace:Clone()
  179. VPAce.IgnoreGuiInset = true
  180. VPAce.Parent = CoreGui
  181.  
  182. local Notice = Instance.new("TextLabel")
  183. Notice.Text = "NOTICE:\nThis script was written by AvexusDev.\nAnyone else who claims credit is lying and attempting to steal my work.\n\nIf you'd like to donate or contact me,\nopen the developer console with F9.\nIf you encounter any severe bugs, try pressing End, tabbing out and tabbing back in.\n\nThanks for using my script, and happy fragging!\n\nThis closes automatically in 10 seconds."
  184. Notice.BackgroundTransparency = 1/4
  185. Notice.BackgroundColor3 = C3.new()
  186. Notice.TextColor3 = C3.new(1, 1, 1)
  187. Notice.Size = UD2.new(1, 0, 1, 0)
  188. Notice.Font = Enum.Font.Gotham
  189. Notice.TextSize = 32
  190. Notice.ZIndex = huge
  191. Notice.Parent = Ace
  192.  
  193. delay(10, function() Notice:Destroy() end)
  194.  
  195. local StartUp_Sound = Instance.new("Sound", Camera)
  196. StartUp_Sound.SoundId = "rbxassetid://2668759868"
  197.  
  198. local LockOn_Sound = Instance.new("Sound", Camera)
  199. LockOn_Sound.SoundId = "rbxassetid://538769304"
  200. LockOn_Sound.Volume = 1/4
  201.  
  202. local Weapons = {
  203.     ["Assault Rifle"] = {"AK12", "AN-94", "AS VAL", "SCAR-L", "AUG A1", "M16A4", "G36", "M16A3",
  204.      "AUG A2", "FAMAS", "AK47", "AUG A3", "L85A2", "HK416", "AK74", "AKM", "AK103", "M231"},
  205.     ["Battle Rifle"] = {"BEOWULF ECR", "SCAR-H", "AK12BR", "G3", "AG-3", "HENRY 45-70", "FAL 50.00"},
  206.     ["Carbine"] = {"M4A1", "G36C", "M4", "L22", "SCAR PDW", "AKU12", "GROZA-1", "AK12C", "HONEY BADGER",
  207.      "SR-3M", "GROZA-4", "MC51SD", "FAL 50.63 PARA", "1858 CARBINE", "AK105"},
  208.     ["Shotgun"] = {"KSG 12", "REMINGTON 870", "DBV12", "KS-23M", "SAIGA-12", "STEVENS DB", "AA-12", "SPAS-12"},
  209.     ["PDW"] = {"MP5K", "UMP45", "MP7", "MAC10", "P90", "MP5", "COLT SMG 635", "L2A3", "MP5SD", "MP10", "M3A1",
  210.      "MP5/10", "AUG A3 PARA", "PPSH-41", "FAL PARA SHORTY", "KRISS VECTOR", "MP40"},
  211.     ["DMR"] = {"MK11", "SKS", "VSS VINTOREZ", "MSG90", "BEOWULF TCR", "SA58 SPR", "SCAR SSR"},
  212.     ["LMG"] = {"COLT LMG", "M60", "AUG HBAR", "MG36", "RPK12", "L86 LSW", "RPK", "HK21", "SCAR HAMR", "RPK74",
  213.      "MG3KWS"},
  214.     ["Sniper Rifle"] = {"INTERVENTION", "REMINGTON 700", "DRAGUNOV SVU", "AWS", "BFG 50", "L115A3", "MOSIN NAGANT",
  215.      "DRAGUNOV SVDS", "HECATE II", "STEYR SCOUT"},
  216.    
  217.     GetWeapons = function(self)
  218.         local tables = {}
  219.         for avexisarealgamer, donttrytostealmyscriptpls in next, self do
  220.             if typeof(donttrytostealmyscriptpls) == "table" then
  221.                 Insert(tables, {avexisarealgamer, donttrytostealmyscriptpls})
  222.             end
  223.         end
  224.         return tables
  225.     end
  226. }
  227.  
  228. local whydidimakeafunction = Weapons:GetWeapons()
  229. local function Rainbow() return C3.fromHSV(sin((tick() / 3) % 1), 0.5, 1) end
  230.  
  231. local Folders = {
  232.     ["Chams"] = Instance.new("Folder"),
  233.     ["Tracers"] = Instance.new("Folder"),
  234.     ["Boxes"] = Instance.new("Folder")
  235. }
  236.  
  237. for Name, Folder in next, Folders do
  238.     Folder.Name = Name
  239.     Folder.Parent = Ace
  240. end
  241.  
  242. Folders.Rods = Instance.new("Folder", workspace)
  243. Folders.Rods.Name = "Rods"
  244.  
  245. Folders.Boxes.Parent = workspace
  246.  
  247. local DeadBody = workspace:WaitForChild("DeadBody")
  248. local GunDrop = workspace:WaitForChild("Ignore").GunDrop
  249.  
  250. local SampleInfo = Instance.new("TextLabel")
  251. SampleInfo.BackgroundTransparency = 1
  252. SampleInfo.Size = UD2.new(1, 0, 1/6, 0)
  253. SampleInfo.Font = Enum.Font.Gotham
  254. SampleInfo.TextScaled = true
  255. SampleInfo.TextStrokeTransparency = 3/4
  256. SampleInfo.TextColor3 = C3.new(1,1,1)
  257. SampleInfo.TextTransparency = 0
  258.  
  259. local TopRight = SampleInfo:Clone()
  260. TopRight.TextXAlignment = Enum.TextXAlignment.Right
  261. TopRight.TextYAlignment = Enum.TextYAlignment.Top
  262. TopRight.Text = "GameSense 2.0 by AvexusDev\nLast updated 10/07/19"
  263. TopRight.TextScaled = false
  264. TopRight.TextSize = 16
  265. TopRight.Position = UD2.new(0, -8, 0, 8)
  266. TopRight.Parent = Ace
  267.  
  268. local FovCircle = Instance.new("ImageLabel", Ace)
  269. FovCircle.AnchorPoint = V2.new(0.5, 0.5)
  270. FovCircle.BackgroundTransparency = 1
  271. FovCircle.Position = UD2.new(0.5, 0, 0.5, 0)
  272. FovCircle.Size = UD2.new(0, Aim.FovPx * 2, 0, Aim.FovPx * 2)
  273. FovCircle.Image = "rbxassetid://3260808247"
  274. FovCircle.ImageTransparency = 0.8
  275.  
  276. local AimPoint = Instance.new("Frame", Ace)
  277. AimPoint.Name = "AimPoint"
  278. AimPoint.BackgroundColor3 = C3.new(1,1,1)
  279. AimPoint.Size = UD2.new(0, 4, 0, 4)
  280. AimPoint.AnchorPoint = V2.new(0.5, 0.5)
  281.  
  282. local PercentMatch = Instance.new("TextLabel", AimPoint)
  283. PercentMatch.Name = "PercentMatch"
  284. PercentMatch.AnchorPoint = V2.new(0.5, 1)
  285. PercentMatch.TextColor3 = C3.new(1,1,1)
  286. PercentMatch.Font = Enum.Font.GothamBlack
  287. PercentMatch.Text = "undefined"
  288. PercentMatch.TextSize = 10
  289. PercentMatch.TextStrokeTransparency = 0.75
  290. PercentMatch.BackgroundTransparency = 1
  291. PercentMatch.Size = UD2.new(0, 20, 0, 10)
  292. PercentMatch.Position = UD2.new(0.5, 0, -1, 0)
  293.  
  294. local ViewportFrame = Instance.new("ViewportFrame", VPAce)
  295. ViewportFrame.Size = UDim2.new(1, 0, 1, 0)
  296. ViewportFrame.CurrentCamera = workspace.CurrentCamera
  297. ViewportFrame.BackgroundTransparency = 1
  298. ViewportFrame.ImageTransparency = 1/4
  299.  
  300. local omg = Instance.new("BoolValue", Players.LocalPlayer)
  301. omg.Name = "epic"
  302.  
  303. local epics = 0
  304. for _, v in next, Players.LocalPlayer:GetChildren() do
  305.     if (v:IsA("BoolValue") and v.Name == "epic") then
  306.         epics = epics + 1
  307.     end
  308. end
  309.  
  310. local function Fullbright()
  311.     Lighting.GlobalShadows = false
  312.     Lighting.Brightness = 0.5
  313.     Lighting.OutdoorAmbient = C3.new(1, 1, 1)
  314.     Lighting.Ambient = C3.new(1, 1, 1)
  315.  
  316.     Lighting.MapLighting:WaitForChild("Ambient").Value = C3.new(1, 1, 1)
  317.     Lighting.MapLighting:WaitForChild("OutdoorAmbient").Value = C3.new(1, 1, 1)
  318.  
  319.     -- You don't need light sources if you have fullbright on.
  320.     for _, v in next, workspace:GetDescendants() do
  321.         if v:IsA("Light") then
  322.             v:Destroy()
  323.         end
  324.     end
  325. end
  326.  
  327. if Miscellanous.Fullbright then
  328.     Fullbright()
  329. end
  330.  
  331. if Miscellanous.RemoveSky then
  332.     Lighting.ClockTime = 0
  333.     Instance.new("Sky", Lighting).CelestialBodiesShown = false
  334. end
  335.  
  336. if Miscellanous.HideArms then
  337.     workspace.CurrentCamera.ChildAdded:Connect(function(Child)
  338.         if str_match(Child.Name, "Arm") then
  339.             Child:Destroy()
  340.         end
  341.     end)
  342. end
  343.  
  344. local MouseClick = function()
  345.     if not RunService:IsStudio() then
  346.         mouse1press()
  347.         RunService.RenderStepped:Wait()
  348.         mouse1release()
  349.     else
  350.         warn("Cannot force a Mouse Click in Studio.")
  351.     end
  352. end
  353.  
  354. local ShowUIElement = function(Element, Enabled)
  355.     Element.Visible = Enabled
  356.     for _, v in next, Element:GetDescendants() do
  357.         v.Visible = Enabled
  358.     end
  359. end
  360.  
  361. local ClearTable = function(Table, IsObject)
  362.     for k, v in next, Table do
  363.         if IsObject then
  364.             v:Destroy()
  365.         end
  366.         Table[k] = nil
  367.     end
  368. end
  369.  
  370. local FindNumbers = function(String)
  371.     String = String.gsub(string, ",", "")
  372.     return tonumber(String)
  373. end
  374.  
  375. SetUp = function(Player)
  376.     local Data = {}
  377.     local Rod
  378.    
  379.     Data.Name = Player.Name
  380.     Data.Player = Player
  381.     Data.Character = Player.Character or Player.CharacterAdded:Wait()
  382.     Data.IsEnemy = Player.TeamColor ~= Players.LocalPlayer.TeamColor
  383.     Data.Limbs = {}
  384.     Data.Chams = {}
  385.     Data.ObscuringParts = {}
  386.     Data.Tracer = nil
  387.     Data.BoundingBox = nil
  388.     Data.Wallhack = nil
  389.     Data.Visible = true
  390.     Data.OnScreen = false
  391.     Data.Wallbangable = false
  392.     Data.Spawned = false
  393.     Data.Distance = 0
  394.    
  395.     for _, Limb in next, Data.Character:GetChildren() do
  396.         if Limb:IsA("BasePart") then
  397.             Data.Limbs[Limb.Name] = Limb
  398.         end
  399.     end
  400.    
  401.     Data.GetGun = function(self)
  402.         if Data.Spawned and Data.Character then
  403.             local Gun
  404.             for _, t in next, whydidimakeafunction do
  405.                 for i, _ in next, t[2] do
  406.                     local gun = t[2][i]
  407.                     local model = Data.Character:FindFirstChildOfClass("Model")
  408.                     if model then
  409.                         Gun = (model.Name == gun and gun) or nil
  410.                     end
  411.                     if (Gun ~= nil) then
  412.                         return Gun
  413.                     end
  414.                 end
  415.             end
  416.         end
  417.     end
  418.    
  419.     Data.DoChams = function(Enabled)
  420.         ClearTable(Data.Chams, true)
  421.        
  422.         if Enabled then
  423.             local Visible = Data:IsVisible()
  424.             for _, Limb in next, Data.Limbs do
  425.                 if Limb.Name ~= "HumanoidRootPart" then
  426.                     local Cham = Instance.new("BoxHandleAdornment")
  427.                     local IsHead = Limb.Name == "Head"
  428.                     Cham.Name = Data.Name.." "..Limb.Name
  429.                     Cham.Adornee = Limb
  430.                     Cham.AlwaysOnTop = true
  431.                     Cham.Transparency = Chams.Transparency
  432.                     Cham.Size = V3.new(IsHead and Limb.Size.Z or Limb.Size.X, Limb.Size.Y, Limb.Size.Z)
  433.                     Cham.Color3 = Visible and Chams.VisibleColor or Chams.HiddenColor
  434.                     Cham.ZIndex = 1
  435.                     Insert(Data.Chams, Cham)
  436.                     Cham.Parent = Folders.Chams
  437.                 end
  438.             end
  439.         else
  440.             for _, Cham in next, Data.Chams do
  441.                 Cham:Destroy()
  442.             end
  443.             for _, Cham in next, Folders.Chams:GetChildren() do
  444.                 if str_match(Cham.Name, Data.Name) then
  445.                     Cham:Destroy()
  446.                 end
  447.             end
  448.         end
  449.     end
  450.    
  451.     Data.DoNameTag = function(Enabled)
  452.         if Enabled then
  453.             local BillboardGui = Instance.new("BillboardGui")
  454.             BillboardGui.Name = "NameTag"
  455.             BillboardGui.ExtentsOffset = V3.new(0, 1.25, 0)
  456.             BillboardGui.LightInfluence = 0
  457.             BillboardGui.SizeOffset = V2.new(0, 0.5)
  458.             BillboardGui.Size = UD2.new(5, 50, 2, 50)
  459.             BillboardGui.AlwaysOnTop = true
  460.            
  461.             local ListLayout = Instance.new("UIListLayout", BillboardGui)
  462.             ListLayout.FillDirection = Enum.FillDirection.Vertical
  463.             ListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  464.             ListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  465.             ListLayout.VerticalAlignment = Enum.VerticalAlignment.Bottom
  466.            
  467.             local Arrow = SampleInfo:Clone()
  468.             Arrow.LayoutOrder = 100
  469.             Arrow.Name = "Arrow"
  470.             Arrow.Text = "  ▼"
  471.             Arrow.Parent = BillboardGui
  472.            
  473.             local Distance = SampleInfo:Clone()
  474.             Distance.LayoutOrder = 50
  475.             Distance.Name = "Distance"
  476.             Distance.Text = "undefined"
  477.             Distance.Parent = BillboardGui
  478.            
  479.             --[[
  480.             local EquippedGun = SampleInfo:Clone()
  481.             EquippedGun.LayoutOrder = 25
  482.             EquippedGun.Name = "EquippedGun"
  483.             EquippedGun.Text = "..?"
  484.  
  485.             spawn(function()
  486.                 local Gun
  487.                 while Data and (not Gun) do
  488.                     Gun = Data:GetGun()
  489.                     wait(0.5)
  490.                 end
  491.                 EquippedGun.Text = Gun
  492.             end)
  493.            
  494.             EquippedGun.Parent = BillboardGui
  495.             ]]
  496.            
  497.             local NameTag = SampleInfo:Clone()
  498.             NameTag.LayoutOrder = 0
  499.             NameTag.Name = "NameTag"
  500.             NameTag.Text = Data.Name
  501.             NameTag.Font = Enum.Font.GothamBold
  502.             NameTag.TextStrokeTransparency = 2/3
  503.             NameTag.Parent = BillboardGui
  504.            
  505.             Data.NameTag = BillboardGui
  506.             Data.NameTag.Parent = Data.Character
  507.         else
  508.             if Data.NameTag then
  509.                 Data.NameTag:Destroy()
  510.             elseif StoredCharacters ~= nil then
  511.                 for n, v in next, StoredCharacters do
  512.                     if n == Data.Name and v:FindFirstChild("NameTag") then
  513.                         v:Destroy()
  514.                     end
  515.                 end
  516.             end
  517.         end
  518.     end
  519.    
  520.     Data.DoBox = function(Enabled)
  521.         local AdorneePart = Data.Limbs["Torso"]
  522.        
  523.         if Enabled and AdorneePart then
  524.             local Thiccness = Box.Thickness
  525.            
  526.             local BillboardGui = Instance.new("BillboardGui")
  527.             BillboardGui.Name = Data.Name
  528.             BillboardGui.Adornee = AdorneePart
  529.             BillboardGui.AlwaysOnTop = true
  530.             BillboardGui.Size = UD2.new(5.5, 0, 5.5, 0)
  531.            
  532.             local Frame = Instance.new("Frame", BillboardGui)
  533.             Frame.BackgroundTransparency = 0.75
  534.             Frame.Size = UD2.new(1, 0, 1, 0)
  535.            
  536.             local Top = Instance.new("Frame", Frame)
  537.             Top.Name = "Top"
  538.             Top.Size = UD2.new(1, 0, 0, Thiccness)
  539.             Top.BackgroundColor3 = C3.new(1,1,1)
  540.             Top.BorderSizePixel = 0
  541.            
  542.             local Bottom = Top:Clone()
  543.             Bottom.Name = "Bottom"
  544.             Bottom.AnchorPoint = V2.new(0, 1)
  545.             Bottom.Position = UD2.new(0, 0, 1, 0)
  546.             Bottom.Parent = Frame
  547.            
  548.             local Left = Top:Clone()
  549.             Left.Name = "Left"
  550.             Left.Size = UD2.new(0, Thiccness, 1, 0)
  551.             Left.Parent = Frame
  552.            
  553.             local Right = Left:Clone()
  554.             Right.Name = "Right"
  555.             Right.AnchorPoint = V2.new(1, 0)
  556.             Right.Position = UD2.new(1, 0, 0, 0)
  557.             Right.Parent = Frame           
  558.            
  559.             BillboardGui.Parent = Folders.Boxes
  560.             Data.BoundingBox = BillboardGui
  561.         elseif not Enabled then
  562.             if Data.BoundingBox then
  563.                 Data.BoundingBox:Destroy()
  564.             else
  565.                 for _, v in next, Folders.Boxes:GetChildren() do
  566.                     if str_match(v.Name, Data.Name) then
  567.                         v:Destroy()
  568.                     end
  569.                 end
  570.             end
  571.         end
  572.     end
  573.    
  574.     Data.IsVisible = function(Simple, DisregardOnScreen)
  575.         local Visible = false
  576.         local ScreenPoint
  577.         if Data and Data.Spawned and Data.Limbs.Head then
  578.             local ObscuringParts = Data.ObscuringParts
  579.             local ScreenPoint, OnScreen = Camera:WorldToScreenPoint(Data.Limbs.Head.Position)
  580.             Data.OnScreen = OnScreen
  581.            
  582.             if OnScreen or DisregardOnScreen then
  583.                 if Simple then
  584.                     Visible = #ObscuringParts < 1
  585.                 else
  586.                     Visible = true
  587.                     for _, Part in next, ObscuringParts do
  588.                         if Part.Transparency == 0 then
  589.                             Visible = false
  590.                         end
  591.                     end
  592.                 end
  593.             end
  594.         end
  595.         return Visible, ScreenPoint
  596.     end
  597.    
  598.     Data.IsWallbangable = function()
  599.         local Wallbangable = false
  600.         local AimPart = Data.Limbs[Aim.AimPart]
  601.         local ObscuringParts = Data.ObscuringParts
  602.        
  603.         if AimPart then            
  604.             local Studsbanged = V3.new(0, 0, 0)
  605.             local Wallsbanged = #ObscuringParts
  606.            
  607.             if Wallsbanged < Wallbang.MaxWalls  then
  608.                 for _, Part in next, ObscuringParts do
  609.                     if (Part.Transparency == 0) then
  610.                         local Size = Part.Size
  611.                         Studsbanged = V3.new(Studsbanged.X + Size.X, Studsbanged.Y + Size.Y, Studsbanged.Y + Size.Z)
  612.                     end
  613.                 end
  614.                 if (Studsbanged.X <= Wallbang.MaxStuds) or (Studsbanged.Y <= Wallbang.MaxStuds) or (Studsbanged.X <= Wallbang.MaxStuds) then
  615.                     Wallbangable = true
  616.                 end
  617.             end
  618.         end
  619.         return Wallbangable
  620.     end
  621.    
  622.     Data.SetColor = function(Color)
  623.         if Chams.Enabled and Data then
  624.             for _, Cham in next, Data.Chams do
  625.                 if Cham:IsA("HandleAdornment") then
  626.                     local ChamHATI = TweenInfo.new(1/15, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
  627.                     local ChamHAT = TweenService:Create(Cham, ChamHATI, {["Color3"] = Color})
  628.                     ChamHAT:Play()
  629.                 end
  630.             end
  631.         end
  632.         --[[
  633.         if BoundingBox then
  634.             for _, BoxPart in next, BoundingBox:GetChildren() do
  635.                 if BoxPart:IsA("GuiObject") then
  636.                     BoxPart.BackgroundColor3 = Color
  637.                 end
  638.             end
  639.         end
  640.         ]]
  641.     end
  642.    
  643.     Data.GetDistance = function()
  644.         local Rod = Folders.Rods:FindFirstChild(Player.Name)
  645.         return Rod and Rod.CurrentDistance or 0
  646.     end
  647.    
  648.     Data.RemoveAllEsp = function()
  649.         Data.DoBox(false)
  650.         Data.DoChams(false)
  651.         Data.DoNameTag(false)
  652.  
  653.         if Data.Tracer then
  654.             Data.Tracer:Destroy()
  655.             Data.Tracer = nil
  656.         end
  657.  
  658.         if Data.Wallhack then
  659.             Data.Wallhack:Destroy()
  660.             Data.Wallhack = nil
  661.         end
  662.     end
  663.    
  664.     Player.CharacterAdded:Connect(function()
  665.         Data = nil
  666.         PlayerList[Player.Name] = SetUp(Player)
  667.     end)
  668.    
  669.     spawn(function()
  670.         while Data do
  671.             if Data.Spawned then
  672.                 local Points = {Camera.CFrame.Position, Data.Limbs.Head.Position}
  673.                 local Ignore = {Camera, Client.Character, Data.Character}
  674.                 Data.ObscuringParts = Camera:GetPartsObscuringTarget(Points, Ignore)
  675.             end
  676.             wait()
  677.         end
  678.     end)
  679.    
  680.     Player:GetPropertyChangedSignal("Team"):Connect(function()
  681.         Data.IsEnemy = Player.TeamColor ~= Players.LocalPlayer.TeamColor
  682.     end)
  683.  
  684.     -- warn("Set up", Data.Name)
  685.     Data.RootPart = Data.Limbs.HumanoidRootPart
  686.     Data:RemoveAllEsp()
  687.     return Data
  688.     end
  689.    
  690. local DrawTracerLine = function(PlayerName, DrawOrigin, EndPoint, Color, Thickness, Transparency)
  691.     if PlayerList[PlayerName] ~= nil then
  692.         local Displacement = (EndPoint - DrawOrigin)
  693.         local Line = Folders.Tracers:FindFirstChild(PlayerName) or BaseLine:Clone()
  694.         Thickness = Thickness or Tracers.Thickness
  695.        
  696.         Line.Name = PlayerName
  697.         Line.BackgroundColor3 = Color
  698.         Line.Size = UD2.new(0, Displacement.Magnitude, 0, Thickness)
  699.         Line.Rotation = deg(atan2(Displacement.Y, Displacement.X))
  700.         Line.AnchorPoint = V2.new(0.5, 0.5)
  701.         Line.BackgroundTransparency = Transparency
  702.         Line.Position = UD2.new(
  703.             0, ((DrawOrigin.X + (Displacement.X / 2))),
  704.             0, ((DrawOrigin.Y + (Displacement.Y / 2)) - 1)
  705.         )
  706.         PlayerList[PlayerName].Tracer = Line
  707.         Line.Parent = Folders.Tracers
  708.     end
  709. end
  710.  
  711. local MouseMove = function(X, Y)
  712.     if not RunService:IsStudio() then
  713.         --mousemoverel((X - Mouse.X) * Aim.X_Sensitivity, (Y - Mouse.Y) * Aim.Y_Sensitivity)
  714.     else
  715.         warn("("..X..", "..Y..")", "Cannot move mouse in Studio.")
  716.     end
  717. end
  718.  
  719. local AimRoutine = function(Position)
  720.     MouseMove(Position.X, Position.Y)
  721. end
  722.  
  723. Client = SetUp(Players.LocalPlayer)
  724. PlayerList[Client.Name] = Client
  725.  
  726. warn("GameSense has initialized.\nWelcome, "..Client.Player.Name.."!\n", "If you like this cheat, I'd really appreciate it if you donated! paypal.me/gamesensedonation :)\n\nHere's my discord: Avexus#1866")
  727. StartUp_Sound:Play()
  728.  
  729. for _, Player in next, Players:GetPlayers() do
  730.     if Player ~= Players.LocalPlayer then
  731.         PlayerList[Player.Name] = SetUp(Player)
  732.     end
  733. end
  734.  
  735. Players.PlayerAdded:Connect(
  736. function(Player)
  737.     PlayerList[Player.Name] = SetUp(Player)
  738. end)
  739.  
  740. Players.PlayerRemoving:Connect(
  741. function(Player)
  742.     PlayerList[Player.Name]:RemoveAllEsp()
  743.     PlayerList[Player.Name] = nil
  744. end)
  745.  
  746. InputService.WindowFocused:Connect(function()
  747.     WindowFocused = true
  748. end)
  749.  
  750. InputService.WindowFocusReleased:Connect(function()
  751.     WindowFocused = false
  752. end)
  753.  
  754. local Steps = 0
  755. local StoredDirection = 0
  756. local PercentMatchNum = 0
  757.  
  758. local MouseFreed = Enum.MouseBehavior.Default
  759. local MouseLocked = Enum.MouseBehavior.LockCurrentPosition
  760.  
  761. local function MainFunction()
  762.     if (WindowFocused and Running) then
  763.         Steps = Steps + 1
  764.         local Rainbow = Rainbow()
  765.         local Min = huge
  766.         local OnDebounce = CurrentDebounce > 0
  767.         local NumVisPlrs = 0
  768.    
  769.         local AimPart = AimTarget and AimTarget.Limbs[Aim.AimPart]
  770.  
  771.         AimTarget = (Aim.AimLock) and AimTarget or nil
  772.        
  773.         for _, Player in next, StoredPlayers do
  774.             if Player.IsEnemy then
  775.                 local Character = Player.Character
  776.                 local FakeCharacter = ViewportFrame:FindFirstChild(Character.Name)
  777.                 local IsVisible = Player:IsVisible()
  778.                 local IsWallbangable = Wallbang.Enabled and (Player.Distance < Wallbang.MaxDist) and (Player:IsWallbangable())
  779.                 local Head = Player.Limbs["Head"]
  780.                 local Part = Player.Limbs[Aim.AimPart]
  781.                 local HeadScreenPos = Head and Camera:WorldToScreenPoint(Head.Position + V3.new(0, -4.5, 0))
  782.                 Player.Distance = huge
  783.  
  784.                 if (Player ~= Client and Client.RootPart and Player.RootPart) then
  785.                     Player.Distance = (Players.LocalPlayer.Character.HumanoidRootPart.Position - Player.RootPart.Position).Magnitude
  786.                 end
  787.                
  788.                 -- Universal ESP Handler
  789.                 if (Steps % 20) == 0 then
  790.                     if (not Player.Spawned) and Player.RootPart and (SpawnPoint.Position - Player.RootPart.Position).Magnitude > 50 then
  791.                         Player.Spawned = true
  792.  
  793.                         if Player ~= Client and Player.IsEnemy then
  794.                             local EspVisibleOnly = Esp.ShowVisibleOnly and Player.Visible
  795.                             local ChamsVisibleOnly = Chams.ShowVisibleOnly and Player.Visible
  796.                             local BoxVisibleOnly = Box.ShowVisibleOnly and Player.Visible
  797.                             if Chams.Enabled then
  798.                                 if ChamsVisibleOnly or not Chams.ShowVisibleOnly then
  799.                                     Player.DoChams(true)
  800.                                 end
  801.                             end
  802.                             if Box.Enabled then
  803.                                 if BoxVisibleOnly or not Box.ShowVisibleOnly then
  804.                                     Player.DoBox(true)
  805.                                 end
  806.                             end
  807.                             if NameTag.Enabled then
  808.                                 Player.DoNameTag(true)
  809.                             end
  810.                         elseif Player == Client then
  811.                             Fullbright()
  812.                         end
  813.                     end
  814.                     if Player.Spawned then
  815.                         if Player.NameTag:FindFirstChild("Distance") then
  816.                             Player.NameTag.Distance.Text = tostring(floor(Player.Distance)).."s"
  817.                         end
  818.    
  819.                         if (SpawnPoint.Position - Player.RootPart.Position).Magnitude < 100 then
  820.                             Player.Spawned = false
  821.                             Player:RemoveAllEsp()
  822.                         end
  823.                     end
  824.                 end
  825.                
  826.                 -- Tracers
  827.                 if (Player.Spawned and Tracers.Enabled and HeadScreenPos and HeadScreenPos.Z > 0) then
  828.                     DrawTracerLine(
  829.                         Player.Name,
  830.                         V2.new(Camera.ViewportSize.X * 0.5, Camera.ViewportSize.Y),
  831.                         V2.new(HeadScreenPos.X, HeadScreenPos.Y),
  832.                         C3.new(1,1,1),
  833.                         Tracers.Thickness,
  834.                         Tracers.FadeWithMaxDistance and Player.Distance / Tracers.MaxDistance or 0
  835.                     )
  836.                 elseif Player.Tracer then
  837.                     Player.Tracer:Destroy()
  838.                 end
  839.                
  840.                 -- Chams
  841.                 if (not Player.Visible and IsVisible) then
  842.                     Player.Visible = true
  843.                     Player.SetColor(Chams.VisibleColor)
  844.                     if Chams.Enabled and Chams.ShowVisibleOnly and #Player.Chams < 1 then
  845.                         Player.DoChams(true)
  846.                     end
  847.                 elseif (not IsVisible and Player) then
  848.                     Player.Visible = false
  849.                    
  850.                     if AimTarget == Player then
  851.                         AimTarget = nil
  852.                     end
  853.                    
  854.                     Player.SetColor(IsWallbangable and Chams.WallbangColor or Chams.HiddenColor)
  855.                 end
  856.                
  857.                 -- Wallhack
  858.                 if Wallhack.Enabled and ((not Wallhack.PerformanceMode) or (Wallhack.PerformanceMode and Steps % 2 == 0)) then
  859.                     if (Character and Player.IsEnemy and Player.OnScreen and not Player.Visible) then
  860.                         if (not Character.Archivable) then
  861.                             Character.Archivable = true
  862.                         end
  863.                        
  864.                         if (FakeCharacter) then
  865.                             for _, Part in next, (FakeCharacter:GetChildren()) do
  866.                                 if (Character:FindFirstChild(Part.Name)) then
  867.                                     if (Part:IsA("Part")) or (Part:IsA("MeshPart")) then
  868.                                         Part.CFrame = (Character:FindFirstChild(Part.Name).CFrame) or CF.new()
  869.                                     end
  870.                                 end
  871.                             end
  872.                         else
  873.                             FakeCharacter = Character:Clone()
  874.                             for _, v in next, FakeCharacter:GetDescendants() do
  875.                                 if v:IsA("BillboardGui") or v:IsA("Model") then
  876.                                     v:Destroy()
  877.                                 end
  878.                             end
  879.                             FakeCharacter.Parent = ViewportFrame
  880.                             Player.Wallhack = FakeCharacter
  881.                         end
  882.                     elseif FakeCharacter then
  883.                         FakeCharacter:Destroy()
  884.                     end
  885.                 end
  886.  
  887.                 if (AimTarget and PlayerList[AimTarget.Name] == nil) then
  888.                     AimTarget = nil
  889.                 end
  890.    
  891.                 -- Aimbot
  892.                 if (not AimTarget) and (Aim.KeyHeld or Aim.Toggled) then
  893.                     StoredDirection = nil
  894.                     local CanTarget = IsVisible or (IsWallbangable and Aim.Wallbang)
  895.                    
  896.                     if (CanTarget and Part) then
  897.                         local Distance = huge
  898.                         if (not UseDistance) then
  899.                             local ScreenPoint, Visible = Camera:WorldToScreenPoint(Part.Position)
  900.                             if Visible then
  901.                                 Distance = (V2.new(Mouse.X, Mouse.Y) - V2.new(ScreenPoint.X, ScreenPoint.Y)).Magnitude
  902.                                 Distance = (Distance <= Aim.FovPx) and Distance or huge
  903.                             end
  904.                         elseif Client.RootPart then
  905.                             local _, Visible = Camera:WorldToScreenPoint(Part.Position)
  906.                             if Visible then
  907.                                 Distance = Player.Distance
  908.                             end
  909.                         end
  910.                         if Distance < Min then
  911.                             Min = Distance
  912.                             AimPart = Part
  913.                             AimTarget = Player
  914.                             --LockOn_Sound:Play()
  915.                         end
  916.                     end
  917.                 end
  918.             end
  919.         end
  920.    
  921.         if (AimTarget and AimPart) and (Aim.KeyHeld or Aim.Toggled) then
  922.             Aiming = true
  923.             local Origin = Camera.CFrame.Position
  924.             local Target = AimPart.Position + (AimTarget.RootPart.Velocity / 16)
  925.  
  926.             if (not StoredDirection or Steps % 3 == 0) then
  927.                 StoredDirection = CalculateTrajectory(Origin, nV, V3.new(0, -196.2, 0), Target, nV, nV, Gun.BulletSpeed)
  928.             end
  929.  
  930.             local PartPos = Camera:WorldToScreenPoint(Target)
  931.             local BallisticPos = Camera:WorldToScreenPoint(Target + StoredDirection)
  932.             local NewPosition = V2.new(PartPos.X, PartPos.Y - abs(PartPos.Y - BallisticPos.Y) * Aim.DropCompensation)
  933.            
  934.             ShowUIElement(AimPoint, true)
  935.             AimPoint.Position = UD2.new(0, NewPosition.X, 0, NewPosition.Y)
  936.             local PxOffset = (V2.new(Mouse.X, Mouse.Y) - V2.new(NewPosition.X, NewPosition.Y)).Magnitude
  937.             PercentMatchNum = floor(PxOffset)
  938.             PercentMatch.Text = PercentMatchNum
  939.            
  940.             if (TriggerBot.Enabled and (PxOffset >= TriggerBot.MaxPxOffset)) then
  941.                 if (TriggerBot.MustBeScopedIn and PlayerGui.MainGui:WaitForChild("ScopeFrame").Visible) or not TriggerBot.MustBeScopedIn then
  942.                     if TriggerBot.Delay > 0 then
  943.                         --delay(TriggerBot.Delay, MouseClick)
  944.                     else
  945.                         --MouseClick()
  946.                     end
  947.                 end
  948.             end
  949.            
  950.             --AimRoutine(NewPosition)
  951.         else
  952.             Aiming = false
  953.             --ShowUIElement(AimPoint, false)
  954.         end
  955.        
  956.         FovCircle.ImageColor3 = Rainbow
  957.         FovCircle.Position = UD2.new(0, Mouse.X, 0, Mouse.Y)
  958.     end
  959. end
  960.  
  961. if Gun.Esp then
  962.     GunDrop.ChildAdded:Connect(function(Child)
  963.         if Child:IsA("Model") and Child.Name == "Dropped" then
  964.             local BillboardGui = Instance.new("BillboardGui")
  965.             BillboardGui.Name = "Tag"
  966.             BillboardGui.ExtentsOffset = V3.new(0, 1.25, 0)
  967.             BillboardGui.LightInfluence = 0
  968.             BillboardGui.SizeOffset = V2.new(0, 0.5)
  969.             BillboardGui.Size = UD2.new(5, 40, 2, 40)
  970.             BillboardGui.MaxDistance = Gun.MaxDistance
  971.             BillboardGui.AlwaysOnTop = true
  972.  
  973.             local ListLayout = Instance.new("UIListLayout", BillboardGui)
  974.             ListLayout.FillDirection = Enum.FillDirection.Vertical
  975.             ListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  976.             ListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  977.             ListLayout.VerticalAlignment = Enum.VerticalAlignment.Bottom
  978.            
  979.             local Arrow = SampleInfo:Clone()
  980.             Arrow.LayoutOrder = 100
  981.             Arrow.Name = "Arrow"
  982.             Arrow.TextTransparency = 1/2
  983.             Arrow.Text = "  ▼"
  984.             Arrow.TextColor3 = C3.new(1, 1, 1)
  985.             Arrow.Parent = BillboardGui
  986.            
  987.             local NameTag = SampleInfo:Clone()
  988.             NameTag.LayoutOrder = 0
  989.             NameTag.Name = "NameTag"
  990.             NameTag.TextTransparency = 0.5
  991.             local StrValue = Child:FindFirstChild("Gun")
  992.             NameTag.Text = (StrValue and StrValue.Value) or "Unknown"
  993.  
  994.             spawn(function()
  995.                 StrValue = Child:WaitForChild("Gun", 2)
  996.                 if StrValue then
  997.                     NameTag.Text = StrValue.Value
  998.                 end
  999.             end)
  1000.  
  1001.             NameTag.Font = Enum.Font.GothamBold
  1002.             NameTag.TextStrokeTransparency = 2/3
  1003.             NameTag.TextColor3 = C3.new(1, 1, 1)
  1004.             NameTag.Parent = BillboardGui
  1005.             BillboardGui.Parent = Child
  1006.         end
  1007.     end)
  1008. end
  1009.  
  1010. InputService.InputBegan:Connect(function(Input)
  1011.     if (Input.KeyCode == Aim.Key or Input.UserInputType == Aim.Key) then
  1012.         if Aim.Toggle then
  1013.             Aim.Toggled = not Aim.Toggled
  1014.         else
  1015.             Aim.KeyHeld = true
  1016.         end
  1017.     elseif (Input.KeyCode == Enum.KeyCode.End) and (epics <= 1) and Running then
  1018.         warn("RELOADING ...")
  1019.         RunService:UnbindFromRenderStep("Cheat")
  1020.         Running = false
  1021.  
  1022.         for n, p in next, StoredPlayers do
  1023.             p:RemoveAllEsp()
  1024.         end
  1025.  
  1026.         VPAce:Destroy()
  1027.         Ace:Destroy()
  1028.  
  1029.         Players.LocalPlayer:FindFirstChild("epic"):Destroy()
  1030.         loadstring(game:HttpGet(('https://pastebin.com/raw/ufnW61UM'),true))()
  1031.     end
  1032. end)
  1033.  
  1034. InputService.InputEnded:Connect(function(Input)
  1035.     if (Input.KeyCode == Aim.Key or Input.UserInputType == Aim.Key) then
  1036.         Aim.KeyHeld = false
  1037.     end
  1038. end)
  1039.  
  1040. local MuzzleVelocityLabel
  1041. local PenetrationDepthLabel
  1042.  
  1043. for _, v in next, PlayerGui:GetChildren() do
  1044.     if v.Name == "ScreenGui" and #v:GetChildren() > 0 then
  1045.         for _, x in next, v:GetDescendants() do
  1046.             if x.Name == "LOL" then
  1047.                 -- i swear PF really needs to learn how to make proper guis
  1048.                 for _, z in next, x.Frame.Frame.Frame:GetChildren() do
  1049.                     if str_match(z.Text, "studs/s") then
  1050.                         z.Name = "MVL"
  1051.                         MuzzleVelocityLabel = z
  1052.                     elseif str_match(z.Text, "studs") and (#z.Text > 12) then
  1053.                         z.Name = "PDL"
  1054.                         PenetrationDepthLabel = z
  1055.                     end
  1056.                 end
  1057.             end
  1058.         end
  1059.     end
  1060. end
  1061.  
  1062. Running = true
  1063. RunService:BindToRenderStep("Cheat", 201, MainFunction)
  1064.  
  1065. spawn(function()
  1066.     while wait(1/2) do
  1067.         Gun.BulletSpeed = (tonumber(str_match(MuzzleVelocityLabel and MuzzleVelocityLabel.Text, "%S+$")) or 2000)
  1068.         Wallbang.MaxStuds = (tonumber(str_match(PenetrationDepthLabel and PenetrationDepthLabel.Text, "%S+$")) or 1.2)
  1069.     end
  1070. end)
  1071.  
  1072. while wait(1/10) do
  1073.     StoredPlayers = PlayerList:GetPlayers()
  1074.     StoredCharacters = PlayerList:GetCharacters()
  1075.     DeadBody:ClearAllChildren()
  1076. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement