Advertisement
Xwaree

Untitled

Dec 29th, 2024 (edited)
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.57 KB | Gaming | 0 0
  1. --[[
  2. DOOMS AIMVIEWER
  3. ---------------
  4. VERSION: 1.0.0
  5. R to change target
  6. ]]--
  7. _G.AIMVIEWING_ENABLED = true
  8.  
  9. local Aimview_GUI = Instance.new("ScreenGui")
  10. local Username = Instance.new("TextLabel")
  11. local Aimviewing = Instance.new("TextLabel")
  12. local Fade = Instance.new("ImageLabel")
  13.  
  14. Aimview_GUI.Name = "Aimview_GUI"
  15. Aimview_GUI.Parent = game.CoreGui
  16. Aimview_GUI.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  17. Aimview_GUI.Enabled = false
  18.  
  19. Username.Name = "Username"
  20. Username.Parent = Aimview_GUI
  21. Username.AnchorPoint = Vector2.new(0.5, 0)
  22. Username.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  23. Username.BackgroundTransparency = 1.000
  24. Username.BorderColor3 = Color3.fromRGB(0, 0, 0)
  25. Username.BorderSizePixel = 0
  26. Username.Position = UDim2.new(0.5, 0, 0.863797247, 0)
  27. Username.Size = UDim2.new(1, 0, -0.0191854611, 50)
  28. Username.ZIndex = 2
  29. Username.Font = Enum.Font.GothamBold
  30. Username.Text = "Username <font color='#ff3a3d'>(123456789)</font>"
  31. Username.TextColor3 = Color3.fromRGB(255, 255, 255)
  32. Username.TextSize = 30.000
  33. Username.TextStrokeTransparency = 0.750
  34. Username.TextWrapped = true
  35. Username.RichText = true
  36.  
  37. Aimviewing.Name = "Aimviewing"
  38. Aimviewing.Parent = Aimview_GUI
  39. Aimviewing.AnchorPoint = Vector2.new(0.5, 0)
  40. Aimviewing.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  41. Aimviewing.BackgroundTransparency = 1.000
  42. Aimviewing.BorderColor3 = Color3.fromRGB(0, 0, 0)
  43. Aimviewing.BorderSizePixel = 0
  44. Aimviewing.Position = UDim2.new(0.5, 0, 0.90640372, 0)
  45. Aimviewing.Size = UDim2.new(1, 0, -0.0317167901, 50)
  46. Aimviewing.ZIndex = 2
  47. Aimviewing.Font = Enum.Font.Gotham
  48. Aimviewing.Text = "Aim Viewing"
  49. Aimviewing.TextColor3 = Color3.fromRGB(255, 255, 255)
  50. Aimviewing.TextSize = 15.000
  51. Aimviewing.TextStrokeTransparency = 0.750
  52. Aimviewing.TextWrapped = true
  53.  
  54. Fade.Name = "Fade"
  55. Fade.Parent = Aimview_GUI
  56. Fade.AnchorPoint = Vector2.new(0.5, 1)
  57. Fade.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  58. Fade.BackgroundTransparency = 1.000
  59. Fade.BorderColor3 = Color3.fromRGB(0, 0, 0)
  60. Fade.BorderSizePixel = 0
  61. Fade.Position = UDim2.new(0.5, 0, 1, 0)
  62. Fade.Size = UDim2.new(1, 0, 0, 331)
  63. Fade.Image = "rbxassetid://15765521133"
  64. Fade.ImageTransparency = 0.250
  65.  
  66. -- Services
  67. local uis = game:GetService('UserInputService')
  68. local players = game:GetService('Players')
  69. local sgui = game:GetService('StarterGui')
  70.  
  71. -- Variables
  72. local plr = game.Players.LocalPlayer
  73. local char = plr.Character
  74. local cam = workspace.CurrentCamera
  75. local cursor = plr:GetMouse()
  76.  
  77. _G.enable = false
  78. _G.color = Color3.fromRGB(255, 58, 61)
  79. _G.toggle_keybind = "u" -- enable tracer and disable
  80. _G.swith_nigga = 'r' -- press t and u will see a noti on the user ur tracer is on
  81. _G.method = "MousePos" --had a stroke
  82.  
  83. if game.PlaceId == 2788229376 then
  84. _G.method = "MousePos"
  85. end
  86.  
  87. ---------------------------------------------------------------
  88. local rs = game:GetService("RunService")
  89. local localPlayer = game.Players.LocalPlayer
  90. local mouse = localPlayer:GetMouse()
  91. local target;
  92.  
  93.  
  94.  
  95. function getgun()
  96. for i,v in pairs(target:GetChildren()) do
  97. if v and (v:FindFirstChild('Default') or v:FindFirstChild('Handle') )then
  98. return v
  99. end
  100. end
  101. end
  102.  
  103. -- Services
  104. local uis = game:GetService('UserInputService')
  105. local players = game:GetService('Players')
  106. local sgui = game:GetService('StarterGui')
  107.  
  108. -- Variables
  109. local plr = game.Players.LocalPlayer
  110. local char = plr.Character
  111. local cam = workspace.CurrentCamera
  112. local cursor = plr:GetMouse()
  113.  
  114.  
  115. function findNearestToCursor()
  116. local closestTarget = nil
  117. local closestDistance = 999
  118.  
  119. local range = 250
  120.  
  121. local root = char:WaitForChild('HumanoidRootPart')
  122.  
  123. for _,human in ipairs(workspace:GetDescendants()) do
  124. if human:IsA('Humanoid') and human.Parent:FindFirstChild('HumanoidRootPart') and human.Parent.Name ~= plr.Name and human.Health ~= 0 then
  125. local cursorPos = Vector2.new(cursor.X, cursor.Y)
  126. local vector, onScreen = cam:WorldToScreenPoint(human.Parent.HumanoidRootPart.Position)
  127.  
  128. if onScreen then
  129. local dist = (cursorPos - Vector2.new(vector.X, vector.Y)).Magnitude
  130. if dist < closestDistance and (human.Parent.HumanoidRootPart.Position - players.LocalPlayer.Character.HumanoidRootPart.Position).Magnitude < range then closestDistance = dist closestTarget = human.Parent end
  131. end
  132. end
  133. end
  134.  
  135. return closestTarget
  136. end
  137.  
  138. ---
  139.  
  140. mouse.KeyDown:Connect(function(z)
  141. if z == _G.swith_nigga then
  142. target = findNearestToCursor()
  143. _G.enable = true
  144. end
  145. end)
  146. ---
  147.  
  148. -- minified it
  149. local Aimview_Beam=Instance.new("Beam")
  150. Aimview_Beam.Segments=1;
  151. Aimview_Beam.Width0=0.2;
  152. Aimview_Beam.Width1=0.2;
  153. Aimview_Beam.Color=ColorSequence.new(_G.color)
  154. Aimview_Beam.FaceCamera=true;
  155.  
  156. local BeamAttachment_1=Instance.new("Attachment")
  157. local BeamAttachment_2=Instance.new("Attachment")
  158. Aimview_Beam.Attachment0 = BeamAttachment_1
  159. Aimview_Beam.Attachment1 = BeamAttachment_2
  160. Aimview_Beam.Parent = workspace.Terrain
  161. BeamAttachment_1.Parent=workspace.Terrain
  162. BeamAttachment_2.Parent=workspace.Terrain
  163.  
  164. task.spawn(function()
  165. rs.RenderStepped:Connect(function()
  166. local character = localPlayer.Character
  167. if not character then
  168. Aimview_Beam.Enabled = false
  169. return
  170. end
  171.  
  172. if _G.enable and getgun() and target:FindFirstChild("BodyEffects") and target:FindFirstChild("Head") then
  173. Aimview_Beam.Enabled = true
  174. BeamAttachment_1.Position = target:FindFirstChild("Head").Position
  175. BeamAttachment_2.Position = target.BodyEffects[_G.method].Value
  176. else
  177. Aimview_Beam.Enabled = true
  178. end
  179.  
  180. end)
  181. end)
  182.  
  183. local aimviewing = false
  184.  
  185. function findNearestToCursor()
  186. local closestTarget = nil
  187. local closestDistance = 999
  188.  
  189. local range = 250
  190.  
  191. local root = char:WaitForChild('HumanoidRootPart')
  192.  
  193. for _,human in ipairs(workspace:GetDescendants()) do
  194. if human:IsA('Humanoid') and human.Parent:FindFirstChild('HumanoidRootPart') and human.Parent.Name ~= plr.Name and human.Health ~= 0 then
  195. local cursorPos = Vector2.new(cursor.X, cursor.Y)
  196. local vector, onScreen = cam:WorldToScreenPoint(human.Parent.HumanoidRootPart.Position)
  197.  
  198. if onScreen then
  199. local dist = (cursorPos - Vector2.new(vector.X, vector.Y)).Magnitude
  200. if dist < closestDistance and (human.Parent.HumanoidRootPart.Position - players.LocalPlayer.Character.HumanoidRootPart.Position).Magnitude < range then closestDistance = dist closestTarget = human.Parent end
  201. end
  202. end
  203. end
  204.  
  205. return closestTarget
  206. end
  207.  
  208. uis.InputBegan:Connect(function(key)
  209. if key.KeyCode == Enum.KeyCode.R and _G.AIMVIEWING_ENABLED then
  210. aimviewing = not aimviewing
  211. if aimviewing then
  212. target = findNearestToCursor()
  213. if target ~= nil then
  214. targetID = players[target.Name].UserId
  215. cam.CameraSubject = target.Humanoid
  216. Aimview_GUI.Enabled = true
  217. Username.Text = target.Name.." <font color='#ff3a3d'>("..targetID..")</font>"
  218. game:GetService('StarterGui'):SetCore('SendNotification', {Title ="DOOM'S AIMVIEWER",Text = "Aimviewing: ".. target.Name,Duration = "1",})
  219. elseif target == nil then
  220. game:GetService('StarterGui'):SetCore('SendNotification', {Title ="DOOM'S AIMVIEWER",Text = "Couldn't find target.",Duration = "1",})
  221. end
  222. elseif not aimviewing then
  223. cam.CameraSubject = char.Humanoid
  224. Aimview_GUI.Enabled = false
  225. Username.Text = "No Subject"
  226. Aimview_Beam.Enabled = false
  227. end
  228. end
  229. end)
  230. game:GetService('StarterGui'):SetCore('SendNotification', {Title ="DOOM'S AIMVIEWER",Text = "Loaded",Duration = "1",})
Tags: #dahood
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement