Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Steal a Brainrot Script by @r3yp3r
- -- ESP + Fast Steal + Menu
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local UserInputService = game:GetService("UserInputService")
- local TweenService = game:GetService("TweenService")
- local CoreGui = game:GetService("CoreGui")
- local LocalPlayer = Players.LocalPlayer
- local Mouse = LocalPlayer:GetMouse()
- -- Конфигурация
- local Config = {
- ESP = {
- Enabled = true,
- ShowNames = true,
- ShowDistance = true,
- BoxColor = Color3.fromRGB(255, 0, 0),
- TextColor = Color3.fromRGB(255, 255, 255),
- TeamCheck = false
- },
- FastSteal = {
- Enabled = true,
- StealDistance = 50,
- AutoSteal = false,
- StealCooldown = 0.5
- },
- Menu = {
- Keybind = Enum.KeyCode.RightShift,
- Visible = false
- }
- }
- -- Переменные
- local ESPObjects = {}
- local LastStealTime = 0
- local MenuFrame = nil
- local Connections = {}
- -- Создание меню
- function CreateMenu()
- if MenuFrame then MenuFrame:Destroy() end
- MenuFrame = Instance.new("ScreenGui")
- MenuFrame.Name = "BrainrotMenu"
- MenuFrame.Parent = CoreGui
- MenuFrame.ResetOnSpawn = false
- local MainFrame = Instance.new("Frame")
- MainFrame.Size = UDim2.new(0, 300, 0, 400)
- MainFrame.Position = UDim2.new(0.5, -150, 0.5, -200)
- MainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- MainFrame.BorderSizePixel = 0
- MainFrame.Parent = MenuFrame
- local Title = Instance.new("TextLabel")
- Title.Size = UDim2.new(1, 0, 0, 40)
- Title.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
- Title.Text = "Steal a Brainrot Menu"
- Title.TextColor3 = Color3.fromRGB(255, 255, 255)
- Title.Font = Enum.Font.GothamBold
- Title.TextSize = 16
- Title.Parent = MainFrame
- local CloseButton = Instance.new("TextButton")
- CloseButton.Size = UDim2.new(0, 30, 0, 30)
- CloseButton.Position = UDim2.new(1, -35, 0, 5)
- CloseButton.BackgroundColor3 = Color3.fromRGB(255, 50, 50)
- CloseButton.Text = "X"
- CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- CloseButton.Font = Enum.Font.GothamBold
- CloseButton.TextSize = 14
- CloseButton.Parent = MainFrame
- CloseButton.MouseButton1Click:Connect(function()
- Config.Menu.Visible = false
- MenuFrame.Enabled = false
- end)
- local ScrollFrame = Instance.new("ScrollingFrame")
- ScrollFrame.Size = UDim2.new(1, -10, 1, -50)
- ScrollFrame.Position = UDim2.new(0, 5, 0, 45)
- ScrollFrame.BackgroundTransparency = 1
- ScrollFrame.ScrollBarThickness = 5
- ScrollFrame.Parent = MainFrame
- -- ESP Toggle
- CreateToggle(ScrollFrame, "ESP Enabled", Config.ESP.Enabled, function(value)
- Config.ESP.Enabled = value
- if not value then
- ClearESP()
- end
- end)
- CreateToggle(ScrollFrame, "Show Names", Config.ESP.ShowNames, function(value)
- Config.ESP.ShowNames = value
- end)
- CreateToggle(ScrollFrame, "Show Distance", Config.ESP.ShowDistance, function(value)
- Config.ESP.ShowDistance = value
- end)
- CreateToggle(ScrollFrame, "Team Check", Config.ESP.TeamCheck, function(value)
- Config.ESP.TeamCheck = value
- end)
- -- Fast Steal Toggle
- CreateToggle(ScrollFrame, "Fast Steal", Config.FastSteal.Enabled, function(value)
- Config.FastSteal.Enabled = value
- end)
- CreateToggle(ScrollFrame, "Auto Steal", Config.FastSteal.AutoSteal, function(value)
- Config.FastSteal.AutoSteal = value
- end)
- -- Slider для дистанции
- CreateSlider(ScrollFrame, "Steal Distance", 10, 100, Config.FastSteal.StealDistance, function(value)
- Config.FastSteal.StealDistance = value
- end)
- -- Кнопка кражи
- local StealButton = Instance.new("TextButton")
- StealButton.Size = UDim2.new(1, -20, 0, 40)
- StealButton.Position = UDim2.new(0, 10, 0, ScrollFrame.AbsoluteContentSize + 10)
- StealButton.BackgroundColor3 = Color3.fromRGB(0, 150, 255)
- StealButton.Text = "STEAL NEAREST BRAIN"
- StealButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- StealButton.Font = Enum.Font.GothamBold
- StealButton.TextSize = 14
- StealButton.Parent = ScrollFrame
- StealButton.MouseButton1Click:Connect(function()
- StealNearestBrain()
- end)
- MenuFrame.Enabled = Config.Menu.Visible
- end
- function CreateToggle(parent, text, defaultValue, callback)
- local toggleFrame = Instance.new("Frame")
- toggleFrame.Size = UDim2.new(1, 0, 0, 30)
- toggleFrame.BackgroundTransparency = 1
- toggleFrame.Parent = parent
- local toggleText = Instance.new("TextLabel")
- toggleText.Size = UDim2.new(0.7, 0, 1, 0)
- toggleText.Text = text
- toggleText.TextColor3 = Color3.fromRGB(255, 255, 255)
- toggleText.Font = Enum.Font.Gotham
- toggleText.TextSize = 14
- toggleText.TextXAlignment = Enum.TextXAlignment.Left
- toggleText.BackgroundTransparency = 1
- toggleText.Parent = toggleFrame
- local toggleButton = Instance.new("TextButton")
- toggleButton.Size = UDim2.new(0, 50, 0, 25)
- toggleButton.Position = UDim2.new(0.7, 0, 0, 2)
- toggleButton.BackgroundColor3 = defaultValue and Color3.fromRGB(0, 200, 0) or Color3.fromRGB(200, 0, 0)
- toggleButton.Text = defaultValue and "ON" or "OFF"
- toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- toggleButton.Font = Enum.Font.GothamBold
- toggleButton.TextSize = 12
- toggleButton.Parent = toggleFrame
- toggleButton.MouseButton1Click:Connect(function()
- local newValue = not defaultValue
- toggleButton.BackgroundColor3 = newValue and Color3.fromRGB(0, 200, 0) or Color3.fromRGB(200, 0, 0)
- toggleButton.Text = newValue and "ON" or "OFF"
- defaultValue = newValue
- callback(newValue)
- end)
- parent.CanvasSize = UDim2.new(0, 0, 0, parent.AbsoluteContentSize + 35)
- end
- function CreateSlider(parent, text, min, max, defaultValue, callback)
- local sliderFrame = Instance.new("Frame")
- sliderFrame.Size = UDim2.new(1, 0, 0, 50)
- sliderFrame.BackgroundTransparency = 1
- sliderFrame.Parent = parent
- local sliderText = Instance.new("TextLabel")
- sliderText.Size = UDim2.new(1, 0, 0, 20)
- sliderText.Text = text .. ": " .. defaultValue
- sliderText.TextColor3 = Color3.fromRGB(255, 255, 255)
- sliderText.Font = Enum.Font.Gotham
- sliderText.TextSize = 14
- sliderText.TextXAlignment = Enum.TextXAlignment.Left
- sliderText.BackgroundTransparency = 1
- sliderText.Parent = sliderFrame
- local sliderTrack = Instance.new("Frame")
- sliderTrack.Size = UDim2.new(1, 0, 0, 10)
- sliderTrack.Position = UDim2.new(0, 0, 0, 25)
- sliderTrack.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
- sliderTrack.BorderSizePixel = 0
- sliderTrack.Parent = sliderFrame
- local sliderFill = Instance.new("Frame")
- sliderFill.Size = UDim2.new((defaultValue - min) / (max - min), 0, 1, 0)
- sliderFill.BackgroundColor3 = Color3.fromRGB(0, 150, 255)
- sliderFill.BorderSizePixel = 0
- sliderFill.Parent = sliderTrack
- local sliderButton = Instance.new("TextButton")
- sliderButton.Size = UDim2.new(0, 15, 0, 15)
- sliderButton.Position = UDim2.new((defaultValue - min) / (max - min), -7, 0, -2)
- sliderButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- sliderButton.Text = ""
- sliderButton.Parent = sliderTrack
- local dragging = false
- sliderButton.MouseButton1Down:Connect(function()
- dragging = true
- end)
- UserInputService.InputEnded:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = false
- end
- end)
- sliderTrack.MouseButton1Click:Connect(function(x, y)
- local relativeX = x - sliderTrack.AbsolutePosition.X
- local percentage = math.clamp(relativeX / sliderTrack.AbsoluteSize.X, 0, 1)
- local value = math.floor(min + (max - min) * percentage)
- sliderFill.Size = UDim2.new(percentage, 0, 1, 0)
- sliderButton.Position = UDim2.new(percentage, -7, 0, -2)
- sliderText.Text = text .. ": " .. value
- callback(value)
- end)
- Connections["SliderDrag"] = RunService.RenderStepped:Connect(function()
- if dragging then
- local mousePos = UserInputService:GetMouseLocation()
- local relativeX = mousePos.X - sliderTrack.AbsolutePosition.X
- local percentage = math.clamp(relativeX / sliderTrack.AbsoluteSize.X, 0, 1)
- local value = math.floor(min + (max - min) * percentage)
- sliderFill.Size = UDim2.new(percentage, 0, 1, 0)
- sliderButton.Position = UDim2.new(percentage, -7, 0, -2)
- sliderText.Text = text .. ": " .. value
- callback(value)
- end
- end)
- parent.CanvasSize = UDim2.new(0, 0, 0, parent.AbsoluteContentSize + 55)
- end
- -- ESP функции
- function CreateESP(character)
- if not character or not character:FindFirstChild("HumanoidRootPart") then return end
- local espFolder = Instance.new("Folder")
- espFolder.Name = "ESP_" .. character.Name
- espFolder.Parent = CoreGui
- local highlight = Instance.new("Highlight")
- highlight.Adornee = character
- highlight.FillColor = Config.ESP.BoxColor
- highlight.FillTransparency = 0.7
- highlight.OutlineColor = Config.ESP.BoxColor
- highlight.OutlineTransparency = 0
- highlight.Parent = espFolder
- local billboard = Instance.new("BillboardGui")
- billboard.Size = UDim2.new(0, 200, 0, 50)
- billboard.StudsOffset = Vector3.new(0, 3, 0)
- billboard.Adornee = character:WaitForChild("Head")
- billboard.AlwaysOnTop = true
- billboard.Parent = espFolder
- local textLabel = Instance.new("TextLabel")
- textLabel.Size = UDim2.new(1, 0, 1, 0)
- textLabel.BackgroundTransparency = 1
- textLabel.Text = ""
- textLabel.TextColor3 = Config.ESP.TextColor
- textLabel.Font = Enum.Font.GothamBold
- textLabel.TextSize = 14
- textLabel.Parent = billboard
- ESPObjects[character] = {
- Folder = espFolder,
- Highlight = highlight,
- Billboard = billboard,
- TextLabel = textLabel
- }
- UpdateESP(character)
- end
- function UpdateESP(character)
- if not ESPObjects[character] then return end
- local rootPart = character:FindFirstChild("HumanoidRootPart")
- if not rootPart then return end
- local distance = (LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart"))
- and (rootPart.Position - LocalPlayer.Character.HumanoidRootPart.Position).Magnitude
- or 0
- local text = ""
- if Config.ESP.ShowNames then
- text = character.Name .. "\n"
- end
- if Config.ESP.ShowDistance then
- text = text .. "Distance: " .. math.floor(distance) .. "m"
- end
- ESPObjects[character].TextLabel.Text = text
- end
- function ClearESP()
- for _, espObject in pairs(ESPObjects) do
- espObject.Folder:Destroy()
- end
- ESPObjects = {}
- end
- -- Функции кражи
- function FindNearestBrain()
- local closestBrain = nil
- local closestDistance = math.huge
- local character = LocalPlayer.Character
- if not character then return nil end
- local rootPart = character:FindFirstChild("HumanoidRootPart")
- if not rootPart then return nil end
- -- Ищем мозги в workspace
- for _, brain in pairs(workspace:GetChildren()) do
- if brain.Name:lower():find("brain") and brain:FindFirstChild("Handle") then
- local distance = (brain.Handle.Position - rootPart.Position).Magnitude
- if distance < closestDistance and distance <= Config.FastSteal.StealDistance then
- closestDistance = distance
- closestBrain = brain
- end
- end
- end
- return closestBrain, closestDistance
- end
- function StealNearestBrain()
- if tick() - LastStealTime < Config.FastSteal.StealCooldown then return end
- local brain, distance = FindNearestBrain()
- if not brain then return end
- -- Симуляция кражи
- firetouchinterest(LocalPlayer.Character:FindFirstChild("HumanoidRootPart"), brain.Handle, 0)
- task.wait(0.1)
- firetouchinterest(LocalPlayer.Character:FindFirstChild("HumanoidRootPart"), brain.Handle, 1)
- LastStealTime = tick()
- end
- -- Основные функции
- function Initialize()
- CreateMenu()
- -- Обработчик клавиш меню
- Connections["MenuToggle"] = UserInputService.InputBegan:Connect(function(input)
- if input.KeyCode == Config.Menu.Keybind then
- Config.Menu.Visible = not Config.Menu.Visible
- if MenuFrame then
- MenuFrame.Enabled = Config.Menu.Visible
- end
- end
- end)
- -- ESP обработчик
- Connections["ESPUpdate"] = RunService.RenderStepped:Connect(function()
- if not Config.ESP.Enabled then return end
- for _, player in pairs(Players:GetPlayers()) do
- if player ~= LocalPlayer and player.Character then
- if Config.ESP.TeamCheck and player.Team == LocalPlayer.Team then
- if ESPObjects[player.Character] then
- ESPObjects[player.Character].Folder:Destroy()
- ESPObjects[player.Character] = nil
- end
- continue
- end
- if not ESPObjects[player.Character] then
- CreateESP(player.Character)
- else
- UpdateESP(player.Character)
- end
- end
- end
- -- Очистка старых ESP
- for character, espObject in pairs(ESPObjects) do
- if not character or not character.Parent then
- espObject.Folder:Destroy()
- ESPObjects[character] = nil
- end
- end
- end)
- -- Авто-кража
- Connections["AutoSteal"] = RunService.Heartbeat:Connect(function()
- if Config.FastSteal.Enabled and Config.FastSteal.AutoSteal then
- StealNearestBrain()
- end
- end)
- -- Обработчик новых игроков
- Connections["PlayerAdded"] = Players.PlayerAdded:Connect(function(player)
- player.CharacterAdded:Connect(function(character)
- if Config.ESP.Enabled then
- task.wait(1)
- CreateESP(character)
- end
- end)
- end)
- -- Инициализация ESP для существующих игроков
- for _, player in pairs(Players:GetPlayers()) do
- if player ~= LocalPlayer and player.Character and Config.ESP.Enabled then
- CreateESP(player.Character)
- end
- end
- end
- -- Очистка при отключении
- function Cleanup()
- for _, connection in pairs(Connections) do
- connection:Disconnect()
- end
- ClearESP()
- if MenuFrame then
- MenuFrame:Destroy()
- end
- end
- -- Запуск скрипта
- Initialize()
- -- Авто-очистка
- game:GetService("Players").PlayerRemoving:Connect(function(player)
- if player == LocalPlayer then
- Cleanup()
- end
- end)
- warn("Steal a Brainrot Script loaded! Press RightShift to open menu")
Advertisement
Add Comment
Please, Sign In to add comment