Advertisement
skelite21_yt

PHANTOM FORCES GUI

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