Advertisement
Leodu41

Totally not an ESP_Aimbot Universal Undetectalbe Leak For any roblox games

Feb 16th, 2022
1,478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 29.52 KB | None | 0 0
  1.  
  2.  
  3. local UIS = game:GetService('UserInputService')
  4. local RS = game:GetService('RunService')
  5. local Players = game:GetService('Players')
  6. local StarterGui = game:GetService('StarterGui')
  7. local Player = Players.LocalPlayer
  8. local Studio = RS:IsStudio()
  9. local PlayerGui = RS:IsStudio() and Player:WaitForChild('PlayerGui') or game.CoreGui
  10. local Mouse = Player:GetMouse()
  11. local old_icon = Mouse.Icon
  12. local Camera = workspace.CurrentCamera
  13. targetpart = 'Head' -- Don't change this.
  14. local target
  15. local target_old
  16. local alert = false
  17. local lockedon = false
  18. local settingkey = false
  19. local upvals = nil
  20. local val = 1
  21. local windows = {}
  22. local function hb() RS.Heartbeat:wait() end
  23.  
  24. local version = 1.25
  25. local Spawn = nil or game.PlaceId == 292439477 and workspace:WaitForChild('Lobby',2):WaitForChild('Spawn1',2)
  26. local spawned = false
  27.  
  28. script.Name = 'GameSense!'
  29. Mouse.TargetFilter = Camera
  30.  
  31. -- hotkey
  32. toggle_aim = Enum.UserInputType.MouseButton2
  33. toggle_aimbot = Enum.KeyCode.LeftAlt
  34. toggle_trigger =  Enum.KeyCode.P
  35. toggle_esp = Enum.KeyCode.End
  36. toggle_gui = Enum.KeyCode.P
  37. toggle_bottompos = Enum.KeyCode.P
  38. toggle_performance = Enum.KeyCode.P
  39. toggle_bones = Enum.KeyCode.P
  40. toggle_chams = Enum.KeyCode.P
  41. toggle_tracers = Enum.KeyCode.P
  42. toggle_boxes = Enum.KeyCode.P
  43. toggle_font = Enum.KeyCode.P
  44. ffatoggle = Enum.KeyCode.Home
  45. targetpart_change = Enum.KeyCode.BackSlash
  46. priority_toggle = Enum.KeyCode.P
  47. sethotkey = Enum.KeyCode.RightControl
  48. -- aim fov
  49. fov_increase = Enum.KeyCode.KeypadPlus
  50. fov_decrease = Enum.KeyCode.KeypadMinus
  51. -- aim sens (how smooth your crosshair will move)
  52. sens_increase = Enum.KeyCode.RightBracket
  53. sens_decrease = Enum.KeyCode.LeftBracket
  54.  
  55. -- parts
  56. parts = {
  57.     'Head';
  58.     'Head'
  59. }
  60.  
  61. fonts = {
  62.     Enum.Font.SourceSansBold,
  63.     Enum.Font.Cartoon,
  64.     Enum.Font.Arcade,
  65.     Enum.Font.SciFi,
  66.     Enum.Font.Fantasy,
  67.     Enum.Font.Code,
  68.     Enum.Font.Highway,
  69.     Enum.Font.Bodoni
  70. }
  71.  
  72. textSet = false
  73.  
  74. currentfont = 1
  75. ffa = true
  76. hidden = true
  77. performancemode = false
  78. -- aim
  79. fov = 5
  80. sens = .25
  81. drop = .45
  82. aim_toggled = true
  83. bottompos = true
  84. aim_priority = 2
  85. -- [2] FOV or [1] Distance
  86. aimingcolor = Color3.fromRGB(0,165,255)
  87. aimbot_toggled = true
  88. aim_line = true
  89. locksoundid = 0
  90. mouseiconid =  18671553
  91.  
  92. -- trigger
  93. trigger_toggled = false
  94. trigger_delay = 1/20
  95.  
  96. -- esp
  97. esp_toggled = true
  98. esp_bones = false
  99. esp_chams = false
  100. esp_tracers = true
  101. -- item_esp (coming soon)
  102. linesize = 1
  103. showdists = false
  104. textsize = 14
  105. textoffset = 20
  106. visiblecolor = Color3.fromRGB(38,255,99)
  107. hiddencolor = Color3.fromRGB(255,37,40)
  108. headboxsize = 4
  109. headboxaimsize = 6
  110. headboxshape = 'diamond'
  111. -- rectangle or diamond
  112.  
  113. -- box esp
  114. bounding_box = true
  115. -- box_pointsize = 0 [UNUSED]
  116. box_line_size = 1
  117. -- box_line_size_visible = 2 [UNUSED]
  118.  
  119. local GUI = Instance.new('ScreenGui',PlayerGui)
  120. GUI.Name = 'GameSense '..version
  121. GUI.ResetOnSpawn = false
  122. GUI.Enabled = false
  123.  
  124. ESP = Instance.new('Folder',GUI)
  125. ESP.Name = 'ESP'
  126. local Bottom = Instance.new('Frame',ESP)
  127. Bottom.Name = 'Bottom'
  128. Bottom.BackgroundTransparency = 1
  129. Bottom.Size = UDim2.new(0,1,0,1)
  130. Bottom.Position = UDim2.new(.5,0,1,1)
  131.  
  132. local Status = Instance.new('TextLabel',GUI)
  133. Status.Name = 'Status'
  134. Status.BackgroundTransparency = 1
  135. Status.Size = UDim2.new(0,500,0,50)
  136. Status.Position = UDim2.new(.5,-250,.85,0)
  137. Status.TextSize = 24
  138. Status.Font = Enum.Font.SourceSansBold
  139. Status.TextColor3 = Color3.new(1,1,1)
  140. Status.TextStrokeColor3 = Color3.new(0,0,0)
  141. Status.TextStrokeTransparency = .6
  142. Status.Text = 'On Standby'
  143. Status.ZIndex = 50
  144.  
  145. local Credits = Status:Clone()
  146. Credits.Name = 'Credits'
  147. Credits.Parent = GUI
  148. Credits.Position = UDim2.new(.5,-250,.85,-20)
  149. Credits.TextSize = 16
  150. Credits.Text = 'GameSense '..version..' by Avexus!'
  151.  
  152. local FovGui = Instance.new('ImageLabel',GUI)
  153. FovGui.Name = 'FovGui'
  154. FovGui.Image = 'rbxassetid://324848180'
  155. FovGui.Size = UDim2.new(0,(Camera.ViewportSize.X/(90/fov))*2,0,(Camera.ViewportSize.X/(90/fov))*2)
  156. FovGui.Position = UDim2.new(0.5,-FovGui.AbsoluteSize.X/2,0.5,-FovGui.AbsoluteSize.Y/2)
  157. FovGui.BackgroundTransparency = 1
  158. FovGui.ImageTransparency = .9
  159. FovGui.ImageColor3 = Color3.new(1,0,0)
  160.  
  161. local Indicator = Instance.new('TextLabel',GUI)
  162. Indicator.Name = 'Indicator'
  163. Indicator.Font = Enum.Font.SourceSans
  164. Indicator.TextSize = 14
  165. Indicator.TextXAlignment = Enum.TextXAlignment.Center
  166. Indicator.TextYAlignment = Enum.TextYAlignment.Center
  167. Indicator.TextStrokeTransparency = .75
  168. Indicator.Text = aim_priority>1 and 'FOV: '..fov or 'Distance'
  169.  
  170. local SensAdjust = Instance.new('TextBox',GUI)
  171. SensAdjust.Name = 'SensAdjust'
  172. SensAdjust.Font = Enum.Font.SourceSans
  173. SensAdjust.BackgroundTransparency = .75
  174. SensAdjust.BackgroundColor3 = Color3.new(0,0,0)
  175. SensAdjust.BorderColor3 = Color3.new(1,1,1)
  176. SensAdjust.Size = UDim2.new(0,50,0,20)
  177. SensAdjust.TextStrokeTransparency = .6
  178. SensAdjust.TextColor3 = Color3.new(1,1,1)
  179. SensAdjust.TextSize = 14
  180. SensAdjust.PlaceholderText = 'Sens'
  181. SensAdjust.Text = tonumber(sens)
  182. SensAdjust.Position = Credits.Position + UDim2.new(0,250,0,75)
  183.  
  184. local SensLabel = Instance.new('TextLabel',SensAdjust)
  185. SensLabel.Name = 'SensLabel'
  186. SensLabel.Font = Enum.Font.SourceSans
  187. SensLabel.Size = UDim2.new(1,0,1,0)
  188. SensLabel.BackgroundTransparency = 1
  189. SensLabel.TextSize = 14
  190. SensLabel.TextColor3 = Color3.new(1,1,1)
  191. SensLabel.TextStrokeColor3 = Color3.new(0,0,0)
  192. SensLabel.TextStrokeTransparency = .6
  193. SensLabel.Text = 'Sens:'
  194. SensLabel.Position = UDim2.new(-1,0,0,0)
  195. SensLabel.TextXAlignment = Enum.TextXAlignment.Left
  196.  
  197. local FovAdjust = SensAdjust:Clone()
  198. FovAdjust.Parent = GUI
  199. FovAdjust.PlaceholderText = 'FOV'
  200. FovAdjust.Name = 'FovAdjust'
  201. FovAdjust.Text = tonumber(fov)
  202. FovAdjust.Position = SensAdjust.Position + UDim2.new(0,0,0,20)
  203. FovAdjust.SensLabel.Name = 'FovLabel'
  204. FovAdjust.FovLabel.Text = 'Fov:'
  205.  
  206. local DropAdjust = SensAdjust:Clone()
  207. DropAdjust.Parent = GUI
  208. DropAdjust.PlaceholderText = 'Drop'
  209. DropAdjust.Name = 'DropAdjust'
  210. DropAdjust.Text = tonumber(drop)
  211. DropAdjust.Position = SensAdjust.Position + UDim2.new(0,0,0,40)
  212. DropAdjust.SensLabel.Name = 'DropLabel'
  213. DropAdjust.DropLabel.Text = 'Drop:'
  214.  
  215. local KeysList = Instance.new('TextLabel',GUI)
  216. KeysList.Name = 'KeysList'
  217. KeysList.Font = Enum.Font.SourceSans
  218. KeysList.TextStrokeTransparency = .6
  219. KeysList.TextSize = 14
  220. KeysList.TextColor3 = Color3.new(1,1,1)
  221. KeysList.Size = UDim2.new(0,0,1,0)
  222. KeysList.Position = UDim2.new(0,5,0,-280)
  223. KeysList.BackgroundTransparency = 1
  224. KeysList.Active = false
  225. KeysList.TextXAlignment = Enum.TextXAlignment.Left
  226. KeysList.TextYAlignment = Enum.TextYAlignment.Bottom
  227. KeysList.Text = 'AimBot Toggle: '..toggle_aimbot.Name..'\nAim Toggle: '..toggle_aim.Name..'\nAim Part Toggle: '..targetpart_change.Name..'\nPriority Toggle: '..priority_toggle.Name
  228.     ..'\nESP Toggle: '..toggle_esp.Name..'\nBones Toggle: '..toggle_bones.Name..'\nChams Toggle: '..toggle_chams.Name..'\nBoxes Toggle: '..toggle_boxes.Name..'\nFOV Increase: '..fov_increase.Name..'\nFOV Decrease: '..fov_decrease.Name..'\nSens Increase: '
  229.     ..sens_increase.Name..'\nSens Decrease: '..sens_decrease.Name..'\nTrigger Toggle: '..toggle_trigger.Name..'\nFFA Toggle: '..ffatoggle.Name..'\nHide Cheats: '..toggle_gui.Name
  230.     ..'\nChange ESP Origin: '..toggle_bottompos.Name..'\nPerformance Mode: '..toggle_performance.Name..'\nChange Font: '..toggle_font.Name
  231.  
  232. local n = 0
  233.  
  234. spawn(function()
  235.     while Status do
  236.         Indicator.TextColor3 = Color3.fromHSV(n,.5,1)
  237.         FovGui.ImageColor3 = Indicator.TextColor3
  238.         if not textSet then
  239.             if aim_toggled and target then
  240.                 Status.TextColor3 = aimingcolor
  241.                 Status.Text = ('Aiming at '..target.Name)
  242.             else
  243.                 Status.TextColor3 = Color3.fromHSV(n,.5,1)
  244.                 Status.Text = 'On Standby'
  245.             end
  246.         end
  247.         n = (n+.005)%1
  248.         hb()
  249.     end
  250. end)
  251.  
  252. SensAdjust.InputEnded:Connect(function() if SensAdjust.Text~='' then sens = tonumber(SensAdjust.Text)>0 and tonumber(SensAdjust.Text) or sens end end)
  253. FovAdjust.InputEnded:Connect(function() if FovAdjust.Text~='' then fov = tonumber(FovAdjust.Text)>0 and tonumber(FovAdjust.Text) or fov
  254.         FovGui:TweenSize(UDim2.new(0,(Camera.ViewportSize.X/(90/fov))*2,0,(Camera.ViewportSize.X/(90/fov))*2),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.1,true) end end)
  255. DropAdjust.InputEnded:Connect(function() if DropAdjust.Text~='' then drop = tonumber(DropAdjust.Text)>=0 and tonumber(DropAdjust.Text) or drop end end)
  256.  
  257. local function distfromspawn(x)
  258.     if Spawn then
  259.         return x:DistanceFromCharacter(Spawn.Position)
  260.     else
  261.         return 201
  262.     end
  263. end
  264.  
  265. local function setText(text)
  266.     spawn(function()
  267.         textSet = true
  268.         Status.Text = text
  269.         Status.TextColor3 = Color3.new(1,1,1)
  270.         wait(#text/4)
  271.         textSet = false
  272.     end)
  273. end
  274.  
  275.  
  276. Mouse.Icon = 'rbxassetid://'..mouseiconid
  277.  
  278. local function Notification(...)
  279.     StarterGui:SetCore('SendNotification',...)
  280. end
  281.  
  282. local function DrawLine(Folder,P1,P2,Thickness,Color,LineTransparency,BorderThickness,BorderColor)
  283.     -- Declare variables
  284.     local Point1,Point2 = P1.Position,P2.Position
  285.     if Point1 and Point2 then
  286.         local X,Y = Camera.ViewportSize.X, Camera.ViewportSize.Y
  287.         local X1,X2 = (X * Point1.X.Scale + Point1.X.Offset + P1.Size.X.Offset/2), (X * Point2.X.Scale + Point2.X.Offset + P2.Size.X.Offset/2)
  288.         local Y1,Y2 = (Y * Point1.Y.Scale + Point1.Y.Offset + P1.Size.Y.Offset/2), (Y * Point2.Y.Scale + Point2.Y.Offset + P2.Size.Y.Offset/2)
  289.         local MidX,MidY = (X1+X2)/2, (Y1+Y2)/2
  290.         -- Set defaults to prevent errors
  291.         Thickness = Thickness or 1
  292.         Color = Color or Color3.new(1,1,1)
  293.         LineTransparency =  LineTransparency or 0
  294.         BorderThickness = BorderThickness or 0
  295.         BorderColor = BorderColor or Color3.new(0,0,0)
  296.         -- Draw the line
  297.         local Line = Folder:FindFirstChild(P1.Name..'-'..P2.Name) or Instance.new('Frame',Folder)
  298.         Line.Visible = false
  299.         Line.BackgroundTransparency = LineTransparency
  300.         Line.BorderSizePixel = BorderThickness
  301.         Line.BorderColor3 = BorderColor
  302.         Line.Size = UDim2.new(0,(Vector2.new(X1,Y1) - Vector2.new(X2,Y2)).magnitude-1,0,Thickness)
  303.         Line.Position = UDim2.new(0,MidX-Line.AbsoluteSize.X/2,0,MidY-Line.AbsoluteSize.Y)
  304.         Line.BackgroundColor3 = Color
  305.         Line.Rotation = math.deg(math.atan2((Y2-Y1),(X2-X1)))
  306.         Line.Name = P1.Name..'-'..P2.Name
  307.         Line.Visible = true
  308.         return Line
  309.     else
  310.         return nil
  311.     end
  312. end
  313.  
  314. local function GetNearest(Mode)
  315.     local lowest,nearest,gui = math.huge,nil,nil
  316.     if Mode==1 then
  317.         for _,plr in next,Players:GetPlayers() do
  318.             if plr.Name~=Player.Name and plr.Character~=nil and plr.Character:FindFirstChild(targetpart) then
  319.                 local dist = Player:DistanceFromCharacter(plr.Character[targetpart].Position)
  320.                 local ray = Ray.new(Player.Character.Head.Position,(plr.Character[targetpart].Position-Player.Character.Head.Position).unit*5000)
  321.                 local part,point = workspace:FindPartOnRayWithIgnoreList(ray,{Camera,Player.Character,unpack(windows)})
  322.                 local Z = Camera:WorldToScreenPoint(plr.Character[targetpart].Position).Z
  323.                 if part and part:IsDescendantOf(plr.Character) and Z>0 and dist < lowest and (ffa or plr.TeamColor~=Player.TeamColor) then lowest = dist nearest = plr.Character end
  324.             end
  325.         end
  326.     elseif Mode==2 then
  327.         for _,plr in next,Players:GetPlayers() do
  328.             if plr.Name~=Player.Name and plr.Character~=nil and plr.Character:FindFirstChild(targetpart) then
  329.                 local pos = Camera:WorldToScreenPoint(plr.Character[targetpart].Position)
  330.                 local ray = Ray.new(Player.Character[targetpart].Position,(plr.Character[targetpart].Position-Player.Character[targetpart].Position).unit*2048)
  331.                 local part,point = workspace:FindPartOnRayWithIgnoreList(ray,{Camera,Player.Character,unpack(windows)})
  332.                 local dist = (Vector2.new(Mouse.X,Mouse.Y)-Vector2.new(pos.X,pos.Y)).magnitude
  333.                 if part and part:IsDescendantOf(plr.Character) and pos.Z>0 and dist <= Camera.ViewportSize.X/(90/fov) and dist < lowest and (ffa or plr.TeamColor~=Player.TeamColor) then lowest = dist nearest = plr.Character end
  334.             end
  335.         end
  336.     end
  337.     return nearest
  338. end
  339.  
  340. Mouse.Move:Connect(function()
  341.     cursor = ESP:FindFirstChild('Cursor') or Instance.new('Frame',ESP)
  342.     cursor.Name = 'Cursor'
  343.     cursor.BackgroundTransparency = 1
  344.     cursor.Size = UDim2.new(0,1,0,1)
  345.     cursor.Position = UDim2.new(0,Mouse.X,0,Mouse.Y)
  346. end)
  347.  
  348. UIS.InputBegan:Connect(function(Input)
  349.     if Input.KeyCode == toggle_aim or Input.UserInputType == toggle_aim then
  350.         aim_toggled = true
  351.         alert = true
  352.         while aim_toggled and aimbot_toggled do
  353.             target = GetNearest(aim_priority)
  354.             if target then
  355.                 local dist = Player:DistanceFromCharacter(target[targetpart].Position)
  356.                 local headpos = Camera:WorldToScreenPoint(target[targetpart].Position+Vector3.new(0,dist/(100/drop),0))
  357.                 local moveto = Vector2.new((headpos.X-Mouse.X)*sens,(headpos.Y-Mouse.Y)*sens)
  358.                 aimpos = GUI:FindFirstChild('AimPos') or Instance.new('Frame',GUI)
  359.                 if not GUI:FindFirstChild('AimPos') then
  360.                     aimpos.Name = 'AimPos'
  361.                     aimpos.BorderSizePixel = 1
  362.                     aimpos.BorderColor3 = Color3.new(0,0,0)
  363.                     aimpos.BackgroundTransparency = 0
  364.                     aimpos.BackgroundColor3 = Color3.new(1,1,1)
  365.                     aimpos.Rotation = 45
  366.                     aimpos.ZIndex = 4
  367.                     aimpos.Size = UDim2.new(0,3,0,3)
  368.                 end
  369.                 aimpos.Position = UDim2.new(0,headpos.X-aimpos.AbsoluteSize.X/2,0,headpos.Y-aimpos.AbsoluteSize.Y/2)
  370.                 aimpos.Visible = true
  371.                 mousemoverel(moveto.X,moveto.Y)
  372.                 if alert or target~=target_old then
  373.  
  374.                     lockedon = true
  375.                     alert = false
  376.                 end
  377.             end
  378.             RS.Heartbeat:wait()
  379.             target_old = target
  380.             if aimpos then
  381.                 aimpos.Visible = false
  382.             end
  383.         end
  384.         lockedon = false
  385.     elseif Input.KeyCode == toggle_trigger then
  386.         trigger_toggled = not trigger_toggled
  387.         setText('Toggled TriggerBot '..(trigger_toggled and 'On' or 'Off'))
  388.         Notification({Title='TriggerBot';Text='TriggerBot was toggled '..(trigger_toggled and 'On' or 'Off');Duration=2;})
  389.         local Box = Instance.new('SelectionBox',PlayerGui)
  390.         Box.Color3 = Color3.new(1,0,0)
  391.         Box.LineThickness = .05
  392.         Box.Adornee = nil
  393.         if trigger_delay>0 then wait(trigger_delay) end
  394.         while trigger_toggled do
  395.             local Target = Mouse.Target
  396.             local plr = Players:FindFirstChild(Target.Parent.Name)
  397.             if Target and Target.Parent and plr~=nil and plr~=Player and ffa or plr~=nil and plr.TeamColor~=Player.TeamColor then
  398.                 Box.Adornee = Mouse.Target
  399.                 mouse1press()
  400.                 wait()
  401.                 mouse1release()
  402.             end
  403.             RS.Heartbeat:wait()
  404.         end
  405.         Box:Destroy()
  406.     elseif Input.KeyCode == toggle_esp then
  407.         esp_toggled = not esp_toggled
  408.         Notification({Title='ESP';Text='ESP was toggled '..(esp_toggled and 'On' or 'Off');Duration=2;})
  409.         setText('Toggled ESP '..(esp_toggled and 'On' or 'Off'))
  410.     elseif Input.KeyCode == toggle_aimbot then
  411.         aimbot_toggled = not aimbot_toggled
  412.         Notification({Title='AimBot';Text='AimBot was toggled '..(aimbot_toggled and 'On' or 'Off');Duration=2;})
  413.         setText('Toggled AimBot '..(aimbot_toggled and 'On' or 'Off'))
  414.     elseif Input.KeyCode == fov_increase then
  415.         fov = fov + .5
  416.         FovAdjust.Text = tonumber(fov)
  417.         if FovGui.Visible then
  418.             FovGui:TweenSize(UDim2.new(0,(Camera.ViewportSize.X/(90/fov))*2,0,(Camera.ViewportSize.X/(90/fov))*2),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.1,true)
  419.         end
  420.         setText('Aim FOV: '..fov)
  421.     elseif Input.KeyCode == fov_decrease and fov>0 then
  422.         fov = fov - .5
  423.         FovAdjust.Text = tonumber(fov)
  424.         if FovGui.Visible then
  425.             FovGui:TweenSize(UDim2.new(0,(Camera.ViewportSize.X/(90/fov))*2,0,(Camera.ViewportSize.X/(90/fov))*2),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.1,true)
  426.         end
  427.         setText('Aim FOV: '..fov)
  428.     elseif Input.KeyCode == sens_increase then
  429.         sens = sens + .05
  430.         SensAdjust.Text = tonumber(sens)
  431.         setText('Sens: '..sens)
  432.     elseif Input.KeyCode == sens_decrease then
  433.         sens = sens - .05
  434.         SensAdjust.Text = tonumber(sens)
  435.         setText('Sens: '..sens)
  436.     elseif Input.KeyCode == targetpart_change then
  437.         val = val+1
  438.         targetpart = val<=#parts and parts[val] or parts[1]
  439.         if parts[1]==targetpart then val = 1 end
  440.         Notification({Title='Target Part';Text='Target part set to '..targetpart;Duration=2;})
  441.         setText('Target Part: '..targetpart)
  442.     elseif Input.KeyCode == ffatoggle then
  443.         ffa = not ffa
  444.         Notification({Title='FFA Mode';Text='FFA Mode is '..(ffa and 'Enabled' or 'Disabled');Duration=2;})
  445.         setText('FFA Mode: '..(ffa and 'Enabled' or 'Disabled'))
  446.     elseif Input.KeyCode == priority_toggle then
  447.         aim_priority = aim_priority+1>2 and 0 or 1
  448.         aim_priority = aim_priority+1
  449.         FovGui.Visible = aim_priority>1
  450.         Notification({Title='Aim Priority';Text='Aim Priority: '..(aim_priority==1 and 'Distance' or 'FOV');Duration=2;})
  451.         setText('Aim Priority: '..(aim_priority==1 and 'Distance' or 'FOV'))
  452.     elseif Input.KeyCode == toggle_bones then
  453.         esp_bones = not esp_bones
  454.         if not esp_bones then
  455.             for _,v in next,ESP:GetDescendants() do
  456.                 if v:IsA('Frame') and v.Name:match('-') then
  457.                     v:Destroy()
  458.                 end
  459.             end
  460.         end
  461.         Notification({Title='ESP';Text='ESP Bones: '..(esp_bones and 'Enabled' or 'Disabled');Duration=2;})
  462.         setText('Toggled ESP Bones '..(esp_bones and 'Enabled' or 'Disabled'))
  463.     elseif Input.KeyCode == toggle_gui then
  464.         hidden = not hidden
  465.         for _,gui in next,GUI:GetDescendants() do
  466.             if gui:IsA('GuiObject') and not hidden and not gui.Visible then
  467.                 gui.Visible = true
  468.                 Mouse.Icon = 'rbxassetid://'..mouseiconid
  469.             elseif gui:IsA('GuiObject') and gui.Visible then
  470.                 gui.Visible = false
  471.                 esp_toggled = false
  472.                 Mouse.Icon = old_icon
  473.             end
  474.         end
  475.     elseif Input.KeyCode == toggle_bottompos then
  476.         bottompos = not bottompos
  477.         if bottompos then
  478.             Bottom.Position = UDim2.new(.5,0,1,1)
  479.         end
  480.     elseif Input.KeyCode == toggle_performance then
  481.         performancemode = not performancemode
  482.         setText('Performance Mode '..(performancemode and 'Enabled' or 'Disabled'))
  483.     elseif Input.KeyCode == toggle_chams then
  484.         esp_chams = not esp_chams
  485.         setText('Chams '..(esp_chams and 'Enabled' or 'Disabled'))
  486.         Notification({Title='ESP';Text='Chams: '..(esp_chams and 'Enabled' or 'Disabled');Duration=2;})
  487.     elseif Input.KeyCode == toggle_tracers then
  488.         esp_tracers = not esp_tracers
  489.         setText('Tracers '..(esp_chams and 'Enabled' or 'Disabled'))
  490.         Notification({Title='ESP';Text='Tracers: '..(esp_tracers and 'Enabled' or 'Disabled');Duration=2;})
  491.     elseif Input.KeyCode == toggle_boxes then
  492.         bounding_box = not bounding_box
  493.         setText('Bounding Boxes '..(bounding_box and 'Enabled' or 'Disabled'))
  494.         Notification({Title='ESP';Text='Bounding Boxes: '..(bounding_box and 'Enabled' or 'Disabled');Duration=2;})
  495.     elseif Input.KeyCode == toggle_font then
  496.         currentfont = (currentfont+1)>#fonts and 1 or currentfont+1
  497.         for _,v in next,GUI:GetDescendants() do
  498.             if v.Name~='KeysList' then
  499.                 if v:IsA('TextLabel') or v:IsA('TextButton') then
  500.                     v.Font = fonts[currentfont]
  501.                 end
  502.             end
  503.         end
  504.     end
  505. end)
  506.  
  507. UIS.InputEnded:Connect(function(Input)
  508.     if Input.KeyCode == toggle_aim or Input.UserInputType == toggle_aim then
  509.         aim_toggled = false
  510.     end
  511. end)
  512.  
  513. local function checkifspawned(x)
  514.     spawned = false
  515.     while not spawned and game.PlaceId==292439477 do
  516.         spawned = distfromspawn(x)>200 and true or false
  517.         wait(1/5)
  518.     end
  519.     spawned = true
  520. end
  521.  
  522. checkifspawned(Player)
  523. Player.CharacterAdded:Connect(function(c)
  524.     checkifspawned(Player)
  525.  
  526.     for _,v in next,ESP:GetDescendants() do
  527.         if v:IsA('Frame') and v.Name:match('-') then
  528.             v:Destroy()
  529.         end
  530.     end
  531. end)
  532.  
  533. Notification({Title='Controls';Text='Left alt = MouseBot | End = Refresh ESP (spam it) | FFA = Home ';Duration=4;})
  534.  
  535. RS.RenderStepped:Connect(function()
  536.     if cursor then
  537.         FovGui.Position = cursor.Position-UDim2.new(0,FovGui.AbsoluteSize.X/2,0,FovGui.AbsoluteSize.Y/2)
  538.         Indicator.Position = cursor.Position+UDim2.new(0,0,0,40)
  539.     end
  540. end)
  541.  
  542. Mouse.Button1Down:Connect(function()
  543.     spawn(function()
  544.         if FovGui.Visible then
  545.             FovGui:TweenSize(UDim2.new(0,Camera.ViewportSize.X/(90/fov)*2.35,0,Camera.ViewportSize.X/(90/fov)*2.35),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.1,true)
  546.             wait(.1)
  547.             FovGui:TweenSize(UDim2.new(0,Camera.ViewportSize.X/(90/fov)*2,0,Camera.ViewportSize.X/(90/fov)*2),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.1,true)
  548.         end
  549.     end)
  550. end)
  551.  
  552. while true do
  553.     Indicator.Text = (aim_priority>1 and 'FOV: '..fov or 'Distance') ..'\nSens: '..sens..(aim_toggled and '\nAiming' or '')
  554.     if not bottompos then Bottom.Position = cursor.Position end
  555.     if esp_toggled then
  556.         for _,v in next,ESP:children() do
  557.             if v~=Bottom and not Players:FindFirstChild(v.Name) then
  558.                 v:Destroy()
  559.             end
  560.         end
  561.         for _,v in next,Players:GetPlayers() do
  562.             local Char = v.Character
  563.             if Char and spawned and v~=Player and Char:FindFirstChild(targetpart) and distfromspawn(v)>100 then
  564.                 if ffa or v.TeamColor~=Player.TeamColor then
  565.                     local X = Camera:GetPartsObscuringTarget({Camera.CFrame.p,Char[targetpart].CFrame.p},{v.Character,Char,Camera,unpack(windows)})
  566.                     local Dist = Player:DistanceFromCharacter(Char:FindFirstChild(targetpart).Position)
  567.                     local Color = hiddencolor
  568.                     local Folder = ESP:FindFirstChild(v.Name) or Instance.new('Folder',ESP)
  569.                     Folder.Name = v.Name
  570.                     -- ESP
  571.                     local Head = Folder:FindFirstChild('Head') or Instance.new('Frame',Folder)
  572.                     if not Folder:FindFirstChild('Head') then
  573.                         Head.Name = 'Head'
  574.                         Head.BorderSizePixel = 1
  575.                         Head.BorderColor3 = Color3.new(0,0,0)
  576.                         Head.BackgroundTransparency = 0
  577.                     end
  578.                     Head.BackgroundColor3 = #X>0 and hiddencolor or #X==0 and visiblecolor
  579.                     Head.Rotation = headboxshape=='diamond' and 45 or 0
  580.                     Head.ZIndex = 3
  581.                     local HP = Folder:FindFirstChild('HP') or Instance.new('TextLabel',Folder)
  582.                     if not Folder:FindFirstChild('HP') then
  583.                         HP.Name = 'HP'
  584.                         HP.TextTransparency = Head.BackgroundTransparency-.4
  585.                         HP.Font = fonts[currentfont]
  586.                         HP.TextStrokeTransparency = .6
  587.                         HP.BackgroundTransparency = 1
  588.                         HP.TextSize = 14
  589.                     end
  590.                     HP.Text = showdists and Char.Name..'\n'..math.floor(Dist+.5) or Char.Name
  591.                     if aim_toggled and target==Char then
  592.                         Head.Size = UDim2.new(0,headboxaimsize,0,headboxaimsize)
  593.                         Head.BackgroundColor3 = aimingcolor
  594.                         HP.Text = showdists and '['..Char.Name..']'..'\n'..math.floor(Dist+.5) or '['..Char.Name..']'
  595.                         HP.TextSize = 16
  596.                     else
  597.                         Head.Size = UDim2.new(0,headboxsize,0,headboxsize)
  598.                     end
  599.                     HP.TextColor3 = Head.BackgroundColor3
  600.                     local toScreen = Camera:WorldToScreenPoint(Char[targetpart].CFrame.p)
  601.                     if #X==0 then Color = visiblecolor end
  602.                     Head.Position = UDim2.new(0,toScreen.X-Head.Size.X.Offset/2,0,toScreen.Y-Head.Size.Y.Offset/2)
  603.                     HP.Position = Head.Position-UDim2.new(0,0,0,textoffset)
  604.                     if esp_tracers then
  605.                         local Line = DrawLine(Folder,ESP.Bottom,Head,linesize,Head.BackgroundColor3,.75,1,Color3.new(0,0,0))
  606.                         Line.Visible = Head.Visible
  607.                     else
  608.                         local imtired = Folder:FindFirstChild(ESP.Bottom.Name..'-'..Head.Name)
  609.                         if imtired then
  610.                             imtired:Destroy()
  611.                         end
  612.                     end
  613.                     if toScreen.Z<=0 then Head.Visible = false else Head.Visible = true end
  614.                     HP.Visible = Head.Visible
  615.                     if Char:FindFirstChild('Humanoid') and Char.Humanoid.RigType==Enum.HumanoidRigType.R6 then
  616.                         local Neck = Folder:FindFirstChild('Neck') or Instance.new('Frame',Folder)
  617.                         Neck.Name = 'Neck'
  618.                         Neck.ZIndex = 2
  619.                         if Char['Torso']~=nil then
  620.                             local Pos = (Char.Torso.CFrame*CFrame.new(0,.8,0)).p
  621.                             local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
  622.                             Neck.Position = UDim2.new(0,X,0,Y)
  623.                             Neck.BorderSizePixel = 0
  624.                             if Z<=0 then Neck.Visible = false else Neck.Visible = true end
  625.                         else
  626.                             Neck.Visible = false
  627.                         end
  628.                         --
  629.                         local Pelvis = Folder:FindFirstChild('Pelvis') or Instance.new('Frame',Folder)
  630.                         Pelvis.Name = 'Pelvis'
  631.                         Pelvis.ZIndex = 2
  632.                         Pelvis.BorderSizePixel = 0
  633.                         if Char['Torso']~=nil then
  634.                             local Pos = (Char.Torso.CFrame*CFrame.new(0,-1,0)).p
  635.                             local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
  636.                             Pelvis.Position = UDim2.new(0,X,0,Y)
  637.                             if Z<=0 then Pelvis.Visible = false else Pelvis.Visible = true end
  638.                         else
  639.                             Pelvis.Visible = false
  640.                         end
  641.                         --
  642.                         local RightFoot = Folder:FindFirstChild('Right Foot') or Instance.new('Frame',Folder)
  643.                         RightFoot.Name = 'Right Foot'
  644.                         RightFoot.ZIndex = 2
  645.                         RightFoot.BorderSizePixel = 0
  646.                         if Char['Right Leg']~=nil then
  647.                             local Pos = (Char['Right Leg'].CFrame*CFrame.new(0,-1,0)).p
  648.                             local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
  649.                             RightFoot.Position = UDim2.new(0,X,0,Y)
  650.                             if Z<=0 then RightFoot.Visible = false else RightFoot.Visible = true end
  651.                         else
  652.                             RightFoot.Visible = false
  653.                         end
  654.                         --
  655.                         local LeftFoot = Folder:FindFirstChild('Left Foot') or Instance.new('Frame',Folder)
  656.                         LeftFoot.Name = 'Left Foot'
  657.                         if Char['Left Leg']~=nil then
  658.                             local Pos = (Char['Left Leg'].CFrame*CFrame.new(0,-1,0)).p
  659.                             local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
  660.                             LeftFoot.Position = UDim2.new(0,X,0,Y)
  661.                             LeftFoot.BorderSizePixel = 0
  662.                             if Z<=0 then LeftFoot.Visible = false else LeftFoot.Visible = true end
  663.                         else
  664.                             LeftFoot.Visible = false
  665.                         end
  666.                         --
  667.                         local RightHand = Folder:FindFirstChild('Right Hand') or Instance.new('Frame',Folder)
  668.                         RightHand.Name = 'Right Hand'
  669.                         RightHand.ZIndex = 2
  670.                         RightHand.BorderSizePixel = 0
  671.                         if Char['Right Arm']~=nil then
  672.                             local Pos = (Char['Right Arm'].CFrame*CFrame.new(0,-1,0)).p
  673.                             local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
  674.                             RightHand.Position = UDim2.new(0,X,0,Y)
  675.                             if Z<=0 then RightHand.Visible = false else RightHand.Visible = true end
  676.                         else
  677.                             RightHand.Visible = false
  678.                         end
  679.                         --
  680.                         local LeftHand = Folder:FindFirstChild('Left Hand') or Instance.new('Frame',Folder)
  681.                         LeftHand.Name = 'Left Hand'
  682.                         LeftHand.ZIndex = 2
  683.                         LeftHand.BorderSizePixel = 0
  684.                         if Char['Left Arm']~=nil then
  685.                             local Pos = (Char['Left Arm'].CFrame*CFrame.new(0,-1,0)).p
  686.                             local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
  687.                             LeftHand.Position = UDim2.new(0,X,0,Y)
  688.                             if Z<=0 then LeftHand.Visible = false else LeftHand.Visible = true end
  689.                         else
  690.                             LeftHand.Visible = false
  691.                         end
  692.                         -- draw joints
  693.                         if esp_bones then
  694.                             if Head.Visible then DrawLine(Folder,Head,Neck,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
  695.                             if Neck.Visible then DrawLine(Folder,Neck,Pelvis,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
  696.                             if Neck.Visible then DrawLine(Folder,Neck,RightHand,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
  697.                             if Neck.Visible then DrawLine(Folder,Neck,LeftHand,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
  698.                             if Pelvis.Visible then DrawLine(Folder,Pelvis,RightFoot,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
  699.                             if Pelvis.Visible then DrawLine(Folder,Pelvis,LeftFoot,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
  700.                         end
  701.                     end
  702.  
  703.                     if esp_chams then
  704.                         for _,Part in next,Char:children() do
  705.                             if Part:IsA('BasePart') and Part.Name~='HumanoidRootPart' then
  706.                                 local Adornment = Folder:FindFirstChild(Part.Name..'_Cham') or Instance.new('BoxHandleAdornment',Folder)
  707.                                 if not Folder:FindFirstChild(Part.Name..'_Cham') then
  708.                                     Adornment.Name = Part.Name..'_Cham'
  709.                                     Adornment.Adornee = Part
  710.                                     Adornment.AlwaysOnTop = true
  711.                                     Adornment.Size = Part.Name=='Head' and Vector3.new(1,1,1) or Part.Size
  712.                                     Adornment.ZIndex = 1
  713.                                 end
  714.                                 Adornment.Color3 = Head.BackgroundColor3
  715.                             end
  716.                         end
  717.                     else
  718.                         for _,v in next,Folder:GetDescendants() do
  719.                             if v.Name:match('Cham') then
  720.                                 v:Destroy()
  721.                             end
  722.                         end
  723.                     end
  724.  
  725.                     if bounding_box and Char:FindFirstChild('HumanoidRootPart') then
  726.                         local Box = Char:FindFirstChild('Box') or Instance.new('BillboardGui',Char)
  727.                         if not Char:FindFirstChild('Box') then
  728.                             Box.Name = 'Box'
  729.                             Box.Adornee = Char:FindFirstChild('HumanoidRootPart')
  730.                             Box.AlwaysOnTop = true
  731.                             Box.LightInfluence = 0
  732.                             Box.StudsOffset = Vector3.new(0,-Box.Adornee.Size.Y/4,0)
  733.                             Box.Size = UDim2.new(4,1,5,1)
  734.                             local Top = Instance.new('Frame',Box)
  735.                             Top.Size = UDim2.new(1,0,0,box_line_size)
  736.                             Top.BorderSizePixel = 0
  737.                             local Bot = Top:Clone()
  738.                             Bot.Position = UDim2.new(0,0,1,-box_line_size)
  739.                             Bot.Parent = Box
  740.                             local Left = Top:Clone()
  741.                             Left.Size = UDim2.new(0,1,1,0)
  742.                             Left.Parent = Box
  743.                             local Right = Left:Clone()
  744.                             Right.Position = UDim2.new(1,-box_line_size,0,0)
  745.                             Right.Parent = Box
  746.                         end
  747.                         for _,v in next,Box:children() do
  748.                             if v:IsA('Frame') then
  749.                                 v.BackgroundColor3 = Head.BackgroundColor3
  750.                             end
  751.                         end
  752.                     else
  753.                         local Box = Char:FindFirstChild('Box')
  754.                         if Box then
  755.                             Box:Destroy()
  756.                         end
  757.                     end
  758.  
  759.                     if lockedon and target and aim_line and ESP:FindFirstChild(target.Name) then
  760.                         DrawLine(ESP,cursor,ESP:FindFirstChild(target.Name).Head,1,Head.BackgroundColor3,.5)
  761.                     end
  762.  
  763.                 else
  764.                     if ESP:FindFirstChild(v.Name) then
  765.                         ESP:FindFirstChild(v.Name):Destroy()
  766.                     end
  767.                 end
  768.             else
  769.                 if ESP:FindFirstChild(v.Name) then
  770.                     ESP:FindFirstChild(v.Name):Destroy()
  771.                 end
  772.             end
  773.         end
  774.     else
  775.         for _,v in next,ESP:children() do
  776.             if v:IsA('Folder') then
  777.                 v:Destroy()
  778.             end
  779.         end
  780.     end
  781.     if performancemode then
  782.         wait(1/(workspace:GetRealPhysicsFPS()*.75))
  783.     else
  784.         RS.Stepped:wait()
  785.     end
  786. end
  787.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement