HansCSia320

Phantom Forces best ESP for Proto

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