Advertisement
FreshGamer430

Untitled

Feb 3rd, 2025
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.05 KB | Source Code | 0 0
  1. -- Variables
  2. local Players = game:GetService("Players")
  3. local RunService = game:GetService("RunService")
  4. local UserInputService = game:GetService("UserInputService")
  5. local Camera = game.Workspace.CurrentCamera
  6.  
  7. -- Create GUI
  8. local screenGui = Instance.new("ScreenGui")
  9. screenGui.Name = "AdminAimGUI"
  10. screenGui.Parent = game.CoreGui
  11.  
  12. -- Main Frame
  13. local mainFrame = Instance.new("Frame")
  14. mainFrame.Name = "MainFrame"
  15. mainFrame.Size = UDim2.new(0, 300, 0, 150)
  16. mainFrame.Position = UDim2.new(1, -320, 0.5, -75)
  17. mainFrame.BackgroundColor3 = Color3.fromRGB(255, 182, 193) -- Pink
  18. mainFrame.BorderSizePixel = 0
  19. mainFrame.Visible = true
  20. mainFrame.Active = true
  21. mainFrame.Draggable = true -- Make draggable
  22. mainFrame.Parent = screenGui
  23.  
  24. -- UI Corner (Rounded Edges)
  25. local uiCorner = Instance.new("UICorner")
  26. uiCorner.CornerRadius = UDim.new(0, 15)
  27. uiCorner.Parent = mainFrame
  28.  
  29. -- Title (Fixed Position)
  30. local titleFrame = Instance.new("Frame")
  31. titleFrame.Size = UDim2.new(1, 0, 0, 40) -- Title area size
  32. titleFrame.BackgroundTransparency = 1
  33. titleFrame.Parent = mainFrame
  34.  
  35. local title = Instance.new("TextLabel")
  36. title.Name = "Title"
  37. title.Text = "Mika's Aimbot 🐵"
  38. title.Font = Enum.Font.FredokaOne
  39. title.TextSize = 24
  40. title.TextColor3 = Color3.fromRGB(255, 255, 255)
  41. title.BackgroundTransparency = 1
  42. title.Size = UDim2.new(1, -40, 1, 0) -- Adjust to make space for collapse button
  43. title.Position = UDim2.new(0, 0, 0, 0)
  44. title.Parent = titleFrame
  45.  
  46. -- Collapse Button (part of title)
  47. local collapse = Instance.new("TextButton")
  48. collapse.Name = "Collapse"
  49. collapse.Text = "-"
  50. collapse.Font = Enum.Font.FredokaOne
  51. collapse.TextSize = 20
  52. collapse.TextColor3 = Color3.fromRGB(255, 255, 255)
  53. collapse.BackgroundColor3 = Color3.fromRGB(255, 105, 180)
  54. collapse.Size = UDim2.new(0.2, 0, 1, 0) -- Size adjusted for proper placement
  55. collapse.Position = UDim2.new(1, -40, 0, 0) -- Positioned at the right of title
  56. collapse.Parent = titleFrame
  57.  
  58. local collapseUICorner = Instance.new("UICorner")
  59. collapseUICorner.CornerRadius = UDim.new(0, 5)
  60. collapseUICorner.Parent = collapse
  61.  
  62. -- Scrolling Frame
  63. local scrollingFrame = Instance.new("ScrollingFrame")
  64. scrollingFrame.Name = "ScrollingFrame"
  65. scrollingFrame.Size = UDim2.new(1, 0, 1, -40) -- Below the title
  66. scrollingFrame.Position = UDim2.new(0, 0, 0, 40)
  67. scrollingFrame.CanvasSize = UDim2.new(0, 0, 0, 400) -- Adjust to fit content
  68. scrollingFrame.ScrollBarThickness = 8
  69. scrollingFrame.BackgroundTransparency = 1
  70. scrollingFrame.Parent = mainFrame
  71.  
  72. -- "Made by Ata" Text
  73. local madeByAta = Instance.new("TextLabel")
  74. madeByAta.Name = "MadeByAta"
  75. madeByAta.Text = "Made by Ata 🗿"
  76. madeByAta.Font = Enum.Font.FredokaOne
  77. madeByAta.TextSize = 18
  78. madeByAta.TextColor3 = Color3.fromRGB(255, 255, 255)
  79. madeByAta.BackgroundTransparency = 1
  80. madeByAta.Size = UDim2.new(1, 0, 0, 30)
  81. madeByAta.Position = UDim2.new(0, 0, 0, 370) -- Positioned near the bottom
  82. madeByAta.Parent = scrollingFrame
  83.  
  84. -- Toggle (Aimbot activation button)
  85. local toggle = Instance.new("TextButton")
  86. toggle.Name = "Toggle"
  87. toggle.Text = "Toggle Aimbot"
  88. toggle.Font = Enum.Font.FredokaOne
  89. toggle.TextSize = 20
  90. toggle.TextColor3 = Color3.fromRGB(255, 255, 255)
  91. toggle.BackgroundColor3 = Color3.fromRGB(255, 105, 180) -- Bright Pink
  92. toggle.Size = UDim2.new(0.8, 0, 0, 40)
  93. toggle.Position = UDim2.new(0.1, 0, 0, 10)
  94. toggle.Parent = scrollingFrame
  95.  
  96. local toggleUICorner = Instance.new("UICorner")
  97. toggleUICorner.CornerRadius = UDim.new(0, 10)
  98. toggleUICorner.Parent = toggle
  99.  
  100. -- Pink Square for Collapse
  101. local collapseSquare = Instance.new("ImageButton")
  102. collapseSquare.Name = "CollapseSquare"
  103. collapseSquare.Size = UDim2.new(0, 50, 0, 50)
  104. collapseSquare.Position = UDim2.new(1, -60, 0.5, -25)
  105. collapseSquare.AnchorPoint = Vector2.new(1, 0.5)
  106. collapseSquare.BackgroundColor3 = Color3.fromRGB(255, 182, 193) -- Pink
  107. collapseSquare.Visible = false
  108. collapseSquare.Active = true
  109. collapseSquare.Draggable = true -- Make draggable
  110. collapseSquare.Parent = screenGui
  111.  
  112. local collapseSquareUICorner = Instance.new("UICorner")
  113. collapseSquareUICorner.CornerRadius = UDim.new(0, 5)
  114. collapseSquareUICorner.Parent = collapseSquare
  115.  
  116. -- Script Logic
  117. local aimbotActive = false
  118.  
  119. local function lockOnToPlayer()
  120.     local localPlayer = Players.LocalPlayer
  121.     if not localPlayer.Character or not localPlayer.Character:FindFirstChild("HumanoidRootPart") then return end
  122.  
  123.     local closestPlayer
  124.     local shortestDistance = math.huge
  125.     for _, player in ipairs(Players:GetPlayers()) do
  126.         if player ~= localPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  127.             local distance = (localPlayer.Character.HumanoidRootPart.Position - player.Character.HumanoidRootPart.Position).Magnitude
  128.             if distance < shortestDistance then
  129.                 shortestDistance = distance
  130.                 closestPlayer = player
  131.             end
  132.         end
  133.     end
  134.  
  135.     if closestPlayer and closestPlayer.Character then
  136.         local target = closestPlayer.Character:FindFirstChild("HumanoidRootPart")
  137.         if target then
  138.             -- Lock camera to the target position
  139.             Camera.CFrame = CFrame.new(Camera.CFrame.Position, target.Position)
  140.         end
  141.     end
  142. end
  143.  
  144. toggle.MouseButton1Click:Connect(function()
  145.     aimbotActive = not aimbotActive
  146.     toggle.Text = aimbotActive and "Aimbot: ON" or "Aimbot: OFF"
  147. end)
  148.  
  149. RunService.RenderStepped:Connect(function()
  150.     if aimbotActive then
  151.         lockOnToPlayer()
  152.     end
  153. end)
  154.  
  155. collapse.MouseButton1Click:Connect(function()
  156.     mainFrame.Visible = false
  157.     collapseSquare.Visible = true
  158. end)
  159.  
  160. collapseSquare.MouseButton1Click:Connect(function()
  161.     mainFrame.Visible = true
  162.     collapseSquare.Visible = false
  163. end)
  164.  
  165. -- Disable draggable when ShiftLock is enabled
  166. UserInputService.InputChanged:Connect(function(input, gameProcessed)
  167.     if not gameProcessed then
  168.         if UserInputService.MouseBehavior == Enum.MouseBehavior.LockCenter then
  169.             mainFrame.Draggable = false
  170.         else
  171.             mainFrame.Draggable = true
  172.         end
  173.     end
  174. end)
  175.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement