Advertisement
Sarahs_Pastebin

Red Dot Dahood Aimlock Script

Aug 9th, 2022 (edited)
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Oplicine
  2. local CC = game:GetService"Workspace".CurrentCamera
  3.     local Plr
  4.     local enabled = falseWD
  5.     local accomidationfactor = 0.139512
  6.     local mouse = game.Players.LocalPlayer:GetMouse()
  7.     local placemarker = Instance.new("Part", game.Workspace)
  8.  
  9.     function makemarker(Parent, Adornee, Color, Size, Size2)
  10.         local e = Instance.new("BillboardGui", Parent)
  11.         e.Name = "PP"
  12.         e.Adornee = Adornee
  13.         e.Size = UDim2.new(Size, Size2, Size, Size2)
  14.         e.AlwaysOnTop = true
  15.         local a = Instance.new("Frame", e)
  16.         a.Size = UDim2.new(1, 0, 1, 0)
  17.         a.BackgroundTransparency = 0
  18.         a.BackgroundColor3 = Color
  19.         local g = Instance.new("UICorner", a)
  20.         g.CornerRadius = UDim.new(50, 50)
  21.         return(e)
  22.     end
  23.  
  24.    
  25.     local data = game.Players:GetPlayers()
  26.     function noob(player)
  27.         local character
  28.         repeat wait() until player.Character
  29.         local handler = makemarker(guimain, player.Character:WaitForChild("HumanoidRootPart"), Color3.fromRGB(107, 184, 255), 0.3, 3)
  30.         handler.Name = player.Name
  31.         player.CharacterAdded:connect(function(Char) handler.Adornee = Char:WaitForChild("HumanoidRootPart") end)
  32.  
  33.  
  34.         spawn(function()
  35.             while wait() do
  36.                 if player.Character then
  37.                     TextLabel.Text = player.Name..tostring(player:WaitForChild("leaderstats").Wanted.Value).." | "..tostring(math.floor(player.Character:WaitForChild("Humanoid").Health))
  38.                 end
  39.             end
  40.         end)
  41.     end
  42.  
  43.     for i = 1, #data do
  44.         if data[i] ~= game.Players.LocalPlayer then
  45.             noob(data[i])
  46.         end
  47.     end
  48.  
  49.     game.Players.PlayerAdded:connect(function(Player)
  50.         noob(Player)
  51.     end)
  52.  
  53.     spawn(function()
  54.         placemarker.Anchored = true
  55.         placemarker.CanCollide = false
  56.         placemarker.Size = Vector3.new(8, 8, 8)
  57.         placemarker.Transparency = 0.75
  58.         makemarker(placemarker, placemarker, Color3.fromRGB(250, 17, 0), 0.40, 0)
  59.     end)    
  60.  
  61. mouse.KeyDown:Connect(function(k)
  62.     if k ~= "c" then return end
  63.     if enabled then
  64.         enabled = false
  65.         guimain[Plr.Name].Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  66.     else
  67.         enabled = true
  68.         Plr = getClosestPlayerToCursor()
  69.         guimain[Plr.Name].Frame.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  70.     end    
  71. end)
  72.  
  73.     function getClosestPlayerToCursor()
  74.         local closestPlayer
  75.         local shortestDistance = math.huge
  76.  
  77.         for i, v in pairs(game.Players:GetPlayers()) do
  78.             if v ~= game.Players.LocalPlayer and v.Character and v.Character:FindFirstChild("Humanoid") and v.Character.Humanoid.Health ~= 0 and v.Character:FindFirstChild("HumanoidRootPart") then
  79.                 local pos = CC:WorldToViewportPoint(v.Character.PrimaryPart.Position)
  80.                 local magnitude = (Vector2.new(pos.X, pos.Y) - Vector2.new(mouse.X, mouse.Y)).magnitude
  81.                 if magnitude < shortestDistance then
  82.                     closestPlayer = v
  83.                     shortestDistance = magnitude
  84.                 end
  85.             end
  86.         end
  87.         return closestPlayer
  88.     end
  89.  
  90.     game:GetService"RunService".Stepped:connect(function()
  91.         if enabled and Plr.Character and Plr.Character:FindFirstChild("HumanoidRootPart") then
  92.             placemarker.CFrame = CFrame.new(Plr.Character.HumanoidRootPart.Position+(Plr.Character.HumanoidRootPart.Velocity*accomidationfactor))
  93.         else
  94.             placemarker.CFrame = CFrame.new(0, 9999, 0)
  95.         end
  96.     end)
  97.  
  98.     local mt = getrawmetatable(game)
  99.     local old = mt.__namecall
  100.     setreadonly(mt, false)
  101.     mt.__namecall = newcclosure(function(...)
  102.         local args = {...}
  103.         if enabled and getnamecallmethod() == "FireServer" and args[2] == "UpdateMousePos" then
  104.             args[3] = Plr.Character.HumanoidRootPart.Position+(Plr.Character.HumanoidRootPart.Velocity*accomidationfactor)
  105.             return old(unpack(args))
  106.         end
  107.         return old(...)
  108.     end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement