Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Services
- local Players = game:GetService("Players")
- local Workspace = game:GetService("Workspace")
- local RunService = game:GetService("RunService")
- local UserInputService = game:GetService("UserInputService")
- local CoreGui = game:GetService("CoreGui")
- local LocalPlayer = Players.LocalPlayer
- local Camera = Workspace.CurrentCamera
- -- Configuration Variables
- local Config = {
- ESPEnabled = false,
- AimbotEnabled = false,
- TargetPart = "Head",
- TargetMode = "Nearest"
- }
- -- Remove existing GeminiHub if already running
- if CoreGui:FindFirstChild("GeminiHub") then
- CoreGui.GeminiHub:Destroy()
- end
- -- ScreenGui Setup
- local ScreenGui = Instance.new("ScreenGui")
- ScreenGui.Name = "GeminiHub"
- ScreenGui.Parent = CoreGui
- ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- -- 1. FLOATING ICON (Toggle Button)
- local ToggleButton = Instance.new("TextButton")
- ToggleButton.Name = "ToggleButton"
- ToggleButton.Size = UDim2.new(0, 50, 0, 50)
- ToggleButton.Position = UDim2.new(0, 20, 0, 200)
- ToggleButton.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- ToggleButton.TextColor3 = Color3.fromRGB(0, 255, 255)
- ToggleButton.Text = "Gemini"
- ToggleButton.TextSize = 12
- ToggleButton.Font = Enum.Font.SourceSansBold
- ToggleButton.Parent = ScreenGui
- local ToggleCorner = Instance.new("UICorner")
- ToggleCorner.CornerRadius = UDim.new(1, 0)
- ToggleCorner.Parent = ToggleButton
- -- 2. MAIN WINDOW
- local MainFrame = Instance.new("Frame")
- MainFrame.Name = "MainFrame"
- MainFrame.Size = UDim2.new(0, 320, 0, 380)
- MainFrame.Position = UDim2.new(0.5, -160, 0.5, -190)
- MainFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 25)
- MainFrame.BorderSizePixel = 0
- MainFrame.Visible = false
- MainFrame.Parent = ScreenGui
- local MainCorner = Instance.new("UICorner")
- MainCorner.CornerRadius = UDim.new(0, 8)
- MainCorner.Parent = MainFrame
- -- Title Bar
- local TitleBar = Instance.new("TextLabel")
- TitleBar.Size = UDim2.new(1, 0, 0, 40)
- TitleBar.BackgroundColor3 = Color3.fromRGB(35, 35, 45)
- TitleBar.TextColor3 = Color3.fromRGB(255, 255, 255)
- TitleBar.Text = " Gemini Hub"
- TitleBar.TextXAlignment = Enum.TextXAlignment.Left
- TitleBar.TextSize = 16
- TitleBar.Font = Enum.Font.SourceSansBold
- TitleBar.Parent = MainFrame
- local TitleCorner = Instance.new("UICorner")
- TitleCorner.CornerRadius = UDim.new(0, 8)
- TitleCorner.Parent = TitleBar
- -- Container Layout
- local UIListLayout = Instance.new("UIListLayout")
- UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
- UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- UIListLayout.Padding = UDim.new(0, 10)
- UIListLayout.Parent = MainFrame
- -- Padding Spacer
- local Spacer = Instance.new("Frame")
- Spacer.Size = UDim2.new(1, 0, 0, 45)
- Spacer.BackgroundTransparency = 1
- Spacer.LayoutOrder = 1
- Spacer.Parent = MainFrame
- -- Helper Function: Create Toggles/Buttons
- local function createButton(name, text, order, callback)
- local btn = Instance.new("TextButton")
- btn.Name = name
- btn.Size = UDim2.new(0, 280, 0, 40)
- btn.BackgroundColor3 = Color3.fromRGB(40, 40, 50)
- btn.TextColor3 = Color3.fromRGB(255, 255, 255)
- btn.Text = text .. ": OFF"
- btn.TextSize = 14
- btn.Font = Enum.Font.SourceSansBold
- btn.LayoutOrder = order
- btn.Parent = MainFrame
- local corner = Instance.new("UICorner")
- corner.CornerRadius = UDim.new(0, 6)
- corner.Parent = btn
- local state = false
- btn.MouseButton1Click:Connect(function()
- state = not state
- btn.Text = text .. (state and ": ON" or ": OFF")
- btn.BackgroundColor3 = state and Color3.fromRGB(0, 120, 215) or Color3.fromRGB(40, 40, 50)
- callback(state)
- end)
- end
- -- Helper Function: Create Dropdowns
- local function createDropdown(name, title, options, defaultIndex, order, callback)
- local container = Instance.new("Frame")
- container.Name = name
- container.Size = UDim2.new(0, 280, 0, 40)
- container.BackgroundTransparency = 1
- container.LayoutOrder = order
- container.Parent = MainFrame
- local label = Instance.new("TextLabel")
- label.Size = UDim2.new(0.4, 0, 1, 0)
- label.BackgroundTransparency = 1
- label.Text = title
- label.TextColor3 = Color3.fromRGB(200, 200, 200)
- label.TextSize = 13
- label.Font = Enum.Font.SourceSans
- label.TextXAlignment = Enum.TextXAlignment.Left
- label.Parent = container
- local btn = Instance.new("TextButton")
- btn.Size = UDim2.new(0.6, 0, 1, 0)
- btn.Position = UDim2.new(0.4, 0, 0, 0)
- btn.BackgroundColor3 = Color3.fromRGB(50, 50, 60)
- btn.TextColor3 = Color3.fromRGB(255, 255, 255)
- local currentIndex = defaultIndex
- btn.Text = options[currentIndex]
- btn.TextSize = 13
- btn.Font = Enum.Font.SourceSansBold
- btn.Parent = container
- local corner = Instance.new("UICorner")
- corner.CornerRadius = UDim.new(0, 6)
- corner.Parent = btn
- btn.MouseButton1Click:Connect(function()
- currentIndex = currentIndex + 1
- if currentIndex > #options then currentIndex = 1 end
- btn.Text = options[currentIndex]
- callback(options[currentIndex])
- end)
- end
- -- UI Controls Creation
- createButton("ESPButton", "ESP", 2, function(state)
- Config.ESPEnabled = state
- end)
- createButton("AimbotButton", "Aimbot", 3, function(state)
- Config.AimbotEnabled = state
- end)
- createDropdown("BodyPartDropdown", "Target Part:", {"Head", "HumanoidRootPart", "UpperTorso"}, 1, 4, function(val)
- Config.TargetPart = val
- end)
- createDropdown("ModeDropdown", "Aimbot Mode:", {"Nearest", "Farthest", "Lowest HP"}, 1, 5, function(val)
- Config.TargetMode = val
- end)
- -- UI Toggle Visibility Function
- ToggleButton.MouseButton1Click:Connect(function()
- MainFrame.Visible = not MainFrame.Visible
- end)
- -- Make Window Draggable
- local dragging, dragInput, dragStart, startPos
- TitleBar.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- dragging = true
- dragStart = input.Position
- startPos = MainFrame.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
- local delta = input.Position - dragStart
- MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- end)
- -- 3. ESP SYSTEM
- RunService.RenderStepped:Connect(function()
- for _, player in ipairs(Players:GetPlayers()) do
- if player ~= LocalPlayer and player.Character then
- local char = player.Character
- local highlight = char:FindFirstChild("GeminiESP")
- if Config.ESPEnabled then
- if not highlight then
- highlight = Instance.new("Highlight")
- highlight.Name = "GeminiESP"
- highlight.Adornee = char
- highlight.FillColor = Color3.fromRGB(255, 0, 0)
- highlight.OutlineColor = Color3.fromRGB(255, 255, 255)
- highlight.FillTransparency = 0.5
- highlight.Parent = char
- end
- else
- if highlight then
- highlight:Destroy()
- end
- end
- end
- end
- end)
- -- 4. ADVANCED AIMBOT LOGIC
- local function getBestTarget()
- local bestTarget = nil
- local bestValue = nil
- local localChar = LocalPlayer.Character
- local localHrp = localChar and localChar:FindFirstChild("HumanoidRootPart")
- if not localHrp then return nil end
- for _, player in ipairs(Players:GetPlayers()) do
- if player ~= LocalPlayer and player.Character then
- local enemyChar = player.Character
- local humanoid = enemyChar:FindFirstChildOfClass("Humanoid")
- local targetPart = enemyChar:FindFirstChild(Config.TargetPart) or enemyChar:FindFirstChild("HumanoidRootPart")
- if humanoid and humanoid.Health > 0 and targetPart then
- local distance = (targetPart.Position - localHrp.Position).Magnitude
- if Config.TargetMode == "Nearest" then
- if not bestValue or distance < bestValue then
- bestValue = distance
- bestTarget = targetPart
- end
- elseif Config.TargetMode == "Farthest" then
- if not bestValue or distance > bestValue then
- bestValue = distance
- bestTarget = targetPart
- end
- elseif Config.TargetMode == "Lowest HP" then
- if not bestValue or humanoid.Health < bestValue then
- bestValue = humanoid.Health
- bestTarget = targetPart
- end
- end
- end
- end
- end
- return bestTarget
- end
- RunService.RenderStepped:Connect(function()
- if Config.AimbotEnabled then
- local targetPart = getBestTarget()
- if targetPart then
- Camera.CFrame = CFrame.new(Camera.CFrame.Position, targetPart.Position)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment