Advertisement
Guest User

best lost script of all time

a guest
Feb 14th, 2020
19,091
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.91 KB | None | 0 0
  1. loadstring(game:HttpGet("https://pastebin.com/raw/qc7y8Xrz", true))()
  2. loadstring(game:HttpGet("https://pastebin.com/raw/UmhaEvTT",true))()
  3. loadstring(game:HttpGet(('https://raw.githubusercontent.com/EdgeIY/infiniteyield/master/source'),true))()
  4. local pi = math.pi
  5. local abs = math.abs
  6. local clamp = math.clamp
  7. local exp = math.exp
  8. local rad = math.rad
  9. local sign = math.sign
  10. local sqrt = math.sqrt
  11. local tan = math.tan
  12.  
  13. local ContextActionService = game:GetService("ContextActionService")
  14. local Players = game:GetService("Players")
  15. local RunService = game:GetService("RunService")
  16. local StarterGui = game:GetService("StarterGui")
  17. local UserInputService = game:GetService("UserInputService")
  18. local Workspace = game:GetService("Workspace")
  19.  
  20. local LocalPlayer = Players.LocalPlayer
  21. if not LocalPlayer then
  22. Players:GetPropertyChangedSignal("LocalPlayer"):Wait()
  23. LocalPlayer = Players.LocalPlayer
  24. end
  25.  
  26. local Camera = Workspace.CurrentCamera
  27. Workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function()
  28. local newCamera = Workspace.CurrentCamera
  29. if newCamera then
  30. Camera = newCamera
  31. end
  32. end)
  33.  
  34. ------------------------------------------------------------------------
  35.  
  36. local TOGGLE_INPUT_PRIORITY = Enum.ContextActionPriority.Low.Value
  37. local INPUT_PRIORITY = Enum.ContextActionPriority.High.Value
  38. local FREECAM_MACRO_KB = {Enum.KeyCode.LeftShift, Enum.KeyCode.P}
  39.  
  40. local NAV_GAIN = Vector3.new(1, 1, 1)*64
  41. local PAN_GAIN = Vector2.new(0.75, 1)*8
  42. local FOV_GAIN = 300
  43.  
  44. local PITCH_LIMIT = rad(90)
  45.  
  46. local VEL_STIFFNESS = 1.5
  47. local PAN_STIFFNESS = 1.0
  48. local FOV_STIFFNESS = 4.0
  49.  
  50. ------------------------------------------------------------------------
  51.  
  52. local Spring = {} do
  53. Spring.__index = Spring
  54.  
  55. function Spring.new(freq, pos)
  56. local self = setmetatable({}, Spring)
  57. self.f = freq
  58. self.p = pos
  59. self.v = pos*0
  60. return self
  61. end
  62.  
  63. function Spring:Update(dt, goal)
  64. local f = self.f*2*pi
  65. local p0 = self.p
  66. local v0 = self.v
  67.  
  68. local offset = goal - p0
  69. local decay = exp(-f*dt)
  70.  
  71. local p1 = goal + (v0*dt - offset*(f*dt + 1))*decay
  72. local v1 = (f*dt*(offset*f - v0) + v0)*decay
  73.  
  74. self.p = p1
  75. self.v = v1
  76.  
  77. return p1
  78. end
  79.  
  80. function Spring:Reset(pos)
  81. self.p = pos
  82. self.v = pos*0
  83. end
  84. end
  85.  
  86. ------------------------------------------------------------------------
  87.  
  88. local cameraPos = Vector3.new()
  89. local cameraRot = Vector2.new()
  90. local cameraFov = 0
  91.  
  92. local velSpring = Spring.new(VEL_STIFFNESS, Vector3.new())
  93. local panSpring = Spring.new(PAN_STIFFNESS, Vector2.new())
  94. local fovSpring = Spring.new(FOV_STIFFNESS, 0)
  95.  
  96. ------------------------------------------------------------------------
  97.  
  98. local Input = {} do
  99. local thumbstickCurve do
  100. local K_CURVATURE = 2.0
  101. local K_DEADZONE = 0.15
  102.  
  103. local function fCurve(x)
  104. return (exp(K_CURVATURE*x) - 1)/(exp(K_CURVATURE) - 1)
  105. end
  106.  
  107. local function fDeadzone(x)
  108. return fCurve((x - K_DEADZONE)/(1 - K_DEADZONE))
  109. end
  110.  
  111. function thumbstickCurve(x)
  112. return sign(x)*clamp(fDeadzone(abs(x)), 0, 1)
  113. end
  114. end
  115.  
  116. local gamepad = {
  117. ButtonX = 0,
  118. ButtonY = 0,
  119. DPadDown = 0,
  120. DPadUp = 0,
  121. ButtonL2 = 0,
  122. ButtonR2 = 0,
  123. Thumbstick1 = Vector2.new(),
  124. Thumbstick2 = Vector2.new(),
  125. }
  126.  
  127. local keyboard = {
  128. W = 0,
  129. A = 0,
  130. S = 0,
  131. D = 0,
  132. E = 0,
  133. Q = 0,
  134. U = 0,
  135. H = 0,
  136. J = 0,
  137. K = 0,
  138. I = 0,
  139. Y = 0,
  140. Up = 0,
  141. Down = 0,
  142. LeftShift = 0,
  143. RightShift = 0,
  144. }
  145.  
  146. local mouse = {
  147. Delta = Vector2.new(),
  148. MouseWheel = 0,
  149. }
  150.  
  151. local NAV_GAMEPAD_SPEED = Vector3.new(1, 1, 1)
  152. local NAV_KEYBOARD_SPEED = Vector3.new(1, 1, 1)
  153. local PAN_MOUSE_SPEED = Vector2.new(1, 1)*(pi/64)
  154. local PAN_GAMEPAD_SPEED = Vector2.new(1, 1)*(pi/8)
  155. local FOV_WHEEL_SPEED = 1.0
  156. local FOV_GAMEPAD_SPEED = 0.25
  157. local NAV_ADJ_SPEED = 0.75
  158. local NAV_SHIFT_MUL = 0.25
  159.  
  160. local navSpeed = 1
  161.  
  162. function Input.Vel(dt)
  163. navSpeed = clamp(navSpeed + dt*(keyboard.Up - keyboard.Down)*NAV_ADJ_SPEED, 0.01, 4)
  164.  
  165. local kGamepad = Vector3.new(
  166. thumbstickCurve(gamepad.Thumbstick1.x),
  167. thumbstickCurve(gamepad.ButtonR2) - thumbstickCurve(gamepad.ButtonL2),
  168. thumbstickCurve(-gamepad.Thumbstick1.y)
  169. )*NAV_GAMEPAD_SPEED
  170.  
  171. local kKeyboard = Vector3.new(
  172. keyboard.D - keyboard.A + keyboard.K - keyboard.H,
  173. keyboard.E - keyboard.Q + keyboard.I - keyboard.Y,
  174. keyboard.S - keyboard.W + keyboard.J - keyboard.U
  175. )*NAV_KEYBOARD_SPEED
  176.  
  177. local shift = UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) or UserInputService:IsKeyDown(Enum.KeyCode.RightShift)
  178.  
  179. return (kGamepad + kKeyboard)*(navSpeed*(shift and NAV_SHIFT_MUL or 1))
  180. end
  181.  
  182. function Input.Pan(dt)
  183. local kGamepad = Vector2.new(
  184. thumbstickCurve(gamepad.Thumbstick2.y),
  185. thumbstickCurve(-gamepad.Thumbstick2.x)
  186. )*PAN_GAMEPAD_SPEED
  187. local kMouse = mouse.Delta*PAN_MOUSE_SPEED
  188. mouse.Delta = Vector2.new()
  189. return kGamepad + kMouse
  190. end
  191.  
  192. function Input.Fov(dt)
  193. local kGamepad = (gamepad.ButtonX - gamepad.ButtonY)*FOV_GAMEPAD_SPEED
  194. local kMouse = mouse.MouseWheel*FOV_WHEEL_SPEED
  195. mouse.MouseWheel = 0
  196. return kGamepad + kMouse
  197. end
  198.  
  199. do
  200. local function Keypress(action, state, input)
  201. keyboard[input.KeyCode.Name] = state == Enum.UserInputState.Begin and 1 or 0
  202. return Enum.ContextActionResult.Sink
  203. end
  204.  
  205. local function GpButton(action, state, input)
  206. gamepad[input.KeyCode.Name] = state == Enum.UserInputState.Begin and 1 or 0
  207. return Enum.ContextActionResult.Sink
  208. end
  209.  
  210. local function MousePan(action, state, input)
  211. local delta = input.Delta
  212. mouse.Delta = Vector2.new(-delta.y, -delta.x)
  213. return Enum.ContextActionResult.Sink
  214. end
  215.  
  216. local function Thumb(action, state, input)
  217. gamepad[input.KeyCode.Name] = input.Position
  218. return Enum.ContextActionResult.Sink
  219. end
  220.  
  221. local function Trigger(action, state, input)
  222. gamepad[input.KeyCode.Name] = input.Position.z
  223. return Enum.ContextActionResult.Sink
  224. end
  225.  
  226. local function MouseWheel(action, state, input)
  227. mouse[input.UserInputType.Name] = -input.Position.z
  228. return Enum.ContextActionResult.Sink
  229. end
  230.  
  231. local function Zero(t)
  232. for k, v in pairs(t) do
  233. t[k] = v*0
  234. end
  235. end
  236.  
  237. function Input.StartCapture()
  238. ContextActionService:BindActionAtPriority("FreecamKeyboard", Keypress, false, INPUT_PRIORITY,
  239. Enum.KeyCode.W, Enum.KeyCode.U,
  240. Enum.KeyCode.A, Enum.KeyCode.H,
  241. Enum.KeyCode.S, Enum.KeyCode.J,
  242. Enum.KeyCode.D, Enum.KeyCode.K,
  243. Enum.KeyCode.E, Enum.KeyCode.I,
  244. Enum.KeyCode.Q, Enum.KeyCode.Y,
  245. Enum.KeyCode.Up, Enum.KeyCode.Down
  246. )
  247. ContextActionService:BindActionAtPriority("FreecamMousePan", MousePan, false, INPUT_PRIORITY, Enum.UserInputType.MouseMovement)
  248. ContextActionService:BindActionAtPriority("FreecamMouseWheel", MouseWheel, false, INPUT_PRIORITY, Enum.UserInputType.MouseWheel)
  249. ContextActionService:BindActionAtPriority("FreecamGamepadButton", GpButton, false, INPUT_PRIORITY, Enum.KeyCode.ButtonX, Enum.KeyCode.ButtonY)
  250. ContextActionService:BindActionAtPriority("FreecamGamepadTrigger", Trigger, false, INPUT_PRIORITY, Enum.KeyCode.ButtonR2, Enum.KeyCode.ButtonL2)
  251. ContextActionService:BindActionAtPriority("FreecamGamepadThumbstick", Thumb, false, INPUT_PRIORITY, Enum.KeyCode.Thumbstick1, Enum.KeyCode.Thumbstick2)
  252. end
  253.  
  254. function Input.StopCapture()
  255. navSpeed = 1
  256. Zero(gamepad)
  257. Zero(keyboard)
  258. Zero(mouse)
  259. ContextActionService:UnbindAction("FreecamKeyboard")
  260. ContextActionService:UnbindAction("FreecamMousePan")
  261. ContextActionService:UnbindAction("FreecamMouseWheel")
  262. ContextActionService:UnbindAction("FreecamGamepadButton")
  263. ContextActionService:UnbindAction("FreecamGamepadTrigger")
  264. ContextActionService:UnbindAction("FreecamGamepadThumbstick")
  265. end
  266. end
  267. end
  268.  
  269. local function GetFocusDistance(cameraFrame)
  270. local znear = 0.1
  271. local viewport = Camera.ViewportSize
  272. local projy = 2*tan(cameraFov/2)
  273. local projx = viewport.x/viewport.y*projy
  274. local fx = cameraFrame.rightVector
  275. local fy = cameraFrame.upVector
  276. local fz = cameraFrame.lookVector
  277.  
  278. local minVect = Vector3.new()
  279. local minDist = 512
  280.  
  281. for x = 0, 1, 0.5 do
  282. for y = 0, 1, 0.5 do
  283. local cx = (x - 0.5)*projx
  284. local cy = (y - 0.5)*projy
  285. local offset = fx*cx - fy*cy + fz
  286. local origin = cameraFrame.p + offset*znear
  287. local _, hit = Workspace:FindPartOnRay(Ray.new(origin, offset.unit*minDist))
  288. local dist = (hit - origin).magnitude
  289. if minDist > dist then
  290. minDist = dist
  291. minVect = offset.unit
  292. end
  293. end
  294. end
  295.  
  296. return fz:Dot(minVect)*minDist
  297. end
  298.  
  299. ------------------------------------------------------------------------
  300.  
  301. local function StepFreecam(dt)
  302. local vel = velSpring:Update(dt, Input.Vel(dt))
  303. local pan = panSpring:Update(dt, Input.Pan(dt))
  304. local fov = fovSpring:Update(dt, Input.Fov(dt))
  305.  
  306. local zoomFactor = sqrt(tan(rad(70/2))/tan(rad(cameraFov/2)))
  307.  
  308. cameraFov = clamp(cameraFov + fov*FOV_GAIN*(dt/zoomFactor), 1, 120)
  309. cameraRot = cameraRot + pan*PAN_GAIN*(dt/zoomFactor)
  310. cameraRot = Vector2.new(clamp(cameraRot.x, -PITCH_LIMIT, PITCH_LIMIT), cameraRot.y%(2*pi))
  311.  
  312. local cameraCFrame = CFrame.new(cameraPos)*CFrame.fromOrientation(cameraRot.x, cameraRot.y, 0)*CFrame.new(vel*NAV_GAIN*dt)
  313. cameraPos = cameraCFrame.p
  314.  
  315. Camera.CFrame = cameraCFrame
  316. Camera.Focus = cameraCFrame*CFrame.new(0, 0, -GetFocusDistance(cameraCFrame))
  317. Camera.FieldOfView = cameraFov
  318. end
  319.  
  320. ------------------------------------------------------------------------
  321.  
  322. local PlayerState = {} do
  323. local mouseBehavior
  324. local mouseIconEnabled
  325. local cameraType
  326. local cameraFocus
  327. local cameraCFrame
  328. local cameraFieldOfView
  329. local screenGuis = {}
  330. local coreGuis = {
  331. Backpack = true,
  332. Chat = true,
  333. Health = true,
  334. PlayerList = true,
  335. }
  336. local setCores = {
  337. BadgesNotificationsActive = true,
  338. PointsNotificationsActive = true,
  339. }
  340.  
  341. -- Save state and set up for freecam
  342. function PlayerState.Push()
  343. for name in pairs(coreGuis) do
  344. coreGuis[name] = StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType[name])
  345. StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType[name], false)
  346. end
  347. for name in pairs(setCores) do
  348. setCores[name] = StarterGui:GetCore(name)
  349. StarterGui:SetCore(name, false)
  350. end
  351. local playergui = LocalPlayer:FindFirstChildOfClass("PlayerGui")
  352. if playergui then
  353. for _, gui in pairs(playergui:GetChildren()) do
  354. if gui:IsA("ScreenGui") and gui.Enabled then
  355. screenGuis[#screenGuis + 1] = gui
  356. gui.Enabled = false
  357. end
  358. end
  359. end
  360.  
  361. cameraFieldOfView = Camera.FieldOfView
  362. Camera.FieldOfView = 70
  363.  
  364. cameraType = Camera.CameraType
  365. Camera.CameraType = Enum.CameraType.Custom
  366.  
  367. cameraCFrame = Camera.CFrame
  368. cameraFocus = Camera.Focus
  369.  
  370. mouseIconEnabled = UserInputService.MouseIconEnabled
  371. UserInputService.MouseIconEnabled = false
  372.  
  373. mouseBehavior = UserInputService.MouseBehavior
  374. UserInputService.MouseBehavior = Enum.MouseBehavior.Default
  375. end
  376.  
  377. -- Restore state
  378. function PlayerState.Pop()
  379. for name, isEnabled in pairs(coreGuis) do
  380. StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType[name], isEnabled)
  381. end
  382. for name, isEnabled in pairs(setCores) do
  383. StarterGui:SetCore(name, isEnabled)
  384. end
  385. for _, gui in pairs(screenGuis) do
  386. if gui.Parent then
  387. gui.Enabled = true
  388. end
  389. end
  390.  
  391. Camera.FieldOfView = cameraFieldOfView
  392. cameraFieldOfView = nil
  393.  
  394. Camera.CameraType = cameraType
  395. cameraType = nil
  396.  
  397. Camera.CFrame = cameraCFrame
  398. cameraCFrame = nil
  399.  
  400. Camera.Focus = cameraFocus
  401. cameraFocus = nil
  402.  
  403. UserInputService.MouseIconEnabled = mouseIconEnabled
  404. mouseIconEnabled = nil
  405.  
  406. UserInputService.MouseBehavior = mouseBehavior
  407. mouseBehavior = nil
  408. end
  409. end
  410.  
  411. local function StartFreecam()
  412. local cameraCFrame = Camera.CFrame
  413. cameraRot = Vector2.new(cameraCFrame:toEulerAnglesYXZ())
  414. cameraPos = cameraCFrame.p
  415. cameraFov = Camera.FieldOfView
  416.  
  417. velSpring:Reset(Vector3.new())
  418. panSpring:Reset(Vector2.new())
  419. fovSpring:Reset(0)
  420.  
  421. PlayerState.Push()
  422. RunService:BindToRenderStep("Freecam", Enum.RenderPriority.Camera.Value, StepFreecam)
  423. Input.StartCapture()
  424. end
  425.  
  426. local function StopFreecam()
  427. Input.StopCapture()
  428. RunService:UnbindFromRenderStep("Freecam")
  429. PlayerState.Pop()
  430. end
  431.  
  432. ------------------------------------------------------------------------
  433.  
  434. do
  435. local enabled = false
  436.  
  437. local function ToggleFreecam()
  438. if enabled then
  439. StopFreecam()
  440. else
  441. StartFreecam()
  442. end
  443. enabled = not enabled
  444. end
  445.  
  446. local function CheckMacro(macro)
  447. for i = 1, #macro - 1 do
  448. if not UserInputService:IsKeyDown(macro[i]) then
  449. return
  450. end
  451. end
  452. ToggleFreecam()
  453. end
  454.  
  455. local function HandleActivationInput(action, state, input)
  456. if state == Enum.UserInputState.Begin then
  457. if input.KeyCode == FREECAM_MACRO_KB[#FREECAM_MACRO_KB] then
  458. CheckMacro(FREECAM_MACRO_KB)
  459. end
  460. end
  461. return Enum.ContextActionResult.Pass
  462. end
  463.  
  464. ContextActionService:BindActionAtPriority("FreecamToggle", HandleActivationInput, false, TOGGLE_INPUT_PRIORITY, FREECAM_MACRO_KB[#FREECAM_MACRO_KB])
  465. end
  466. PLAYER = game.Players.LocalPlayer
  467. MOUSE = PLAYER:GetMouse()
  468. CC = game.Workspace.CurrentCamera
  469.  
  470. ENABLED = false
  471. ESP_ENABLED = false
  472.  
  473. _G.FREE_FOR_ALL = true
  474.  
  475. _G.BIND = 50
  476. _G.ESP_BIND = 52
  477. _G.CHANGE_AIM = 'q'
  478.  
  479. _G.AIM_AT = 'Head'
  480.  
  481. wait(1)
  482.  
  483. function GetNearestPlayerToMouse()
  484. local PLAYERS = {}
  485. local PLAYER_HOLD = {}
  486. local DISTANCES = {}
  487. for i, v in pairs(game.Players:GetPlayers()) do
  488. if v ~= PLAYER then
  489. table.insert(PLAYERS, v)
  490. end
  491. end
  492. for i, v in pairs(PLAYERS) do
  493. if _G.FREE_FOR_ALL == false then
  494. if v and (v.Character) ~= nil and v.TeamColor ~= PLAYER.TeamColor then
  495. local AIM = v.Character:FindFirstChild(_G.AIM_AT)
  496. if AIM ~= nil then
  497. local DISTANCE = (AIM.Position - game.Workspace.CurrentCamera.CoordinateFrame.p).magnitude
  498. local RAY = Ray.new(game.Workspace.CurrentCamera.CoordinateFrame.p, (MOUSE.Hit.p - CC.CoordinateFrame.p).unit * DISTANCE)
  499. local HIT,POS = game.Workspace:FindPartOnRay(RAY, game.Workspace)
  500. local DIFF = math.floor((POS - AIM.Position).magnitude)
  501. PLAYER_HOLD[v.Name .. i] = {}
  502. PLAYER_HOLD[v.Name .. i].dist = DISTANCE
  503. PLAYER_HOLD[v.Name .. i].plr = v
  504. PLAYER_HOLD[v.Name .. i].diff = DIFF
  505. table.insert(DISTANCES, DIFF)
  506. end
  507. end
  508. elseif _G.FREE_FOR_ALL == true then
  509. local AIM = v.Character:FindFirstChild(_G.AIM_AT)
  510. if AIM ~= nil then
  511. local DISTANCE = (AIM.Position - game.Workspace.CurrentCamera.CoordinateFrame.p).magnitude
  512. local RAY = Ray.new(game.Workspace.CurrentCamera.CoordinateFrame.p, (MOUSE.Hit.p - CC.CoordinateFrame.p).unit * DISTANCE)
  513. local HIT,POS = game.Workspace:FindPartOnRay(RAY, game.Workspace)
  514. local DIFF = math.floor((POS - AIM.Position).magnitude)
  515. PLAYER_HOLD[v.Name .. i] = {}
  516. PLAYER_HOLD[v.Name .. i].dist = DISTANCE
  517. PLAYER_HOLD[v.Name .. i].plr = v
  518. PLAYER_HOLD[v.Name .. i].diff = DIFF
  519. table.insert(DISTANCES, DIFF)
  520. end
  521. end
  522. end
  523.  
  524. if unpack(DISTANCES) == nil then
  525. return false
  526. end
  527.  
  528. local L_DISTANCE = math.floor(math.min(unpack(DISTANCES)))
  529. if L_DISTANCE > 20 then
  530. return false
  531. end
  532.  
  533. for i, v in pairs(PLAYER_HOLD) do
  534. if v.diff == L_DISTANCE then
  535. return v.plr
  536. end
  537. end
  538. return false
  539. end
  540.  
  541. GUI_MAIN = Instance.new('ScreenGui', game.CoreGui)
  542. GUI_TARGET = Instance.new('TextLabel', GUI_MAIN)
  543. GUI_AIM_AT = Instance.new('TextLabel', GUI_MAIN)
  544.  
  545. GUI_MAIN.Name = 'AIMBOT'
  546.  
  547. GUI_TARGET.Size = UDim2.new(0,200,0,30)
  548. GUI_TARGET.BackgroundTransparency = 0.5
  549. GUI_TARGET.BackgroundColor = BrickColor.new('Fossil')
  550. GUI_TARGET.BorderSizePixel = 0
  551. GUI_TARGET.Position = UDim2.new(0.5,-100,0,0)
  552. GUI_TARGET.Text = 'AIMBOT : OFF'
  553. GUI_TARGET.TextColor3 = Color3.new(1,1,1)
  554. GUI_TARGET.TextStrokeTransparency = 1
  555. GUI_TARGET.TextWrapped = true
  556. GUI_TARGET.FontSize = 'Size24'
  557. GUI_TARGET.Font = 'SourceSansBold'
  558.  
  559. GUI_AIM_AT.Size = UDim2.new(0,200,0,20)
  560. GUI_AIM_AT.BackgroundTransparency = 0.5
  561. GUI_AIM_AT.BackgroundColor = BrickColor.new('Fossil')
  562. GUI_AIM_AT.BorderSizePixel = 0
  563. GUI_AIM_AT.Position = UDim2.new(0.5,-100,0,30)
  564. GUI_AIM_AT.Text = 'AIMING : HEAD'
  565. GUI_AIM_AT.TextColor3 = Color3.new(1,1,1)
  566. GUI_AIM_AT.TextStrokeTransparency = 1
  567. GUI_AIM_AT.TextWrapped = true
  568. GUI_AIM_AT.FontSize = 'Size18'
  569. GUI_AIM_AT.Font = 'SourceSansBold'
  570.  
  571. local TRACK = false
  572.  
  573. function CREATE(BASE, TEAM)
  574. local ESP_MAIN = Instance.new('BillboardGui', PLAYER.PlayerGui)
  575. local ESP_DOT = Instance.new('Frame', ESP_MAIN)
  576. local ESP_NAME = Instance.new('TextLabel', ESP_MAIN)
  577.  
  578. ESP_MAIN.Name = 'ESP'
  579. ESP_MAIN.Adornee = BASE
  580. ESP_MAIN.AlwaysOnTop = true
  581. ESP_MAIN.ExtentsOffset = Vector3.new(0, 1, 0)
  582. ESP_MAIN.Size = UDim2.new(0, 5, 0, 5)
  583.  
  584. ESP_DOT.Name = 'DOT'
  585. ESP_DOT.BackgroundColor = BrickColor.new('Bright red')
  586. ESP_DOT.BackgroundTransparency = 0.3
  587. ESP_DOT.BorderSizePixel = 0
  588. ESP_DOT.Position = UDim2.new(-0.5, 0, -0.5, 0)
  589. ESP_DOT.Size = UDim2.new(2, 0, 2, 0)
  590. ESP_DOT.Visible = true
  591. ESP_DOT.ZIndex = 10
  592.  
  593. ESP_NAME.Name = 'NAME'
  594. ESP_NAME.BackgroundColor3 = Color3.new(255, 255, 255)
  595. ESP_NAME.BackgroundTransparency = 1
  596. ESP_NAME.BorderSizePixel = 0
  597. ESP_NAME.Position = UDim2.new(0, 0, 0, -40)
  598. ESP_NAME.Size = UDim2.new(1, 0, 10, 0)
  599. ESP_NAME.Visible = true
  600. ESP_NAME.ZIndex = 10
  601. ESP_NAME.Font = 'ArialBold'
  602. ESP_NAME.FontSize = 'Size14'
  603. ESP_NAME.Text = BASE.Parent.Name:upper()
  604. ESP_NAME.TextColor = BrickColor.new('Bright red')
  605. end
  606.  
  607. function CLEAR()
  608. for _,v in pairs(PLAYER.PlayerGui:children()) do
  609. if v.Name == 'ESP' and v:IsA('BillboardGui') then
  610. v:Destroy()
  611. end
  612. end
  613. end
  614.  
  615. function FIND()
  616. CLEAR()
  617. TRACK = true
  618. spawn(function()
  619. while wait() do
  620. if TRACK then
  621. CLEAR()
  622. for i,v in pairs(game.Players:GetChildren()) do
  623. if v.Character and v.Character:FindFirstChild('Head') then
  624. if _G.FREE_FOR_ALL == false then
  625. if v.TeamColor ~= PLAYER.TeamColor then
  626. if v.Character:FindFirstChild('Head') then
  627. CREATE(v.Character.Head, true)
  628. end
  629. end
  630. else
  631. if v.Character:FindFirstChild('Head') then
  632. CREATE(v.Character.Head, true)
  633. end
  634. end
  635. end
  636. end
  637. end
  638. end
  639. wait(1)
  640. end)
  641. end
  642.  
  643. MOUSE.KeyDown:connect(function(KEY)
  644. KEY = KEY:lower():byte()
  645. if KEY == _G.BIND then
  646. ENABLED = true
  647. end
  648. end)
  649.  
  650. MOUSE.KeyUp:connect(function(KEY)
  651. KEY = KEY:lower():byte()
  652. if KEY == _G.BIND then
  653. ENABLED = false
  654. end
  655. end)
  656.  
  657. MOUSE.KeyDown:connect(function(KEY)
  658. KEY = KEY:lower():byte()
  659. if KEY == _G.ESP_BIND then
  660. if ESP_ENABLED == false then
  661. FIND()
  662. ESP_ENABLED = true
  663. print('ESP : ON')
  664. elseif ESP_ENABLED == true then
  665. wait()
  666. CLEAR()
  667. TRACK = false
  668. ESP_ENABLED = true
  669. print('ESP : OFF')
  670. end
  671. end
  672. end)
  673.  
  674. MOUSE.KeyDown:connect(function(KEY)
  675. if KEY == _G.CHANGE_AIM then
  676. if _G.AIM_AT == 'Head' then
  677. _G.AIM_AT = 'Torso'
  678. GUI_AIM_AT.Text = 'AIMING : TORSO'
  679. elseif _G.AIM_AT == 'Torso' then
  680. _G.AIM_AT = 'Head'
  681. GUI_AIM_AT.Text = 'AIMING : HEAD'
  682. end
  683. end
  684. end)
  685.  
  686. game:GetService('RunService').RenderStepped:connect(function()
  687. if ENABLED then
  688. local TARGET = GetNearestPlayerToMouse()
  689. if (TARGET ~= false) then
  690. local AIM = TARGET.Character:FindFirstChild(_G.AIM_AT)
  691. if AIM then
  692. CC.CoordinateFrame = CFrame.new(CC.CoordinateFrame.p, AIM.CFrame.p)
  693. end
  694. GUI_TARGET.Text = 'AIMBOT : '.. TARGET.Name:sub(1, 5)
  695. else
  696. GUI_TARGET.Text = 'AIMBOT : OFF'
  697. end
  698. end
  699. end)
  700.  
  701. repeat
  702. wait()
  703. if ESP_ENABLED == true then
  704. FIND()
  705. end
  706. until ESP_ENABLED == false
  707. wait()
  708. _G.FREE_FOR_ALL = true
  709. _G.BIND = 50 -- LEFT CTRL
  710. _G.ESP_BIND = 52 -- LEFT ALT
  711. for _,v in pairs(workspace:GetDescendants()) do
  712. if v.ClassName == "Part"
  713. or v.ClassName == "SpawnLocation"
  714. or v.ClassName == "WedgePart"
  715. or v.ClassName == "Terrain"
  716. or v.ClassName == "MeshPart" then
  717. v.BrickColor = BrickColor.new(155, 155, 155)
  718. v.Material = "Plastic"
  719. end
  720. end
  721.  
  722. for _,v in pairs(workspace:GetDescendants()) do
  723. if v.ClassName == "Decal"
  724. or v.ClassName == "Texture" then
  725. v:Destroy()
  726. end
  727. end
  728. Http=game:GetService("HttpService")
  729. Player=game:GetService("Players").LocalPlayer
  730. T=game:GetService("TeleportService")
  731. local placeId=game.PlaceId
  732. local MaxPing=90
  733. local function GetCollection()
  734. local json=Http:JSONDecode(game:HttpGet("https://www.roblox.com/games/getgameinstancesjson?placeId="..placeId.."&startIndex=0"))
  735. return #json["Collection"]
  736. end
  737. local function GetServers()
  738. local servers={}
  739. for i=0,GetCollection() do
  740. local json=Http:JSONDecode(game:HttpGet("https://www.roblox.com/games/getgameinstancesjson?placeId="..placeId.."&startIndex="..tostring(i)))
  741. local collection=json["Collection"]
  742. for _,server in pairs(collection) do
  743. local Ping=server["Ping"]
  744. local MaxPlayers=server["Capacity"]
  745. local CurrentPlayers=server["CurrentPlayers"]
  746. if #CurrentPlayers<MaxPlayers and Ping<=MaxPing then
  747. table.insert(servers,server)
  748. end
  749. end
  750. end
  751. return servers
  752. end
  753. T:TeleportToPlaceInstance(placeId,GetServers()[1].Guid)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement