l1rcy3

Untitled

Sep 4th, 2025
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 15.55 KB | None | 0 0
  1. -- Steal a Brainrot Script by @r3yp3r
  2. -- ESP + Fast Steal + Menu
  3.  
  4. local Players = game:GetService("Players")
  5. local RunService = game:GetService("RunService")
  6. local UserInputService = game:GetService("UserInputService")
  7. local TweenService = game:GetService("TweenService")
  8. local CoreGui = game:GetService("CoreGui")
  9.  
  10. local LocalPlayer = Players.LocalPlayer
  11. local Mouse = LocalPlayer:GetMouse()
  12.  
  13. -- Конфигурация
  14. local Config = {
  15.     ESP = {
  16.         Enabled = true,
  17.         ShowNames = true,
  18.         ShowDistance = true,
  19.         BoxColor = Color3.fromRGB(255, 0, 0),
  20.         TextColor = Color3.fromRGB(255, 255, 255),
  21.         TeamCheck = false
  22.     },
  23.     FastSteal = {
  24.         Enabled = true,
  25.         StealDistance = 50,
  26.         AutoSteal = false,
  27.         StealCooldown = 0.5
  28.     },
  29.     Menu = {
  30.         Keybind = Enum.KeyCode.RightShift,
  31.         Visible = false
  32.     }
  33. }
  34.  
  35. -- Переменные
  36. local ESPObjects = {}
  37. local LastStealTime = 0
  38. local MenuFrame = nil
  39. local Connections = {}
  40.  
  41. -- Создание меню
  42. function CreateMenu()
  43.     if MenuFrame then MenuFrame:Destroy() end
  44.    
  45.     MenuFrame = Instance.new("ScreenGui")
  46.     MenuFrame.Name = "BrainrotMenu"
  47.     MenuFrame.Parent = CoreGui
  48.     MenuFrame.ResetOnSpawn = false
  49.    
  50.     local MainFrame = Instance.new("Frame")
  51.     MainFrame.Size = UDim2.new(0, 300, 0, 400)
  52.     MainFrame.Position = UDim2.new(0.5, -150, 0.5, -200)
  53.     MainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  54.     MainFrame.BorderSizePixel = 0
  55.     MainFrame.Parent = MenuFrame
  56.    
  57.     local Title = Instance.new("TextLabel")
  58.     Title.Size = UDim2.new(1, 0, 0, 40)
  59.     Title.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  60.     Title.Text = "Steal a Brainrot Menu"
  61.     Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  62.     Title.Font = Enum.Font.GothamBold
  63.     Title.TextSize = 16
  64.     Title.Parent = MainFrame
  65.    
  66.     local CloseButton = Instance.new("TextButton")
  67.     CloseButton.Size = UDim2.new(0, 30, 0, 30)
  68.     CloseButton.Position = UDim2.new(1, -35, 0, 5)
  69.     CloseButton.BackgroundColor3 = Color3.fromRGB(255, 50, 50)
  70.     CloseButton.Text = "X"
  71.     CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  72.     CloseButton.Font = Enum.Font.GothamBold
  73.     CloseButton.TextSize = 14
  74.     CloseButton.Parent = MainFrame
  75.    
  76.     CloseButton.MouseButton1Click:Connect(function()
  77.         Config.Menu.Visible = false
  78.         MenuFrame.Enabled = false
  79.     end)
  80.    
  81.     local ScrollFrame = Instance.new("ScrollingFrame")
  82.     ScrollFrame.Size = UDim2.new(1, -10, 1, -50)
  83.     ScrollFrame.Position = UDim2.new(0, 5, 0, 45)
  84.     ScrollFrame.BackgroundTransparency = 1
  85.     ScrollFrame.ScrollBarThickness = 5
  86.     ScrollFrame.Parent = MainFrame
  87.    
  88.     -- ESP Toggle
  89.     CreateToggle(ScrollFrame, "ESP Enabled", Config.ESP.Enabled, function(value)
  90.         Config.ESP.Enabled = value
  91.         if not value then
  92.             ClearESP()
  93.         end
  94.     end)
  95.    
  96.     CreateToggle(ScrollFrame, "Show Names", Config.ESP.ShowNames, function(value)
  97.         Config.ESP.ShowNames = value
  98.     end)
  99.    
  100.     CreateToggle(ScrollFrame, "Show Distance", Config.ESP.ShowDistance, function(value)
  101.         Config.ESP.ShowDistance = value
  102.     end)
  103.    
  104.     CreateToggle(ScrollFrame, "Team Check", Config.ESP.TeamCheck, function(value)
  105.         Config.ESP.TeamCheck = value
  106.     end)
  107.    
  108.     -- Fast Steal Toggle
  109.     CreateToggle(ScrollFrame, "Fast Steal", Config.FastSteal.Enabled, function(value)
  110.         Config.FastSteal.Enabled = value
  111.     end)
  112.    
  113.     CreateToggle(ScrollFrame, "Auto Steal", Config.FastSteal.AutoSteal, function(value)
  114.         Config.FastSteal.AutoSteal = value
  115.     end)
  116.    
  117.     -- Slider для дистанции
  118.     CreateSlider(ScrollFrame, "Steal Distance", 10, 100, Config.FastSteal.StealDistance, function(value)
  119.         Config.FastSteal.StealDistance = value
  120.     end)
  121.    
  122.     -- Кнопка кражи
  123.     local StealButton = Instance.new("TextButton")
  124.     StealButton.Size = UDim2.new(1, -20, 0, 40)
  125.     StealButton.Position = UDim2.new(0, 10, 0, ScrollFrame.AbsoluteContentSize + 10)
  126.     StealButton.BackgroundColor3 = Color3.fromRGB(0, 150, 255)
  127.     StealButton.Text = "STEAL NEAREST BRAIN"
  128.     StealButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  129.     StealButton.Font = Enum.Font.GothamBold
  130.     StealButton.TextSize = 14
  131.     StealButton.Parent = ScrollFrame
  132.    
  133.     StealButton.MouseButton1Click:Connect(function()
  134.         StealNearestBrain()
  135.     end)
  136.    
  137.     MenuFrame.Enabled = Config.Menu.Visible
  138. end
  139.  
  140. function CreateToggle(parent, text, defaultValue, callback)
  141.     local toggleFrame = Instance.new("Frame")
  142.     toggleFrame.Size = UDim2.new(1, 0, 0, 30)
  143.     toggleFrame.BackgroundTransparency = 1
  144.     toggleFrame.Parent = parent
  145.    
  146.     local toggleText = Instance.new("TextLabel")
  147.     toggleText.Size = UDim2.new(0.7, 0, 1, 0)
  148.     toggleText.Text = text
  149.     toggleText.TextColor3 = Color3.fromRGB(255, 255, 255)
  150.     toggleText.Font = Enum.Font.Gotham
  151.     toggleText.TextSize = 14
  152.     toggleText.TextXAlignment = Enum.TextXAlignment.Left
  153.     toggleText.BackgroundTransparency = 1
  154.     toggleText.Parent = toggleFrame
  155.    
  156.     local toggleButton = Instance.new("TextButton")
  157.     toggleButton.Size = UDim2.new(0, 50, 0, 25)
  158.     toggleButton.Position = UDim2.new(0.7, 0, 0, 2)
  159.     toggleButton.BackgroundColor3 = defaultValue and Color3.fromRGB(0, 200, 0) or Color3.fromRGB(200, 0, 0)
  160.     toggleButton.Text = defaultValue and "ON" or "OFF"
  161.     toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  162.     toggleButton.Font = Enum.Font.GothamBold
  163.     toggleButton.TextSize = 12
  164.     toggleButton.Parent = toggleFrame
  165.    
  166.     toggleButton.MouseButton1Click:Connect(function()
  167.         local newValue = not defaultValue
  168.         toggleButton.BackgroundColor3 = newValue and Color3.fromRGB(0, 200, 0) or Color3.fromRGB(200, 0, 0)
  169.         toggleButton.Text = newValue and "ON" or "OFF"
  170.         defaultValue = newValue
  171.         callback(newValue)
  172.     end)
  173.    
  174.     parent.CanvasSize = UDim2.new(0, 0, 0, parent.AbsoluteContentSize + 35)
  175. end
  176.  
  177. function CreateSlider(parent, text, min, max, defaultValue, callback)
  178.     local sliderFrame = Instance.new("Frame")
  179.     sliderFrame.Size = UDim2.new(1, 0, 0, 50)
  180.     sliderFrame.BackgroundTransparency = 1
  181.     sliderFrame.Parent = parent
  182.    
  183.     local sliderText = Instance.new("TextLabel")
  184.     sliderText.Size = UDim2.new(1, 0, 0, 20)
  185.     sliderText.Text = text .. ": " .. defaultValue
  186.     sliderText.TextColor3 = Color3.fromRGB(255, 255, 255)
  187.     sliderText.Font = Enum.Font.Gotham
  188.     sliderText.TextSize = 14
  189.     sliderText.TextXAlignment = Enum.TextXAlignment.Left
  190.     sliderText.BackgroundTransparency = 1
  191.     sliderText.Parent = sliderFrame
  192.    
  193.     local sliderTrack = Instance.new("Frame")
  194.     sliderTrack.Size = UDim2.new(1, 0, 0, 10)
  195.     sliderTrack.Position = UDim2.new(0, 0, 0, 25)
  196.     sliderTrack.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  197.     sliderTrack.BorderSizePixel = 0
  198.     sliderTrack.Parent = sliderFrame
  199.    
  200.     local sliderFill = Instance.new("Frame")
  201.     sliderFill.Size = UDim2.new((defaultValue - min) / (max - min), 0, 1, 0)
  202.     sliderFill.BackgroundColor3 = Color3.fromRGB(0, 150, 255)
  203.     sliderFill.BorderSizePixel = 0
  204.     sliderFill.Parent = sliderTrack
  205.    
  206.     local sliderButton = Instance.new("TextButton")
  207.     sliderButton.Size = UDim2.new(0, 15, 0, 15)
  208.     sliderButton.Position = UDim2.new((defaultValue - min) / (max - min), -7, 0, -2)
  209.     sliderButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  210.     sliderButton.Text = ""
  211.     sliderButton.Parent = sliderTrack
  212.    
  213.     local dragging = false
  214.    
  215.     sliderButton.MouseButton1Down:Connect(function()
  216.         dragging = true
  217.     end)
  218.    
  219.     UserInputService.InputEnded:Connect(function(input)
  220.         if input.UserInputType == Enum.UserInputType.MouseButton1 then
  221.             dragging = false
  222.         end
  223.     end)
  224.    
  225.     sliderTrack.MouseButton1Click:Connect(function(x, y)
  226.         local relativeX = x - sliderTrack.AbsolutePosition.X
  227.         local percentage = math.clamp(relativeX / sliderTrack.AbsoluteSize.X, 0, 1)
  228.         local value = math.floor(min + (max - min) * percentage)
  229.        
  230.         sliderFill.Size = UDim2.new(percentage, 0, 1, 0)
  231.         sliderButton.Position = UDim2.new(percentage, -7, 0, -2)
  232.         sliderText.Text = text .. ": " .. value
  233.         callback(value)
  234.     end)
  235.    
  236.     Connections["SliderDrag"] = RunService.RenderStepped:Connect(function()
  237.         if dragging then
  238.             local mousePos = UserInputService:GetMouseLocation()
  239.             local relativeX = mousePos.X - sliderTrack.AbsolutePosition.X
  240.             local percentage = math.clamp(relativeX / sliderTrack.AbsoluteSize.X, 0, 1)
  241.             local value = math.floor(min + (max - min) * percentage)
  242.            
  243.             sliderFill.Size = UDim2.new(percentage, 0, 1, 0)
  244.             sliderButton.Position = UDim2.new(percentage, -7, 0, -2)
  245.             sliderText.Text = text .. ": " .. value
  246.             callback(value)
  247.         end
  248.     end)
  249.    
  250.     parent.CanvasSize = UDim2.new(0, 0, 0, parent.AbsoluteContentSize + 55)
  251. end
  252.  
  253. -- ESP функции
  254. function CreateESP(character)
  255.     if not character or not character:FindFirstChild("HumanoidRootPart") then return end
  256.    
  257.     local espFolder = Instance.new("Folder")
  258.     espFolder.Name = "ESP_" .. character.Name
  259.     espFolder.Parent = CoreGui
  260.    
  261.     local highlight = Instance.new("Highlight")
  262.     highlight.Adornee = character
  263.     highlight.FillColor = Config.ESP.BoxColor
  264.     highlight.FillTransparency = 0.7
  265.     highlight.OutlineColor = Config.ESP.BoxColor
  266.     highlight.OutlineTransparency = 0
  267.     highlight.Parent = espFolder
  268.    
  269.     local billboard = Instance.new("BillboardGui")
  270.     billboard.Size = UDim2.new(0, 200, 0, 50)
  271.     billboard.StudsOffset = Vector3.new(0, 3, 0)
  272.     billboard.Adornee = character:WaitForChild("Head")
  273.     billboard.AlwaysOnTop = true
  274.     billboard.Parent = espFolder
  275.    
  276.     local textLabel = Instance.new("TextLabel")
  277.     textLabel.Size = UDim2.new(1, 0, 1, 0)
  278.     textLabel.BackgroundTransparency = 1
  279.     textLabel.Text = ""
  280.     textLabel.TextColor3 = Config.ESP.TextColor
  281.     textLabel.Font = Enum.Font.GothamBold
  282.     textLabel.TextSize = 14
  283.     textLabel.Parent = billboard
  284.    
  285.     ESPObjects[character] = {
  286.         Folder = espFolder,
  287.         Highlight = highlight,
  288.         Billboard = billboard,
  289.         TextLabel = textLabel
  290.     }
  291.    
  292.     UpdateESP(character)
  293. end
  294.  
  295. function UpdateESP(character)
  296.     if not ESPObjects[character] then return end
  297.    
  298.     local rootPart = character:FindFirstChild("HumanoidRootPart")
  299.     if not rootPart then return end
  300.    
  301.     local distance = (LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart"))
  302.         and (rootPart.Position - LocalPlayer.Character.HumanoidRootPart.Position).Magnitude
  303.         or 0
  304.    
  305.     local text = ""
  306.     if Config.ESP.ShowNames then
  307.         text = character.Name .. "\n"
  308.     end
  309.     if Config.ESP.ShowDistance then
  310.         text = text .. "Distance: " .. math.floor(distance) .. "m"
  311.     end
  312.    
  313.     ESPObjects[character].TextLabel.Text = text
  314. end
  315.  
  316. function ClearESP()
  317.     for _, espObject in pairs(ESPObjects) do
  318.         espObject.Folder:Destroy()
  319.     end
  320.     ESPObjects = {}
  321. end
  322.  
  323. -- Функции кражи
  324. function FindNearestBrain()
  325.     local closestBrain = nil
  326.     local closestDistance = math.huge
  327.     local character = LocalPlayer.Character
  328.    
  329.     if not character then return nil end
  330.    
  331.     local rootPart = character:FindFirstChild("HumanoidRootPart")
  332.     if not rootPart then return nil end
  333.    
  334.     -- Ищем мозги в workspace
  335.     for _, brain in pairs(workspace:GetChildren()) do
  336.         if brain.Name:lower():find("brain") and brain:FindFirstChild("Handle") then
  337.             local distance = (brain.Handle.Position - rootPart.Position).Magnitude
  338.             if distance < closestDistance and distance <= Config.FastSteal.StealDistance then
  339.                 closestDistance = distance
  340.                 closestBrain = brain
  341.             end
  342.         end
  343.     end
  344.    
  345.     return closestBrain, closestDistance
  346. end
  347.  
  348. function StealNearestBrain()
  349.     if tick() - LastStealTime < Config.FastSteal.StealCooldown then return end
  350.    
  351.     local brain, distance = FindNearestBrain()
  352.     if not brain then return end
  353.    
  354.     -- Симуляция кражи
  355.     firetouchinterest(LocalPlayer.Character:FindFirstChild("HumanoidRootPart"), brain.Handle, 0)
  356.     task.wait(0.1)
  357.     firetouchinterest(LocalPlayer.Character:FindFirstChild("HumanoidRootPart"), brain.Handle, 1)
  358.    
  359.     LastStealTime = tick()
  360. end
  361.  
  362. -- Основные функции
  363. function Initialize()
  364.     CreateMenu()
  365.    
  366.     -- Обработчик клавиш меню
  367.     Connections["MenuToggle"] = UserInputService.InputBegan:Connect(function(input)
  368.         if input.KeyCode == Config.Menu.Keybind then
  369.             Config.Menu.Visible = not Config.Menu.Visible
  370.             if MenuFrame then
  371.                 MenuFrame.Enabled = Config.Menu.Visible
  372.             end
  373.         end
  374.     end)
  375.    
  376.     -- ESP обработчик
  377.     Connections["ESPUpdate"] = RunService.RenderStepped:Connect(function()
  378.         if not Config.ESP.Enabled then return end
  379.        
  380.         for _, player in pairs(Players:GetPlayers()) do
  381.             if player ~= LocalPlayer and player.Character then
  382.                 if Config.ESP.TeamCheck and player.Team == LocalPlayer.Team then
  383.                     if ESPObjects[player.Character] then
  384.                         ESPObjects[player.Character].Folder:Destroy()
  385.                         ESPObjects[player.Character] = nil
  386.                     end
  387.                     continue
  388.                 end
  389.                
  390.                 if not ESPObjects[player.Character] then
  391.                     CreateESP(player.Character)
  392.                 else
  393.                     UpdateESP(player.Character)
  394.                 end
  395.             end
  396.         end
  397.        
  398.         -- Очистка старых ESP
  399.         for character, espObject in pairs(ESPObjects) do
  400.             if not character or not character.Parent then
  401.                 espObject.Folder:Destroy()
  402.                 ESPObjects[character] = nil
  403.             end
  404.         end
  405.     end)
  406.    
  407.     -- Авто-кража
  408.     Connections["AutoSteal"] = RunService.Heartbeat:Connect(function()
  409.         if Config.FastSteal.Enabled and Config.FastSteal.AutoSteal then
  410.             StealNearestBrain()
  411.         end
  412.     end)
  413.    
  414.     -- Обработчик новых игроков
  415.     Connections["PlayerAdded"] = Players.PlayerAdded:Connect(function(player)
  416.         player.CharacterAdded:Connect(function(character)
  417.             if Config.ESP.Enabled then
  418.                 task.wait(1)
  419.                 CreateESP(character)
  420.             end
  421.         end)
  422.     end)
  423.    
  424.     -- Инициализация ESP для существующих игроков
  425.     for _, player in pairs(Players:GetPlayers()) do
  426.         if player ~= LocalPlayer and player.Character and Config.ESP.Enabled then
  427.             CreateESP(player.Character)
  428.         end
  429.     end
  430. end
  431.  
  432. -- Очистка при отключении
  433. function Cleanup()
  434.     for _, connection in pairs(Connections) do
  435.         connection:Disconnect()
  436.     end
  437.    
  438.     ClearESP()
  439.     if MenuFrame then
  440.         MenuFrame:Destroy()
  441.     end
  442. end
  443.  
  444. -- Запуск скрипта
  445. Initialize()
  446.  
  447. -- Авто-очистка
  448. game:GetService("Players").PlayerRemoving:Connect(function(player)
  449.     if player == LocalPlayer then
  450.         Cleanup()
  451.     end
  452. end)
  453.  
  454. warn("Steal a Brainrot Script loaded! Press RightShift to open menu")
Advertisement
Add Comment
Please, Sign In to add comment