ADVERTISEMENTREMOVE ADS
Game icon

Better legacy/reborn BAG ESP (READ DESC)

PARKOUR
6 months ago
Script preview thumbnail
Script Preview

Description

does what the title says.

i used this to test my game but then i got an idea so yeah

STEPS:

  1. find a bag

  2. enable the "click to highlight similar" feature

  3. click on the bag

  4. get the bags

ADVERTISEMENTREMOVE ADS
165 Lines • 5.12 KiB
Raw
local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local player = Players.LocalPlayer
local mouse = player:GetMouse()
-- GUI setup
local gui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
gui.Name = "ItemHighlighterGUI"
gui.ResetOnSpawn = false
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 270, 0.7, 0)
frame.Position = UDim2.new(0, 10, 0.15, 0)
frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
frame.BorderSizePixel = 0
frame.Parent = gui
Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 8)
-- Search bar
local searchBar = Instance.new("TextBox")
searchBar.Size = UDim2.new(1, -12, 0, 30)
searchBar.Position = UDim2.new(0, 6, 0, 6)
searchBar.PlaceholderText = "Search..."
searchBar.Text = ""
searchBar.TextColor3 = Color3.new(1, 1, 1)
searchBar.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
searchBar.Font = Enum.Font.SourceSans
searchBar.TextSize = 18
searchBar.ClearTextOnFocus = false
searchBar.Parent = frame
Instance.new("UICorner", searchBar).CornerRadius = UDim.new(0, 6)
-- Toggle Button
local toggleButton = Instance.new("TextButton")
toggleButton.Size = UDim2.new(1, -12, 0, 30)
toggleButton.Position = UDim2.new(0, 6, 0, 42)
toggleButton.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
toggleButton.Text = "Click-to-Highlight Similar: OFF"
toggleButton.TextColor3 = Color3.new(1, 1, 1)
toggleButton.Font = Enum.Font.SourceSansBold
toggleButton.TextSize = 16
toggleButton.Parent = frame
Instance.new("UICorner", toggleButton).CornerRadius = UDim.new(0, 6)
local clickModeEnabled = false
toggleButton.MouseButton1Click:Connect(function()
clickModeEnabled = not clickModeEnabled
toggleButton.Text = "Click-to-Highlight Similar: " .. (clickModeEnabled and "ON" or "OFF")
toggleButton.BackgroundColor3 = clickModeEnabled and Color3.fromRGB(0, 170, 0) or Color3.fromRGB(70, 70, 70)
end)
-- Scroll Frame for item list
local scroll = Instance.new("ScrollingFrame", frame)
scroll.Size = UDim2.new(1, -12, 1, -84)
scroll.Position = UDim2.new(0, 6, 0, 78)
scroll.BackgroundTransparency = 1
scroll.ScrollBarThickness = 6
scroll.AutomaticCanvasSize = Enum.AutomaticSize.Y
scroll.CanvasSize = UDim2.new(0, 0, 0, 0)
local scrollLayout = Instance.new("UIListLayout", scroll)
scrollLayout.SortOrder = Enum.SortOrder.LayoutOrder
scrollLayout.Padding = UDim.new(0, 4)
-- Label for the highlighted object name
local highlightedLabel = Instance.new("TextLabel")
highlightedLabel.Size = UDim2.new(1, -12, 0, 30)
highlightedLabel.Position = UDim2.new(0, 6, 0, -32)
highlightedLabel.TextColor3 = Color3.new(1, 1, 1)
highlightedLabel.Text = "Highlighted: None"
highlightedLabel.BackgroundTransparency = 1
highlightedLabel.Font = Enum.Font.SourceSansBold
highlightedLabel.TextSize = 16
highlightedLabel.Parent = frame
-- Highlight logic
local function clearHighlights()
for _, h in Workspace:GetDescendants() do
if h:IsA("Highlight") and h.Name == "ESP_Highlight" then
h:Destroy()
end
end
end
local function highlightObjectsWithShape(reference)
if not reference:IsA("BasePart") then return end
local refClass = reference.ClassName
local refSize = reference.Size
clearHighlights()
for _, obj in Workspace:GetDescendants() do
if obj:IsA("BasePart") and obj.ClassName == refClass and obj.Size == refSize then
local highlight = Instance.new("Highlight")
highlight.Name = "ESP_Highlight"
highlight.FillColor = Color3.fromRGB(255, 0, 0) -- Bright Red for better visibility
highlight.FillTransparency = 0.1
highlight.OutlineColor = Color3.fromRGB(255, 255, 255)
highlight.OutlineTransparency = 0
highlight.Adornee = obj
highlight.Parent = obj
end
end
-- Update the name label
highlightedLabel.Text = "Highlighted: " .. reference.Name
end
-- 3D click detection
mouse.Button1Down:Connect(function()
if not clickModeEnabled then return end
local target = mouse.Target
if target then
highlightObjectsWithShape(target)
end
end)
-- GUI List Creation
local function isItem(obj)
return obj:IsA("Model") or obj:IsA("BasePart")
end
local itemButtons = {}
local function addButtonForItem(item)
local button = Instance.new("TextButton")
button.Size = UDim2.new(1, -4, 0, 24)
button.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
button.TextColor3 = Color3.new(1, 1, 1)
button.Font = Enum.Font.SourceSansBold
button.TextSize = 16
button.Text = item.Name
button.Parent = scroll
Instance.new("UICorner", button).CornerRadius = UDim.new(0, 6)
button.MouseButton1Click:Connect(function()
if item:IsA("BasePart") then
highlightObjectsWithShape(item)
end
end)
itemButtons[item] = button
end
local function listAllItems()
for _, obj in Workspace:GetDescendants() do
if isItem(obj) then
addButtonForItem(obj)
end
end
end
-- Search bar filtering
local function updateSearchResults()
local query = searchBar.Text:lower()
for item, button in pairs(itemButtons) do
button.Visible = item.Name:lower():find(query) ~= nil
end
end
searchBar:GetPropertyChangedSignal("Text"):Connect(updateSearchResults)
-- Initial populate
listAllItems()
ADVERTISEMENTREMOVE ADS

Comments

0 comments
to add a comment
Loading comments
ADVERTISEMENTREMOVE ADS