Advertisement
XDMANFROMXDWORLD

Gamesense

Mar 14th, 2020
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.29 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 and workspace:WaitForChild('Lobby',2):WaitForChild('Spawn1',2)
  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. 'HumanoidRootPart'
  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 = 13
  148. Credits.Text = 'GameSense '..version..' by Avexus || Modded by HamstaGang'
  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. alert = true
  359. while aim_toggled and aimbot_toggled do
  360. target = GetNearest(aim_priority)
  361. if target then
  362. local dist = Player:DistanceFromCharacter(target[targetpart].Position)
  363. local headpos = Camera:WorldToScreenPoint(target[targetpart].Position+Vector3.new(0,dist/(100/drop),0))
  364. local moveto = Vector2.new((headpos.X-Mouse.X)*sens,(headpos.Y-Mouse.Y)*sens)
  365. aimpos = GUI:FindFirstChild('AimPos') or Instance.new('Frame',GUI)
  366. if not GUI:FindFirstChild('AimPos') then
  367. aimpos.Name = 'AimPos'
  368. aimpos.BorderSizePixel = 1
  369. aimpos.BorderColor3 = Color3.new(0,0,0)
  370. aimpos.BackgroundTransparency = 0
  371. aimpos.BackgroundColor3 = Color3.new(1,1,1)
  372. aimpos.Rotation = 45
  373. aimpos.ZIndex = 4
  374. aimpos.Size = UDim2.new(0,3,0,3)
  375. end
  376. aimpos.Position = UDim2.new(0,headpos.X-aimpos.AbsoluteSize.X/2,0,headpos.Y-aimpos.AbsoluteSize.Y/2)
  377. aimpos.Visible = true
  378. mousemoverel(moveto.X,moveto.Y)
  379. if alert or target~=target_old then
  380. playsound(locksoundid)
  381. lockedon = true
  382. alert = false
  383. end
  384. end
  385. RS.Heartbeat:wait()
  386. target_old = target
  387. if aimpos then
  388. aimpos.Visible = false
  389. end
  390. end
  391. lockedon = false
  392. elseif Input.KeyCode == toggle_trigger then
  393. trigger_toggled = not trigger_toggled
  394. setText('Toggled TriggerBot '..(trigger_toggled and 'On' or 'Off'))
  395. Notification({Title='TriggerBot';Text='TriggerBot was toggled '..(trigger_toggled and 'On' or 'Off');Duration=2;})
  396. warn('trigger toggled',trigger_toggled and 'on' or 'off')
  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. RS.RenderStepped:Connect(function()
  542. if cursor then
  543. FovGui.Position = cursor.Position-UDim2.new(0,FovGui.AbsoluteSize.X/2,0,FovGui.AbsoluteSize.Y/2)
  544. Indicator.Position = cursor.Position+UDim2.new(0,0,0,40)
  545. end
  546. end)
  547.  
  548. Mouse.Button1Down:Connect(function()
  549. spawn(function()
  550. if FovGui.Visible then
  551. 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)
  552. wait(.1)
  553. 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)
  554. end
  555. end)
  556. end)
  557.  
  558. while true do
  559. Indicator.Text = (aim_priority>1 and 'FOV: '..fov or 'Distance') ..'\nSens: '..sens..(aim_toggled and '\nAiming' or '')
  560. if not bottompos then Bottom.Position = cursor.Position end
  561. if esp_toggled then
  562. for _,v in next,ESP:children() do
  563. if v~=Bottom and not Players:FindFirstChild(v.Name) then
  564. v:Destroy()
  565. end
  566. end
  567. for _,v in next,Players:GetPlayers() do
  568. local Char = v.Character
  569. if Char and spawned and v~=Player and Char:FindFirstChild(targetpart) and distfromspawn(v)>100 then
  570. if ffa or v.TeamColor~=Player.TeamColor then
  571. local X = Camera:GetPartsObscuringTarget({Camera.CFrame.p,Char[targetpart].CFrame.p},{v.Character,Char,Camera,unpack(windows)})
  572. local Dist = Player:DistanceFromCharacter(Char:FindFirstChild(targetpart).Position)
  573. local Color = hiddencolor
  574. local Folder = ESP:FindFirstChild(v.Name) or Instance.new('Folder',ESP)
  575. Folder.Name = v.Name
  576. -- ESP
  577. local Head = Folder:FindFirstChild('Head') or Instance.new('Frame',Folder)
  578. if not Folder:FindFirstChild('Head') then
  579. Head.Name = 'Head'
  580. Head.BorderSizePixel = 1
  581. Head.BorderColor3 = Color3.new(0,0,0)
  582. Head.BackgroundTransparency = 0
  583. end
  584. Head.BackgroundColor3 = #X>0 and hiddencolor or #X==0 and visiblecolor
  585. Head.Rotation = headboxshape=='diamond' and 45 or 0
  586. Head.ZIndex = 3
  587. local HP = Folder:FindFirstChild('HP') or Instance.new('TextLabel',Folder)
  588. if not Folder:FindFirstChild('HP') then
  589. HP.Name = 'HP'
  590. HP.TextTransparency = Head.BackgroundTransparency-.4
  591. HP.Font = fonts[currentfont]
  592. HP.TextStrokeTransparency = .6
  593. HP.BackgroundTransparency = 1
  594. HP.TextSize = 14
  595. end
  596. HP.Text = showdists and Char.Name..'\n'..math.floor(Dist+.5) or Char.Name
  597. if aim_toggled and target==Char then
  598. Head.Size = UDim2.new(0,headboxaimsize,0,headboxaimsize)
  599. Head.BackgroundColor3 = aimingcolor
  600. HP.Text = showdists and '['..Char.Name..']'..'\n'..math.floor(Dist+.5) or '['..Char.Name..']'
  601. HP.TextSize = 16
  602. else
  603. Head.Size = UDim2.new(0,headboxsize,0,headboxsize)
  604. end
  605. HP.TextColor3 = Head.BackgroundColor3
  606. local toScreen = Camera:WorldToScreenPoint(Char[targetpart].CFrame.p)
  607. if #X==0 then Color = visiblecolor end
  608. Head.Position = UDim2.new(0,toScreen.X-Head.Size.X.Offset/2,0,toScreen.Y-Head.Size.Y.Offset/2)
  609. HP.Position = Head.Position-UDim2.new(0,0,0,textoffset)
  610. if esp_tracers then
  611. local Line = DrawLine(Folder,ESP.Bottom,Head,linesize,Head.BackgroundColor3,.75,1,Color3.new(0,0,0))
  612. Line.Visible = Head.Visible
  613. else
  614. local imtired = Folder:FindFirstChild(ESP.Bottom.Name..'-'..Head.Name)
  615. if imtired then
  616. imtired:Destroy()
  617. end
  618. end
  619. if toScreen.Z<=0 then Head.Visible = false else Head.Visible = true end
  620. HP.Visible = Head.Visible
  621. if Char:FindFirstChild('Humanoid') then
  622. local Neck = Folder:FindFirstChild('Neck') or Instance.new('Frame',Folder)
  623. Neck.Name = 'Neck'
  624. Neck.ZIndex = 2
  625. if Char['HumanoidRootPart']~=nil then
  626. local Pos = (Char.HumanoidRootPart.CFrame*CFrame.new(0,.8,0)).p
  627. local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
  628. Neck.Position = UDim2.new(0,X,0,Y)
  629. Neck.BorderSizePixel = 0
  630. if Z<=0 then Neck.Visible = false else Neck.Visible = true end
  631. else
  632. Neck.Visible = false
  633. end
  634. --
  635. local Pelvis = Folder:FindFirstChild('Pelvis') or Instance.new('Frame',Folder)
  636. Pelvis.Name = 'Pelvis'
  637. Pelvis.ZIndex = 2
  638. Pelvis.BorderSizePixel = 0
  639. if Char['HumanoidRootPart']~=nil then
  640. local Pos = (Char.HumanoidRootPart.CFrame*CFrame.new(0,-1,0)).p
  641. local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
  642. Pelvis.Position = UDim2.new(0,X,0,Y)
  643. if Z<=0 then Pelvis.Visible = false else Pelvis.Visible = true end
  644. else
  645. Pelvis.Visible = false
  646. end
  647. --
  648. local RightFoot = Folder:FindFirstChild('Right Foot') or Instance.new('Frame',Folder)
  649. RightFoot.Name = 'Right Foot'
  650. RightFoot.ZIndex = 2
  651. RightFoot.BorderSizePixel = 0
  652. if Char['RightUpperLeg']~=nil then
  653. local Pos = (Char['RightUpperLeg'].CFrame*CFrame.new(0,-1,0)).p
  654. local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
  655. RightFoot.Position = UDim2.new(0,X,0,Y)
  656. if Z<=0 then RightFoot.Visible = false else RightFoot.Visible = true end
  657. else
  658. RightFoot.Visible = false
  659. end
  660. --
  661. local LeftFoot = Folder:FindFirstChild('Left Foot') or Instance.new('Frame',Folder)
  662. LeftFoot.Name = 'Left Foot'
  663. if Char['LeftUpperLeg']~=nil then
  664. local Pos = (Char['LeftUpperLeg'].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. LeftFoot.Position = UDim2.new(0,X,0,Y)
  667. LeftFoot.BorderSizePixel = 0
  668. if Z<=0 then LeftFoot.Visible = false else LeftFoot.Visible = true end
  669. else
  670. LeftFoot.Visible = false
  671. end
  672. --
  673. local RightHand = Folder:FindFirstChild('Right Hand') or Instance.new('Frame',Folder)
  674. RightHand.Name = 'Right Hand'
  675. RightHand.ZIndex = 2
  676. RightHand.BorderSizePixel = 0
  677. if Char['RightUpperArm']~=nil then
  678. local Pos = (Char['RightUpperArm'].CFrame*CFrame.new(0,-1,0)).p
  679. local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
  680. RightHand.Position = UDim2.new(0,X,0,Y)
  681. if Z<=0 then RightHand.Visible = false else RightHand.Visible = true end
  682. else
  683. RightHand.Visible = false
  684. end
  685. --
  686. local LeftHand = Folder:FindFirstChild('Left Hand') or Instance.new('Frame',Folder)
  687. LeftHand.Name = 'Left Hand'
  688. LeftHand.ZIndex = 2
  689. LeftHand.BorderSizePixel = 0
  690. if Char['LeftUpperArm']~=nil then
  691. local Pos = (Char['LeftUpperArm'].CFrame*CFrame.new(0,-1,0)).p
  692. local X,Y,Z = Camera:WorldToScreenPoint(Pos).X,Camera:WorldToScreenPoint(Pos).Y,Camera:WorldToScreenPoint(Pos).Z
  693. LeftHand.Position = UDim2.new(0,X,0,Y)
  694. if Z<=0 then LeftHand.Visible = false else LeftHand.Visible = true end
  695. else
  696. LeftHand.Visible = false
  697. end
  698. -- draw joints
  699. if esp_bones then
  700. if Head.Visible then DrawLine(Folder,Head,Neck,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
  701. if Neck.Visible then DrawLine(Folder,Neck,Pelvis,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
  702. if Neck.Visible then DrawLine(Folder,Neck,RightHand,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
  703. if Neck.Visible then DrawLine(Folder,Neck,LeftHand,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
  704. if Pelvis.Visible then DrawLine(Folder,Pelvis,RightFoot,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
  705. if Pelvis.Visible then DrawLine(Folder,Pelvis,LeftFoot,1,Color3.new(1,1,1),Head.BackgroundTransparency) end
  706. end
  707. end
  708.  
  709. if esp_chams then
  710. for _,Part in next,Char:children() do
  711. if Part:IsA('BasePart') and Part.Name~='HumanoidRootPart' then
  712. local Adornment = Folder:FindFirstChild(Part.Name..'_Cham') or Instance.new('BoxHandleAdornment',Folder)
  713. if not Folder:FindFirstChild(Part.Name..'_Cham') then
  714. Adornment.Name = Part.Name..'_Cham'
  715. Adornment.Adornee = Part
  716. Adornment.AlwaysOnTop = true
  717. Adornment.Size = Part.Name=='Head' and Vector3.new(1,1,1) or Part.Size
  718. Adornment.ZIndex = 1
  719. end
  720. Adornment.Color3 = Head.BackgroundColor3
  721. end
  722. end
  723. else
  724. for _,v in next,Folder:GetDescendants() do
  725. if v.Name:match('Cham') then
  726. v:Destroy()
  727. end
  728. end
  729. end
  730.  
  731. if bounding_box and Char:FindFirstChild('HumanoidRootPart') then
  732. local Box = Char:FindFirstChild('Box') or Instance.new('BillboardGui',Char)
  733. if not Char:FindFirstChild('Box') then
  734. Box.Name = 'Box'
  735. Box.Adornee = Char:FindFirstChild('HumanoidRootPart')
  736. Box.AlwaysOnTop = true
  737. Box.LightInfluence = 0
  738. Box.StudsOffset = Vector3.new(0,-Box.Adornee.Size.Y/4,0)
  739. Box.Size = UDim2.new(4,1,5,1)
  740. local Top = Instance.new('Frame',Box)
  741. Top.Size = UDim2.new(1,0,0,box_line_size)
  742. Top.BorderSizePixel = 0
  743. local Bot = Top:Clone()
  744. Bot.Position = UDim2.new(0,0,1,-box_line_size)
  745. Bot.Parent = Box
  746. local Left = Top:Clone()
  747. Left.Size = UDim2.new(0,1,1,0)
  748. Left.Parent = Box
  749. local Right = Left:Clone()
  750. Right.Position = UDim2.new(1,-box_line_size,0,0)
  751. Right.Parent = Box
  752. end
  753. for _,v in next,Box:children() do
  754. if v:IsA('Frame') then
  755. v.BackgroundColor3 = Head.BackgroundColor3
  756. end
  757. end
  758. else
  759. local Box = Char:FindFirstChild('Box')
  760. if Box then
  761. Box:Destroy()
  762. end
  763. end
  764.  
  765. if lockedon and target and aim_line and ESP:FindFirstChild(target.Name) then
  766. DrawLine(ESP,cursor,ESP:FindFirstChild(target.Name).Head,1,Head.BackgroundColor3,.5)
  767. end
  768.  
  769. else
  770. if ESP:FindFirstChild(v.Name) then
  771. ESP:FindFirstChild(v.Name):Destroy()
  772. end
  773. end
  774. else
  775. if ESP:FindFirstChild(v.Name) then
  776. ESP:FindFirstChild(v.Name):Destroy()
  777. end
  778. end
  779. end
  780. else
  781. for _,v in next,ESP:children() do
  782. if v:IsA('Folder') then
  783. v:Destroy()
  784. end
  785. end
  786. end
  787. if performancemode then
  788. wait(1/(workspace:GetRealPhysicsFPS()*.75))
  789. else
  790. RS.Stepped:wait()
  791. end
  792. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement