SirBabyQuack

Phantom Forces Aimbot

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