ZV0K

YukFun Lock 😃

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