Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Variables
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local UserInputService = game:GetService("UserInputService")
- local Camera = game.Workspace.CurrentCamera
- -- Create GUI
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "AdminAimGUI"
- screenGui.Parent = game.CoreGui
- -- Main Frame
- local mainFrame = Instance.new("Frame")
- mainFrame.Name = "MainFrame"
- mainFrame.Size = UDim2.new(0, 300, 0, 150)
- mainFrame.Position = UDim2.new(1, -320, 0.5, -75)
- mainFrame.BackgroundColor3 = Color3.fromRGB(255, 182, 193) -- Pink
- mainFrame.BorderSizePixel = 0
- mainFrame.Visible = true
- mainFrame.Active = true
- mainFrame.Draggable = true -- Make draggable
- mainFrame.Parent = screenGui
- -- UI Corner (Rounded Edges)
- local uiCorner = Instance.new("UICorner")
- uiCorner.CornerRadius = UDim.new(0, 15)
- uiCorner.Parent = mainFrame
- -- Title (Fixed Position)
- local titleFrame = Instance.new("Frame")
- titleFrame.Size = UDim2.new(1, 0, 0, 40) -- Title area size
- titleFrame.BackgroundTransparency = 1
- titleFrame.Parent = mainFrame
- local title = Instance.new("TextLabel")
- title.Name = "Title"
- title.Text = "Mika's Aimbot 🐵"
- title.Font = Enum.Font.FredokaOne
- title.TextSize = 24
- title.TextColor3 = Color3.fromRGB(255, 255, 255)
- title.BackgroundTransparency = 1
- title.Size = UDim2.new(1, -40, 1, 0) -- Adjust to make space for collapse button
- title.Position = UDim2.new(0, 0, 0, 0)
- title.Parent = titleFrame
- -- Collapse Button (part of title)
- local collapse = Instance.new("TextButton")
- collapse.Name = "Collapse"
- collapse.Text = "-"
- collapse.Font = Enum.Font.FredokaOne
- collapse.TextSize = 20
- collapse.TextColor3 = Color3.fromRGB(255, 255, 255)
- collapse.BackgroundColor3 = Color3.fromRGB(255, 105, 180)
- collapse.Size = UDim2.new(0.2, 0, 1, 0) -- Size adjusted for proper placement
- collapse.Position = UDim2.new(1, -40, 0, 0) -- Positioned at the right of title
- collapse.Parent = titleFrame
- local collapseUICorner = Instance.new("UICorner")
- collapseUICorner.CornerRadius = UDim.new(0, 5)
- collapseUICorner.Parent = collapse
- -- Scrolling Frame
- local scrollingFrame = Instance.new("ScrollingFrame")
- scrollingFrame.Name = "ScrollingFrame"
- scrollingFrame.Size = UDim2.new(1, 0, 1, -40) -- Below the title
- scrollingFrame.Position = UDim2.new(0, 0, 0, 40)
- scrollingFrame.CanvasSize = UDim2.new(0, 0, 0, 400) -- Adjust to fit content
- scrollingFrame.ScrollBarThickness = 8
- scrollingFrame.BackgroundTransparency = 1
- scrollingFrame.Parent = mainFrame
- -- "Made by Ata" Text
- local madeByAta = Instance.new("TextLabel")
- madeByAta.Name = "MadeByAta"
- madeByAta.Text = "Made by Ata 🗿"
- madeByAta.Font = Enum.Font.FredokaOne
- madeByAta.TextSize = 18
- madeByAta.TextColor3 = Color3.fromRGB(255, 255, 255)
- madeByAta.BackgroundTransparency = 1
- madeByAta.Size = UDim2.new(1, 0, 0, 30)
- madeByAta.Position = UDim2.new(0, 0, 0, 370) -- Positioned near the bottom
- madeByAta.Parent = scrollingFrame
- -- Toggle (Aimbot activation button)
- local toggle = Instance.new("TextButton")
- toggle.Name = "Toggle"
- toggle.Text = "Toggle Aimbot"
- toggle.Font = Enum.Font.FredokaOne
- toggle.TextSize = 20
- toggle.TextColor3 = Color3.fromRGB(255, 255, 255)
- toggle.BackgroundColor3 = Color3.fromRGB(255, 105, 180) -- Bright Pink
- toggle.Size = UDim2.new(0.8, 0, 0, 40)
- toggle.Position = UDim2.new(0.1, 0, 0, 10)
- toggle.Parent = scrollingFrame
- local toggleUICorner = Instance.new("UICorner")
- toggleUICorner.CornerRadius = UDim.new(0, 10)
- toggleUICorner.Parent = toggle
- -- Pink Square for Collapse
- local collapseSquare = Instance.new("ImageButton")
- collapseSquare.Name = "CollapseSquare"
- collapseSquare.Size = UDim2.new(0, 50, 0, 50)
- collapseSquare.Position = UDim2.new(1, -60, 0.5, -25)
- collapseSquare.AnchorPoint = Vector2.new(1, 0.5)
- collapseSquare.BackgroundColor3 = Color3.fromRGB(255, 182, 193) -- Pink
- collapseSquare.Visible = false
- collapseSquare.Active = true
- collapseSquare.Draggable = true -- Make draggable
- collapseSquare.Parent = screenGui
- local collapseSquareUICorner = Instance.new("UICorner")
- collapseSquareUICorner.CornerRadius = UDim.new(0, 5)
- collapseSquareUICorner.Parent = collapseSquare
- -- Script Logic
- local aimbotActive = false
- local function lockOnToPlayer()
- local localPlayer = Players.LocalPlayer
- if not localPlayer.Character or not localPlayer.Character:FindFirstChild("HumanoidRootPart") then return end
- local closestPlayer
- local shortestDistance = math.huge
- for _, player in ipairs(Players:GetPlayers()) do
- if player ~= localPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
- local distance = (localPlayer.Character.HumanoidRootPart.Position - player.Character.HumanoidRootPart.Position).Magnitude
- if distance < shortestDistance then
- shortestDistance = distance
- closestPlayer = player
- end
- end
- end
- if closestPlayer and closestPlayer.Character then
- local target = closestPlayer.Character:FindFirstChild("HumanoidRootPart")
- if target then
- -- Lock camera to the target position
- Camera.CFrame = CFrame.new(Camera.CFrame.Position, target.Position)
- end
- end
- end
- toggle.MouseButton1Click:Connect(function()
- aimbotActive = not aimbotActive
- toggle.Text = aimbotActive and "Aimbot: ON" or "Aimbot: OFF"
- end)
- RunService.RenderStepped:Connect(function()
- if aimbotActive then
- lockOnToPlayer()
- end
- end)
- collapse.MouseButton1Click:Connect(function()
- mainFrame.Visible = false
- collapseSquare.Visible = true
- end)
- collapseSquare.MouseButton1Click:Connect(function()
- mainFrame.Visible = true
- collapseSquare.Visible = false
- end)
- -- Disable draggable when ShiftLock is enabled
- UserInputService.InputChanged:Connect(function(input, gameProcessed)
- if not gameProcessed then
- if UserInputService.MouseBehavior == Enum.MouseBehavior.LockCenter then
- mainFrame.Draggable = false
- else
- mainFrame.Draggable = true
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement