Advertisement
Guest User

Untitled

a guest
Jan 17th, 2020
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.71 KB | None | 0 0
  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 and workspace:WaitForChild('Lobby',2):WaitForChild('Spawn1',2)
  26. local spawned = false
  27.  
  28. script.Name = 'GameSense!'
  29. Mouse.TargetFilter = Camera
  30.  
  31. -- hotkey
  32. toggle_aim = Enum.UserInputType.MouseButton2
  33. toggle_aimbot = Enum.KeyCode.LeftAlt
  34. toggle_trigger = Enum.KeyCode.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 Avexus!'
  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. 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. lockedon = true
  383. alert = false
  384. end
  385. end
  386. RS.Heartbeat:wait()
  387. target_old = target
  388. if aimpos then
  389. aimpos.Visible = false
  390. end
  391. end
  392. lockedon = false
  393. elseif Input.KeyCode == toggle_trigger then
  394. trigger_toggled = not trigger_toggled
  395. setText('Toggled TriggerBot '..(trigger_toggled and 'On' or 'Off'))
  396. Notification({Title='TriggerBot';Text='TriggerBot was toggled '..(trigger_toggled and 'On' or 'Off');Duration=2;})
  397. local Box = Instance.new('SelectionBox',PlayerGui)
  398. Box.Color3 = Color3.new(1,0,0)
  399. Box.LineThickness = .05
  400. Box.Adornee = nil
  401. if trigger_delay>0 then wait(trigger_delay) end
  402. while trigger_toggled do
  403. local Target = Mouse.Target
  404. local plr = Players:FindFirstChild(Target.Parent.Name)
  405. if Target and Target.Parent and plr~=nil and plr~=Player and ffa or plr~=nil and plr.TeamColor~=Player.TeamColor then
  406. Box.Adornee = Mouse.Target
  407. mouse1press()
  408. wait()
  409. mouse1release()
  410. end
  411. RS.Heartbeat:wait()
  412. end
  413. Box:Destroy()
  414. elseif Input.KeyCode == toggle_esp then
  415. esp_toggled = not esp_toggled
  416. Notification({Title='ESP';Text='ESP was toggled '..(esp_toggled and 'On' or 'Off');Duration=2;})
  417. setText('Toggled ESP '..(esp_toggled and 'On' or 'Off'))
  418. elseif Input.KeyCode == toggle_aimbot then
  419. aimbot_toggled = not aimbot_toggled
  420. Notification({Title='AimBot';Text='AimBot was toggled '..(aimbot_toggled and 'On' or 'Off');Duration=2;})
  421. setText('Toggled AimBot '..(aimbot_toggled and 'On' or 'Off'))
  422. elseif Input.KeyCode == fov_increase then
  423. fov = fov + .5
  424. FovAdjust.Text = tonumber(fov)
  425. if FovGui.Visible then
  426. 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)
  427. end
  428. setText('Aim FOV: '..fov)
  429. elseif Input.KeyCode == fov_decrease and fov>0 then
  430. fov = fov - .5
  431. FovAdjust.Text = tonumber(fov)
  432. if FovGui.Visible then
  433. 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)
  434. end
  435. setText('Aim FOV: '..fov)
  436. elseif Input.KeyCode == sens_increase then
  437. sens = sens + .05
  438. SensAdjust.Text = tonumber(sens)
  439. setText('Sens: '..sens)
  440. elseif Input.KeyCode == sens_decrease then
  441. sens = sens - .05
  442. SensAdjust.Text = tonumber(sens)
  443. setText('Sens: '..sens)
  444. elseif Input.KeyCode == targetpart_change then
  445. val = val+1
  446. targetpart = val<=#parts and parts[val] or parts[1]
  447. if parts[1]==targetpart then val = 1 end
  448. Notification({Title='Target Part';Text='Target part set to '..targetpart;Duration=2;})
  449. setText('Target Part: '..targetpart)
  450. elseif Input.KeyCode == ffatoggle then
  451. ffa = not ffa
  452. Notification({Title='FFA Mode';Text='FFA Mode is '..(ffa and 'Enabled' or 'Disabled');Duration=2;})
  453. setText('FFA Mode: '..(ffa and 'Enabled' or 'Disabled'))
  454. elseif Input.KeyCode == priority_toggle then
  455. aim_priority = aim_priority+1>2 and 0 or 1
  456. aim_priority = aim_priority+1
  457. FovGui.Visible = aim_priority>1
  458. Notification({Title='Aim Priority';Text='Aim Priority: '..(aim_priority==1 and 'Distance' or 'FOV');Duration=2;})
  459. setText('Aim Priority: '..(aim_priority==1 and 'Distance' or 'FOV'))
  460. elseif Input.KeyCode == toggle_bones then
  461. esp_bones = not esp_bones
  462. if not esp_bones then
  463. for _,v in next,ESP:GetDescendants() do
  464. if v:IsA('Frame') and v.Name:match('-') then
  465. v:Destroy()
  466. end
  467. end
  468. end
  469. Notification({Title='ESP';Text='ESP Bones: '..(esp_bones and 'Enabled' or 'Disabled');Duration=2;})
  470. setText('Toggled ESP Bones '..(esp_bones and 'Enabled' or 'Disabled'))
  471. elseif Input.KeyCode == toggle_gui then
  472. hidden = not hidden
  473. for _,gui in next,GUI:GetDescendants() do
  474. if gui:IsA('GuiObject') and not hidden and not gui.Visible then
  475. gui.Visible = true
  476. Mouse.Icon = 'rbxassetid://'..mouseiconid
  477. elseif gui:IsA('GuiObject') and gui.Visible then
  478. gui.Visible = false
  479. esp_toggled = false
  480. Mouse.Icon = old_icon
  481. end
  482. end
  483. elseif Input.KeyCode == toggle_bottompos then
  484. bottompos = not bottompos
  485. if bottompos then
  486. Bottom.Position = UDim2.new(.5,0,1,1)
  487. end
  488. elseif Input.KeyCode == toggle_performance then
  489. performancemode = not performancemode
  490. setText('Performance Mode '..(performancemode and 'Enabled' or 'Disabled'))
  491. elseif Input.KeyCode == toggle_chams then
  492. esp_chams = not esp_chams
  493. setText('Chams '..(esp_chams and 'Enabled' or 'Disabled'))
  494. Notification({Title='ESP';Text='Chams: '..(esp_chams and 'Enabled' or 'Disabled');Duration=2;})
  495. elseif Input.KeyCode == toggle_tracers then
  496. esp_tracers = not esp_tracers
  497. setText('Tracers '..(esp_chams and 'Enabled' or 'Disabled'))
  498. Notification({Title='ESP';Text='Tracers: '..(esp_tracers and 'Enabled' or 'Disabled');Duration=2;})
  499. elseif Input.KeyCode == toggle_boxes then
  500. bounding_box = not bounding_box
  501. setText('Bounding Boxes '..(bounding_box and 'Enabled' or 'Disabled'))
  502. Notification({Title='ESP';Text='Bounding Boxes: '..(bounding_box and 'Enabled' or 'Disabled');Duration=2;})
  503. elseif Input.KeyCode == toggle_font then
  504. currentfont = (currentfont+1)>#fonts and 1 or currentfont+1
  505. for _,v in next,GUI:GetDescendants() do
  506. if v.Name~='KeysList' then
  507. if v:IsA('TextLabel') or v:IsA('TextButton') then
  508. v.Font = fonts[currentfont]
  509. end
  510. end
  511. end
  512. end
  513. end)
  514.  
  515. UIS.InputEnded:Connect(function(Input)
  516. if Input.KeyCode == toggle_aim or Input.UserInputType == toggle_aim then
  517. aim_toggled = false
  518. end
  519. end)
  520.  
  521. local function checkifspawned(x)
  522. spawned = false
  523. while not spawned and game.PlaceId==292439477 do
  524. spawned = distfromspawn(x)>200 and true or false
  525. wait(1/5)
  526. end
  527. spawned = true
  528. end
  529.  
  530. checkifspawned(Player)
  531. Player.CharacterAdded:Connect(function(c)
  532. checkifspawned(Player)
  533.  
  534. for _,v in next,ESP:GetDescendants() do
  535. if v:IsA('Frame') and v.Name:match('-') then
  536. v:Destroy()
  537. end
  538. end
  539. end)
  540.  
  541. Notification({Title='GameSense '..version;Text='Cheat loaded successfully.';Icon='rbxassetid://2572157833';Duration=10;})
  542. wait(.5)
  543. Notification({Title='GameSense '..version;Text='GameSense 2.0 has been released!.';Icon='rbxassetid://2572157833';Duration=10;})
  544. wait(.5)
  545. Notification({Title='Main Coder';Text='AvexusDev';Duration=4;Icon='https://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username=AvexusDev'})
  546. wait(.5)
  547. Notification({Title='Thank you!';Text='If you like this script, please leave a vouch on my thread!';Duration=4;})
  548.  
  549. RS.RenderStepped:Connect(function()
  550. if cursor then
  551. FovGui.Position = cursor.Position-UDim2.new(0,FovGui.AbsoluteSize.X/2,0,FovGui.AbsoluteSize.Y/2)
  552. Indicator.Position = cursor.Position+UDim2.new(0,0,0,40)
  553. end
  554. end)
  555.  
  556. Mouse.Button1Down:Connect(function()
  557. spawn(function()
  558. if FovGui.Visible then
  559. 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)
  560. wait(.1)
  561. 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)
  562. end
  563. end)
  564. end)
  565.  
  566. while true do
  567. Indicator.Text = (aim_priority>1 and 'FOV: '..fov or 'Distance') ..'\nSens: '..sens..(aim_toggled and '\nAiming' or '')
  568. if not bottompos then Bottom.Position = cursor.Position end
  569. if esp_toggled then
  570. for _,v in next,ESP:children() do
  571. if v~=Bottom and not Players:FindFirstChild(v.Name) then
  572. v:Destroy()
  573. end
  574. end
  575. for _,v in next,Players:GetPlayers() do
  576. local Char = v.Character
  577. if Char and spawned and v~=Player and Char:FindFirstChild(targetpart) and distfromspawn(v)>100 then
  578. if ffa or v.TeamColor~=Player.TeamColor then
  579. local X = Camera:GetPartsObscuringTarget({Camera.CFrame.p,Char[targetpart].CFrame.p},{v.Character,Char,Camera,unpack(windows)})
  580. local Dist = Player:DistanceFromCharacter(Char:FindFirstChild(targetpart).Position)
  581. local Color = hiddencolor
  582. local Folder = ESP:FindFirstChild(v.Name) or Instance.new('Folder',ESP)
  583. Folder.Name = v.Name
  584. -- ESP
  585. local Head = Folder:FindFirstChild('Head') or Instance.new('Frame',Folder)
  586. if not Folder:FindFirstChild('Head') then
  587. Head.Name = 'Head'
  588. Head.BorderSizePixel = 1
  589. Head.BorderColor3 = Color3.new(0,0,0)
  590. Head.BackgroundTransparency = 0
  591. end
  592. Head.BackgroundColor3 = #X>0 and hiddencolor or #X==0 and visiblecolor
  593. Head.Rotation = headboxshape=='diamond' and 45 or 0
  594. Head.ZIndex = 3
  595. local HP = Folder:FindFirstChild('HP') or Instance.new('TextLabel',Folder)
  596. if not Folder:FindFirstChild('HP') then
  597. HP.Name = 'HP'
  598. HP.TextTransparency = Head.BackgroundTransparency-.4
  599. HP.Font = fonts[currentfont]
  600. HP.TextStrokeTransparency = .6
  601. HP.BackgroundTransparency = 1
  602. HP.TextSize = 14
  603. end
  604. HP.Text = showdists and Char.Name..'\n'..math.floor(Dist+.5) or Char.Name
  605. if aim_toggled and target==Char then
  606. Head.Size = UDim2.new(0,headboxaimsize,0,headboxaimsize)
  607. Head.BackgroundColor3 = aimingcolor
  608. HP.Text = showdists and '['..Char.Name..']'..'\n'..math.floor(Dist+.5) or '['..Char.Name..']'
  609. HP.TextSize = 16
  610. else
  611. Head.Size = UDim2.new(0,headboxsize,0,headboxsize)
  612. end
  613. HP.TextColor3 = Head.BackgroundColor3
  614. local toScreen = Camera:WorldToScreenPoint(Char[targetpart].CFrame.p)
  615. if #X==0 then Color = visiblecolor end
  616. Head.Position = UDim2.new(0,toScreen.X-Head.Size.X.Offset/2,0,toScreen.Y-Head.Size.Y.Offset/2)
  617. HP.Position = Head.Position-UDim2.new(0,0,0,textoffset)
  618. if esp_tracers then
  619. local Line = DrawLine(Folder,ESP.Bottom,Head,linesize,Head.BackgroundColor3,.75,1,Color3.new(0,0,0))
  620. Line.Visible = Head.Visible
  621. else
  622. local imtired = Folder:FindFirstChild(ESP.Bottom.Name..'-'..Head.Name)
  623. if imtired then
  624. imtired:Destroy()
  625. end
  626. end
  627. if toScreen.Z<=0 then Head.Visible = false else Head.Visible = true end
  628. HP.Visible = Head.Visible
  629. if Char:FindFirstChild('Humanoid') and Char.Humanoid.RigType==Enum.HumanoidRigType.R6 then
  630. local Neck = Folder:FindFirstChild('Neck') or Instance.new('Frame',Folder)
  631. Neck.Name = 'Neck'
  632. Neck.ZIndex = 2
  633. if Char['Torso']~=nil then
  634. local Pos = (Char.Torso.CFrame*CFrame.new(0,.8,0)).p
  635. local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
  636. Neck.Position = UDim2.new(0,X,0,Y)
  637. Neck.BorderSizePixel = 0
  638. if Z<=0 then Neck.Visible = false else Neck.Visible = true end
  639. else
  640. Neck.Visible = false
  641. end
  642. --
  643. local Pelvis = Folder:FindFirstChild('Pelvis') or Instance.new('Frame',Folder)
  644. Pelvis.Name = 'Pelvis'
  645. Pelvis.ZIndex = 2
  646. Pelvis.BorderSizePixel = 0
  647. if Char['Torso']~=nil then
  648. local Pos = (Char.Torso.CFrame*CFrame.new(0,-1,0)).p
  649. local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
  650. Pelvis.Position = UDim2.new(0,X,0,Y)
  651. if Z<=0 then Pelvis.Visible = false else Pelvis.Visible = true end
  652. else
  653. Pelvis.Visible = false
  654. end
  655. --
  656. local RightFoot = Folder:FindFirstChild('Right Foot') or Instance.new('Frame',Folder)
  657. RightFoot.Name = 'Right Foot'
  658. RightFoot.ZIndex = 2
  659. RightFoot.BorderSizePixel = 0
  660. if Char['Right Leg']~=nil then
  661. local Pos = (Char['Right Leg'].CFrame*CFrame.new(0,-1,0)).p
  662. local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
  663. RightFoot.Position = UDim2.new(0,X,0,Y)
  664. if Z<=0 then RightFoot.Visible = false else RightFoot.Visible = true end
  665. else
  666. RightFoot.Visible = false
  667. end
  668. --
  669. local LeftFoot = Folder:FindFirstChild('Left Foot') or Instance.new('Frame',Folder)
  670. LeftFoot.Name = 'Left Foot'
  671. if Char['Left Leg']~=nil then
  672. local Pos = (Char['Left Leg'].CFrame*CFrame.new(0,-1,0)).p
  673. local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
  674. LeftFoot.Position = UDim2.new(0,X,0,Y)
  675. LeftFoot.BorderSizePixel = 0
  676. if Z<=0 then LeftFoot.Visible = false else LeftFoot.Visible = true end
  677. else
  678. LeftFoot.Visible = false
  679. end
  680. --
  681. local RightHand = Folder:FindFirstChild('Right Hand') or Instance.new('Frame',Folder)
  682. RightHand.Name = 'Right Hand'
  683. RightHand.ZIndex = 2
  684. RightHand.BorderSizePixel = 0
  685. if Char['Right Arm']~=nil then
  686. local Pos = (Char['Right Arm'].CFrame*CFrame.new(0,-1,0)).p
  687. local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
  688. RightHand.Position = UDim2.new(0,X,0,Y)
  689. if Z<=0 then RightHand.Visible = false else RightHand.Visible = true end
  690. else
  691. RightHand.Visible = false
  692. end
  693. --
  694. local LeftHand = Folder:FindFirstChild('Left Hand') or Instance.new('Frame',Folder)
  695. LeftHand.Name = 'Left Hand'
  696. LeftHand.ZIndex = 2
  697. LeftHand.BorderSizePixel = 0
  698. if Char['Left Arm']~=nil then
  699. local Pos = (Char['Left Arm'].CFrame*CFrame.new(0,-1,0)).p
  700. local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
  701. LeftHand.Position = UDim2.new(0,X,0,Y)
  702. if Z<=0 then LeftHand.Visible = false else LeftHand.Visible = true end
  703. else
  704. LeftHand.Visible = false
  705. end
  706. -- draw joints
  707. if esp_bones then
  708. if Head.Visible then DrawLine(Folder,Head,Neck,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
  709. if Neck.Visible then DrawLine(Folder,Neck,Pelvis,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
  710. if Neck.Visible then DrawLine(Folder,Neck,RightHand,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
  711. if Neck.Visible then DrawLine(Folder,Neck,LeftHand,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
  712. if Pelvis.Visible then DrawLine(Folder,Pelvis,RightFoot,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
  713. if Pelvis.Visible then DrawLine(Folder,Pelvis,LeftFoot,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
  714. end
  715. end
  716.  
  717. if esp_chams then
  718. for _,Part in next,Char:children() do
  719. if Part:IsA('BasePart') and Part.Name~='HumanoidRootPart' then
  720. local Adornment = Folder:FindFirstChild(Part.Name..'_Cham') or Instance.new('BoxHandleAdornment',Folder)
  721. if not Folder:FindFirstChild(Part.Name..'_Cham') then
  722. Adornment.Name = Part.Name..'_Cham'
  723. Adornment.Adornee = Part
  724. Adornment.AlwaysOnTop = true
  725. Adornment.Size = Part.Name=='Head' and Vector3.new(1,1,1) or Part.Size
  726. Adornment.ZIndex = 1
  727. end
  728. Adornment.Color3 = Head.BackgroundColor3
  729. end
  730. end
  731. else
  732. for _,v in next,Folder:GetDescendants() do
  733. if v.Name:match('Cham') then
  734. v:Destroy()
  735. end
  736. end
  737. end
  738.  
  739. if bounding_box and Char:FindFirstChild('HumanoidRootPart') then
  740. local Box = Char:FindFirstChild('Box') or Instance.new('BillboardGui',Char)
  741. if not Char:FindFirstChild('Box') then
  742. Box.Name = 'Box'
  743. Box.Adornee = Char:FindFirstChild('HumanoidRootPart')
  744. Box.AlwaysOnTop = true
  745. Box.LightInfluence = 0
  746. Box.StudsOffset = Vector3.new(0,-Box.Adornee.Size.Y/4,0)
  747. Box.Size = UDim2.new(4,1,5,1)
  748. local Top = Instance.new('Frame',Box)
  749. Top.Size = UDim2.new(1,0,0,box_line_size)
  750. Top.BorderSizePixel = 0
  751. local Bot = Top:Clone()
  752. Bot.Position = UDim2.new(0,0,1,-box_line_size)
  753. Bot.Parent = Box
  754. local Left = Top:Clone()
  755. Left.Size = UDim2.new(0,1,1,0)
  756. Left.Parent = Box
  757. local Right = Left:Clone()
  758. Right.Position = UDim2.new(1,-box_line_size,0,0)
  759. Right.Parent = Box
  760. end
  761. for _,v in next,Box:children() do
  762. if v:IsA('Frame') then
  763. v.BackgroundColor3 = Head.BackgroundColor3
  764. end
  765. end
  766. else
  767. local Box = Char:FindFirstChild('Box')
  768. if Box then
  769. Box:Destroy()
  770. end
  771. end
  772.  
  773. if lockedon and target and aim_line and ESP:FindFirstChild(target.Name) then
  774. DrawLine(ESP,cursor,ESP:FindFirstChild(target.Name).Head,1,Head.BackgroundColor3,.5)
  775. end
  776.  
  777. else
  778. if ESP:FindFirstChild(v.Name) then
  779. ESP:FindFirstChild(v.Name):Destroy()
  780. end
  781. end
  782. else
  783. if ESP:FindFirstChild(v.Name) then
  784. ESP:FindFirstChild(v.Name):Destroy()
  785. end
  786. end
  787. end
  788. else
  789. for _,v in next,ESP:children() do
  790. if v:IsA('Folder') then
  791. v:Destroy()
  792. end
  793. end
  794. end
  795. if performancemode then
  796. wait(1/(workspace:GetRealPhysicsFPS()*.75))
  797. else
  798. RS.Stepped:wait()
  799. end
  800. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement