Advertisement
tomtygamingyt

phantom forces aimbot

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