Advertisement
Zynee

Aimbot By Celvyn

Jan 25th, 2025 (edited)
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.56 KB | None | 0 0
  1. local userInputService = game:GetService("UserInputService")
  2. local runService = game:GetService("RunService")
  3. local players = game:GetService("Players")
  4. local cam = workspace.CurrentCamera
  5.  
  6. local aimbotEnabled = false
  7. local teamCheck = false
  8. local currentTarget = nil
  9. local hue = 0
  10. local teamCheckDecided = false
  11.  
  12. local fov = 100
  13. local FOVring = Drawing.new("Circle")
  14. FOVring.Visible = true
  15. FOVring.Thickness = 2
  16. FOVring.Filled = false
  17. FOVring.Radius = fov
  18. FOVring.Position = cam.ViewportSize / 2
  19.  
  20. local ScreenGui = Instance.new("ScreenGui")
  21. ScreenGui.Parent = game.CoreGui
  22.  
  23. local ToggleButton = Instance.new("TextButton", ScreenGui)
  24. ToggleButton.Size = UDim2.new(0, 100, 0, 100)
  25. ToggleButton.Position = UDim2.new(0.05, 0, 0.05, 0)
  26. ToggleButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  27. ToggleButton.Text = "OFF"
  28. ToggleButton.TextScaled = true
  29. ToggleButton.Font = Enum.Font.IndieFlower
  30. ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  31. ToggleButton.BorderSizePixel = 0
  32. ToggleButton.BackgroundTransparency = 0.5
  33. ToggleButton.ZIndex = 10
  34. ToggleButton.Draggable = true
  35. ToggleButton.Visible = false
  36.  
  37. local NotificationFrame = Instance.new("Frame", ScreenGui)
  38. NotificationFrame.Size = UDim2.new(0, 300, 0, 150)
  39. NotificationFrame.Position = UDim2.new(0.5, -150, 0.4, 0)
  40. NotificationFrame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  41. NotificationFrame.BorderSizePixel = 0
  42. NotificationFrame.Visible = true
  43.  
  44. local NotificationText = Instance.new("TextLabel", NotificationFrame)
  45. NotificationText.Size = UDim2.new(1, 0, 0.6, 0)
  46. NotificationText.Position = UDim2.new(0, 0, 0, 0)
  47. NotificationText.BackgroundTransparency = 1
  48. NotificationText.Text = "Enable Team Check?"
  49. NotificationText.TextScaled = true
  50. NotificationText.Font = Enum.Font.IndieFlower
  51. NotificationText.TextColor3 = Color3.fromRGB(255, 255, 255)
  52.  
  53. local YesButton = Instance.new("TextButton", NotificationFrame)
  54. YesButton.Size = UDim2.new(0.4, 0, 0.3, 0)
  55. YesButton.Position = UDim2.new(0.1, 0, 0.65, 0)
  56. YesButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
  57. YesButton.Text = "Yes"
  58. YesButton.TextScaled = true
  59. YesButton.Font = Enum.Font.IndieFlower
  60. YesButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  61.  
  62. local NoButton = Instance.new("TextButton", NotificationFrame)
  63. NoButton.Size = UDim2.new(0.4, 0, 0.3, 0)
  64. NoButton.Position = UDim2.new(0.5, 0, 0.65, 0)
  65. NoButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  66. NoButton.Text = "No"
  67. NoButton.TextScaled = true
  68. NoButton.Font = Enum.Font.IndieFlower
  69. NoButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  70.  
  71. local Notification = loadstring(game:HttpGet("https://raw.githubusercontent.com/Jxereas/UI-Libraries/main/notification_gui_library.lua", true))()
  72. Notification.new("success", "Welcome To Celvyn!", "Thank you for using our script.", true, 5)
  73.  
  74. local function showAimbotToggle()
  75.     ToggleButton.Visible = true
  76. end
  77.  
  78. local function decideTeamCheck(isEnabled)
  79.     teamCheck = isEnabled
  80.     teamCheckDecided = true
  81.     NotificationFrame.Visible = false
  82.     showAimbotToggle()
  83. end
  84.  
  85. YesButton.MouseButton1Click:Connect(function()
  86.     decideTeamCheck(true)
  87. end)
  88.  
  89. NoButton.MouseButton1Click:Connect(function()
  90.     decideTeamCheck(false)
  91. end)
  92.  
  93. ToggleButton.MouseButton1Click:Connect(function()
  94.     aimbotEnabled = not aimbotEnabled
  95.     if aimbotEnabled then
  96.         ToggleButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
  97.         ToggleButton.Text = "ON"
  98.     else
  99.         ToggleButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  100.         ToggleButton.Text = "OFF"
  101.         currentTarget = nil
  102.     end
  103. end)
  104.  
  105. local function isPlayerAlive(player)
  106.     local character = player.Character
  107.     if character and character:FindFirstChild("Humanoid") then
  108.         return character.Humanoid.Health > 0
  109.     end
  110.     return false
  111. end
  112.  
  113. local function getClosestPlayerInFOV()
  114.     local nearest = nil
  115.     local lastDistance = math.huge
  116.     local playerMousePos = cam.ViewportSize / 2
  117.     local localPlayer = players.LocalPlayer
  118.  
  119.     for _, player in pairs(players:GetPlayers()) do
  120.         if player ~= localPlayer and (not teamCheck or player.Team ~= localPlayer.Team) and isPlayerAlive(player) then
  121.             local character = player.Character
  122.             local head = character and character:FindFirstChild("Head")
  123.             if head then
  124.                 local screenPosition = cam:WorldToViewportPoint(head.Position)
  125.                 local distance = (Vector2.new(screenPosition.X, screenPosition.Y) - playerMousePos).Magnitude
  126.  
  127.                 if distance < lastDistance and distance < fov then
  128.                     lastDistance = distance
  129.                     nearest = player
  130.                 end
  131.             end
  132.         end
  133.     end
  134.     return nearest
  135. end
  136.  
  137. local function lockPlayer(player)
  138.     if player then
  139.         local username = player.Name
  140.         Notification.new("info", "Target Locked", "lock onto " .. username, true, 5)
  141.     end
  142. end
  143.  
  144. runService.RenderStepped:Connect(function()
  145.     if aimbotEnabled then
  146.         if currentTarget and isPlayerAlive(currentTarget) then
  147.             local part = currentTarget.Character and currentTarget.Character:FindFirstChild("Head")
  148.             if part then
  149.                 cam.CFrame = CFrame.new(cam.CFrame.Position, part.Position)
  150.             end
  151.         else
  152.             currentTarget = getClosestPlayerInFOV()
  153.             if currentTarget then
  154.                 lockPlayer(currentTarget)
  155.             end
  156.         end
  157.     end
  158. end)
  159.  
  160. runService.RenderStepped:Connect(function()
  161.     hue = hue + 0.01
  162.     if hue >= 1 then hue = 0 end
  163.     local color = Color3.fromHSV(hue, 1, 1)
  164.     FOVring.Color = color
  165. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement