Facebook
From Aqua Crocodile, 2 Years ago, written in Ruby.
Embed
Download Paste or View Raw
Hits: 4024
  1. --Made by BL00M
  2.  
  3. getgenv().Prediction = 0.109999
  4. getgenv().AimPart = "HumanoidRootPart"
  5. getgenv().Key = "Q"
  6. getgenv().DisableKey = "P"
  7.  
  8. getgenv().FOV = true
  9. getgenv().ShowFOV = false
  10. getgenv().FOVSize = 55
  11.  
  12. --// Variables (Service)
  13.  
  14. local Players = game:GetService("Players")
  15. local RS = game:GetService("RunService")
  16. local WS = game:GetService("Workspace")
  17. local GS = game:GetService("GuiService")
  18. local SG = game:GetService("StarterGui")
  19.  
  20. --// Variables (regular)
  21.  
  22. local LP = Players.LocalPlayer
  23. local Mouse = LP:GetMouse()
  24. local Camera = WS.CurrentCamera
  25. local GetGuiInset = GS.GetGuiInset
  26.  
  27. local AimlockState = true
  28. local Locked
  29. local Victim
  30.  
  31. local SelectedKey = getgenv().Key
  32. local SelectedDisableKey = getgenv().DisableKey
  33.  
  34. --// Notification function
  35.  
  36. function Notify(tx)
  37.     SG:SetCore("SendNotification", {
  38.         Title = "Cam Lock Enabled | .gg/thusky",
  39.         Text = tx,
  40.         Duration = 5
  41.     })
  42. end
  43.  
  44. --// Check if aimlock is loaded
  45.  
  46. if getgenv().Loaded == true then
  47.     Notify("Aimlock is already loaded!")
  48.     return
  49. end
  50.  
  51. getgenv().Loaded = true
  52.  
  53. --// FOV Circle
  54.  
  55. local fov = Drawing.new("Circle")
  56. fov.Filled = false
  57. fov.Transparency = 1
  58. fov.Thickness = 1
  59. fov.Color = Color3.fromRGB(255, 255, 0)
  60. fov.NumSides = 1000
  61.  
  62. --// Functions
  63.  
  64. function update()
  65.     if getgenv().FOV == true then
  66.         if fov then
  67.             fov.Radius = getgenv().FOVSize * 2
  68.             fov.Visible = getgenv().ShowFOV
  69.             fov.Position = Vector2.new(Mouse.X, Mouse.Y + GetGuiInset(GS).Y)
  70.  
  71.             return fov
  72.         end
  73.     end
  74. end
  75.  
  76. function WTVP(arg)
  77.     return Camera:WorldToViewportPoint(arg)
  78. end
  79.  
  80. function WTSP(arg)
  81.     return Camera.WorldToScreenPoint(Camera, arg)
  82. end
  83.  
  84. function getClosest()
  85.     local closestPlayer
  86.     local shortestDistance = math.huge
  87.  
  88.     for i, v in pairs(game.Players:GetPlayers()) do
  89.         local notKO = v.Character:WaitForChild("BodyEffects")["K.O"].Value ~= true
  90.         local notGrabbed = v.Character:FindFirstChild("GRABBING_COINSTRAINT") == nil
  91.        
  92.         if v ~= game.Players.LocalPlayer and v.Character and v.Character:FindFirstChild("Humanoid") and v.Character.Humanoid.Health ~= 0 and v.Character:FindFirstChild(getgenv().AimPart) and notKO and notGrabbed then
  93.             local pos = Camera:WorldToViewportPoint(v.Character.PrimaryPart.Position)
  94.             local magnitude = (Vector2.new(pos.X, pos.Y) - Vector2.new(Mouse.X, Mouse.Y)).magnitude
  95.            
  96.             if (getgenv().FOV) then
  97.                 if (fov.Radius > magnitude and magnitude < shortestDistance) then
  98.                     closestPlayer = v
  99.                     shortestDistance = magnitude

Replies to Re: Camlock rss

Title Name Language When
Re: Re: Camlock Cam lock ruby 2 Years ago.