From venuslockscript, 8 Months ago, written in Lua.
Embed
  1.  
  2. local zombies = game:GetService("Workspace").Zombies
  3. local Players = game:GetService("Players")
  4. local LocalPlayer = Players.LocalPlayer
  5. local mouse = LocalPlayer:GetMouse()
  6. local Camera = workspace.CurrentCamera
  7. local Debris = game:GetService("Debris")
  8. local UserInputService = game:GetService("UserInputService")
  9. local target = false
  10. local RunService = game:GetService("RunService")
  11.  
  12.  
  13. getfenv().lock = "Head" -- Head or Hitbox or Random
  14.  
  15. fov = 99999;
  16. local fovCircle = true;
  17. local st = tonumber(tick());
  18. warn("Loading script...")
  19.  
  20. if fovCircle then
  21. function createcircle()
  22.     local a=Drawing.new('Circle');a.Transparency=1;a.Thickness=1.5;a.Visible=true;a.Color=Color3.fromRGB(0,255,149);a.Filled=false;a.Radius=fov;
  23.     return a;
  24. end;  
  25. local fovc = createcircle();
  26. spawn(function()
  27.     RunService:BindToRenderStep("FovCircle",1,function()
  28.         fovc.Position = Vector2.new(mouse.X,mouse.Y)
  29.     end);
  30. end);
  31. end;
  32.  
  33. -- function isFfa()
  34. -- local am = #Players:GetChildren();
  35. -- local amm = 0;
  36. -- for i , v in pairs(Players:GetChildren()) do
  37. -- if v.Team == LocalPlayer.Team then
  38. -- amm = amm + 1;
  39. -- end;
  40. -- end;
  41. -- return am == amm;
  42. --end;
  43. function getnearest()
  44. local nearestmagnitude = math.huge
  45. local nearestenemy = nil
  46. local vector = nil
  47. --local ffa = isFfa();
  48. for i,v in next, zombies:GetChildren() do
  49. if v and  v:FindFirstChild("HumanoidRootPart") and v:FindFirstChild("Humanoid") and v.Humanoid.Health > 0 then
  50. local vector, onScreen = Camera:WorldToScreenPoint(v["HumanoidRootPart"].Position)
  51. if onScreen then
  52. local ray = Ray.new(
  53. Camera.CFrame.p,
  54. (v["Head"].Position-Camera.CFrame.p).unit*500
  55. )
  56. local ignore = {
  57. LocalPlayer.Character,
  58. }
  59. local hit,position,normal=workspace:FindPartOnRayWithIgnoreList(ray,ignore)
  60. if hit and hit:FindFirstAncestorOfClass("Model") and zombies:FindFirstChild(hit:FindFirstAncestorOfClass("Model").Name)then
  61. local magnitude = (Vector2.new(mouse.X, mouse.Y) - Vector2.new(vector.X, vector.Y)).magnitude
  62. if magnitude < nearestmagnitude and magnitude <= fov then
  63. nearestenemy = v
  64. nearestmagnitude = magnitude
  65. end
  66. end
  67. end
  68. end
  69. end
  70. return nearestenemy
  71. end
  72.  
  73.  
  74.  
  75. local meta = getrawmetatable(game)
  76. setreadonly(meta, false)
  77. local oldNamecall = meta.__namecall
  78. meta.__namecall = newcclosure(function(...)
  79.    
  80. local method = getnamecallmethod()
  81. local args = {...}
  82. if string.find(method,'Ray') then
  83. if target then
  84.     if args[1].Name ~= "Workspace" then
  85.             print(args[1])
  86.         end;
  87. args[2] = Ray.new(workspace.CurrentCamera.CFrame.Position, (target.Position + Vector3.new(0,(workspace.CurrentCamera.CFrame.Position-target.Position).Magnitude/500,0) - workspace.CurrentCamera.CFrame.Position).unit * 5000)
  88. end
  89. end
  90. return oldNamecall(unpack(args))
  91. end)
  92.  
  93. warn("Script loaded!\nTime taken: "..math.abs(tonumber(tick())-st))
  94. RunService:BindToRenderStep("SilentAim",1,function()
  95. if UserInputService:IsMouseButtonPressed(0) and Players.LocalPlayer.Character and Players.LocalPlayer.Character:FindFirstChild("Humanoid") and Players.LocalPlayer.Character.Humanoid.Health > 0 then
  96. local enemy = getnearest()
  97. if enemy and enemy:FindFirstChild("Humanoid") and enemy.Humanoid.Health > 0 then                
  98. local vector, onScreen = Camera:WorldToScreenPoint(enemy["Head"].Position)
  99. local head = (Vector2.new(mouse.X, mouse.Y) - Vector2.new(vector.X, vector.Y)).magnitude
  100. local vector, onScreen = Camera:WorldToScreenPoint(enemy["HumanoidRootPart"].Position)
  101. local hitbox = (Vector2.new(mouse.X, mouse.Y) - Vector2.new(vector.X, vector.Y)).magnitude
  102. if head <= hitbox then
  103. magnitude = head
  104. else
  105. magnitude = hitbox;
  106. end;
  107. if getfenv().lock == "Head" then
  108. target = workspace.Zombies[enemy.Name]["Head"]
  109. else
  110. if getfenv().lock == "Random" then
  111. if magnitude == hitbox then
  112. target = zombies[enemy.Name]["HumanoidRootPart"];
  113. else
  114. target = zombies[enemy.Name]["Head"]
  115. end;
  116. else
  117. target = zombies[enemy.Name]["HumanoidRootPart"];
  118. end;
  119.  
  120. end;
  121. else
  122. target = nil
  123. end
  124. end
  125. end)