local UserInputService = game:GetService("UserInputService") local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local InsertService = game:GetService("InsertService") -- create the gui local screenGui = Instance.new("ScreenGui") screenGui.Name = "MyCustomGUI" screenGui.ResetOnSpawn = false screenGui.Parent = LocalPlayer:WaitForChild("PlayerGui") -- create a frame local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 250, 0, 150) frame.Position = UDim2.new(0.5, -100, 0.5, -50) frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0) frame.BackgroundTransparency = 0.3 frame.Active = true frame.Draggable = true frame.Parent = screenGui -- create ESP button local espButton = Instance.new("TextButton") espButton.Size = UDim2.new(0, 90, 0, 30) espButton.Position = UDim2.new(0, 5, 0, 10) espButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50) espButton.BackgroundTransparency = 0.3 espButton.Text = "ESP Enable" espButton.Parent = frame -- ESP logic local espEnabled = false local espObjects = {} local function createESP(player) if player == LocalPlayer then return end if not player.Character or not player.Character:FindFirstChild("HumanoidRootPart") then return end if espObjects[player] then return end local character = player.Character -- highlight system or smt local highlight = Instance.new("Highlight") highlight.Name = "ESPHighlight" highlight.FillColor = Color3.fromRGB(255, 0, 0) highlight.FillTransparency = 0.5 highlight.OutlineTransparency = 1 highlight.Adornee = character highlight.Parent = character -- billboardgui with name local billboard = Instance.new("BillboardGui") billboard.Name = "ESPName" billboard.Size = UDim2.new(0, 100, 0, 40) billboard.AlwaysOnTop = true billboard.StudsOffset = Vector3.new(0, 3, 0) billboard.Adornee = character:FindFirstChild("Head") or character:FindFirstChildWhichIsA("BasePart") billboard.Parent = character local textLabel = Instance.new("TextLabel") textLabel.Size = UDim2.new(1, 0, 1, 0) textLabel.BackgroundTransparency = 1 textLabel.TextColor3 = Color3.new(1, 0, 0) textLabel.TextStrokeTransparency = 0 textLabel.Text = player.Name textLabel.Font = Enum.Font.SourceSansBold textLabel.TextScaled = true textLabel.Parent = billboard espObjects[player] = {highlight, billboard} end local function removeESP(player) if espObjects[player] then for _, obj in pairs(espObjects[player]) do if obj and obj.Parent then obj:Destroy() end end espObjects[player] = nil end end local function toggleESP() espEnabled = not espEnabled if espEnabled then espButton.Text = "Enabled!" for _, player in pairs(Players:GetPlayers()) do createESP(player) player.CharacterAdded:Connect(function() wait(1) createESP(player) end) end else espButton.Text = "ESP Off" for _, player in pairs(Players:GetPlayers()) do removeESP(player) end end wait(1) espButton.Text = espEnabled and "ESP On" or "ESP Enable" end espButton.MouseButton1Click:Connect(toggleESP) -- create Teleport to player Button local TpButton = Instance.new("TextButton") TpButton.Size = UDim2.new(0, 90, 0, 30) TpButton.Position = UDim2.new(0, 100, 0, 10) TpButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50) TpButton.BackgroundTransparency = 0.3 TpButton.Text = "Teleport to ..." TpButton.Parent = frame -- create player list frame (hidden at first) local playerListFrame = Instance.new("Frame") playerListFrame.Size = UDim2.new(0, 180, 0, 200) playerListFrame.Position = UDim2.new(0.5, -90, 0.5, 60) playerListFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) playerListFrame.BackgroundTransparency = 0.2 playerListFrame.Visible = false playerListFrame.Parent = screenGui local uiListLayout = Instance.new("UIListLayout") uiListLayout.Parent = playerListFrame uiListLayout.SortOrder = Enum.SortOrder.LayoutOrder uiListLayout.Padding = UDim.new(0, 5) -- function to teleport to selected player local function teleportTo(player) if player and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then LocalPlayer.Character:MoveTo(player.Character.HumanoidRootPart.Position + Vector3.new(0, 3, 0)) end end -- show/hide the player list and update it local function togglePlayerList() playerListFrame.Visible = not playerListFrame.Visible if playerListFrame.Visible then -- Clear old buttons for _, child in pairs(playerListFrame:GetChildren()) do if child:IsA("TextButton") then child:Destroy() end end -- create a button for each player for _, player in pairs(Players:GetPlayers()) do if player ~= LocalPlayer then local btn = Instance.new("TextButton") btn.Size = UDim2.new(1, -10, 0, 30) btn.BackgroundColor3 = Color3.fromRGB(200, 50, 50) btn.BackgroundTransparency = 0.3 btn.TextColor3 = Color3.new(1, 1, 1) btn.Text = player.Name btn.Font = Enum.Font.SourceSansBold btn.TextScaled = true btn.Parent = playerListFrame btn.MouseButton1Click:Connect(function() teleportTo(player) playerListFrame.Visible = false end) end end end end -- connect toggle to the button TpButton.MouseButton1Click:Connect(togglePlayerList) -- create the item giver button local itemgive = Instance.new("TextButton") itemgive.Size = UDim2.new(0, 90, 0, 30) itemgive.Position = UDim2.new(0, 5, 0, 50) itemgive.BackgroundColor3 = Color3.fromRGB(200, 50, 50) itemgive.BackgroundTransparency = 0.3 itemgive.Text = "Give Item ID" itemgive.Parent = frame -- create the input box to enter Item ID local itemIDInput = Instance.new("TextBox") itemIDInput.Size = UDim2.new(0, 150, 0, 30) itemIDInput.Position = UDim2.new(0, 5, 0, 80) itemIDInput.BackgroundColor3 = Color3.fromRGB(255, 255, 255) itemIDInput.Text = "" itemIDInput.PlaceholderText = "Enter Item ID" itemIDInput.Parent = frame -- function to give item to player local function giveItemByID(itemID) local success, result = pcall(function() local asset = InsertService:LoadAsset(itemID) asset.Parent = LocalPlayer.Backpack end) if success then print("Item given successfully.") else warn("Failed to give item: " .. result) end end itemgive.MouseButton1Click:Connect(function() local itemID = itemIDInput.Text if itemID and itemID ~= "" then giveItemByID(tonumber(itemID)) -- Convert ID to number, assuming it's a valid item ID else warn("Invalid Item ID") end end)