Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local Player = Players.LocalPlayer
- local PlayerGui = Player:WaitForChild("PlayerGui")
- local UserInputService = game:GetService("UserInputService")
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "ProximityPromptSpyGui"
- screenGui.Parent = PlayerGui
- screenGui.ResetOnSpawn = false
- local frame = Instance.new("Frame")
- frame.Size = UDim2.new(0, 350, 0, 400)
- frame.Position = UDim2.new(0, 10, 0, 10)
- frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- frame.BorderSizePixel = 0
- frame.Parent = screenGui
- -- Top draggable bar
- local dragBar = Instance.new("Frame")
- dragBar.Size = UDim2.new(0, 150, 0, 30)
- dragBar.Position = UDim2.new(0, 0, 0, 0)
- dragBar.BackgroundColor3 = frame.BackgroundColor3 -- same as main frame
- dragBar.Parent = frame
- local dragLabel = Instance.new("TextLabel")
- dragLabel.Size = UDim2.new(1, 0, 1, 0)
- dragLabel.BackgroundTransparency = 1
- dragLabel.Text = "ProximityPrompt Spy By Sky!"
- dragLabel.TextColor3 = Color3.new(1,1,1)
- dragLabel.Font = Enum.Font.SourceSansBold
- dragLabel.TextScaled = true
- dragLabel.Parent = dragBar
- -- Close Button
- local closeButton = Instance.new("TextButton")
- closeButton.Text = "X"
- closeButton.Size = UDim2.new(0, 20, 0, 20)
- closeButton.Position = UDim2.new(1, -25, 0, 5)
- closeButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
- closeButton.TextColor3 = Color3.new(1, 1, 1)
- closeButton.Font = Enum.Font.SourceSansBold
- closeButton.TextScaled = true
- closeButton.Parent = frame
- closeButton.MouseButton1Click:Connect(function()
- screenGui:Destroy()
- end)
- -- Minimize Button
- local minimizeButton = Instance.new("TextButton")
- minimizeButton.Text = "-"
- minimizeButton.Size = UDim2.new(0, 20, 0, 20)
- minimizeButton.Position = UDim2.new(1, -55, 0, 5)
- minimizeButton.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
- minimizeButton.TextColor3 = Color3.new(1, 1, 1)
- minimizeButton.Font = Enum.Font.SourceSansBold
- minimizeButton.TextScaled = true
- minimizeButton.Parent = frame
- -- Scrolling Frame for ProximityPrompts
- local scrollingFrame = Instance.new("ScrollingFrame")
- scrollingFrame.Size = UDim2.new(1, 0, 1, -40)
- scrollingFrame.Position = UDim2.new(0, 0, 0, 35)
- scrollingFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
- scrollingFrame.ScrollBarThickness = 8
- scrollingFrame.BackgroundTransparency = 1
- scrollingFrame.Parent = frame
- local listLayout = Instance.new("UIListLayout")
- listLayout.Parent = scrollingFrame
- listLayout.SortOrder = Enum.SortOrder.LayoutOrder
- listLayout.Padding = UDim.new(0, 5)
- local function copyToClipboard(text)
- if UserInputService.SetClipboard then
- UserInputService:SetClipboard(text)
- end
- end
- local displayedPrompts = {}
- local function createPromptEntry(prompt)
- local container = Instance.new("Frame")
- container.Size = UDim2.new(1, -10, 0, 30)
- container.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- container.Parent = scrollingFrame
- local label = Instance.new("TextLabel")
- label.Size = UDim2.new(1, -40, 1, 0)
- label.BackgroundTransparency = 1
- label.TextColor3 = Color3.new(1, 1, 1)
- label.TextXAlignment = Enum.TextXAlignment.Left
- label.Text = "Prompt: " .. tostring(prompt.Parent:GetFullName())
- label.Font = Enum.Font.SourceSans
- label.TextScaled = false
- label.Parent = container
- local copyButton = Instance.new("TextButton")
- copyButton.Size = UDim2.new(0, 30, 1, 0)
- copyButton.Position = UDim2.new(1, -30, 0, 0)
- copyButton.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
- copyButton.TextColor3 = Color3.new(1, 1, 1)
- copyButton.Text = "📋"
- copyButton.Font = Enum.Font.SourceSansBold
- copyButton.TextScaled = true
- copyButton.Parent = container
- copyButton.MouseButton1Click:Connect(function()
- copyToClipboard(prompt.Parent:GetFullName())
- copyButton.Text = "✓"
- wait(1)
- copyButton.Text = "📋"
- end)
- return container
- end
- local function updatePrompts()
- for _, gui in pairs(displayedPrompts) do
- if gui and gui.Parent then
- gui:Destroy()
- end
- end
- displayedPrompts = {}
- local prompts = workspace:GetDescendants()
- for _, obj in pairs(prompts) do
- if obj:IsA("ProximityPrompt") then
- local entry = createPromptEntry(obj)
- displayedPrompts[obj] = entry
- obj.Triggered:Connect(function(player)
- if player == game.Players.LocalPlayer then
- obj:InputHoldBegin()
- obj:InputHoldEnd()
- end
- end)
- end
- end
- local count = #scrollingFrame:GetChildren() - 1
- scrollingFrame.CanvasSize = UDim2.new(0, 0, 0, count * 35)
- end
- updatePrompts()
- task.spawn(function()
- while screenGui.Parent do
- task.wait(2)
- updatePrompts()
- end
- end)
- -- Dragging logic for dragBar only
- local dragging = false
- local dragInput
- local dragStart
- local startPos
- local function updatePosition(input)
- local delta = input.Position - dragStart
- frame.Position = UDim2.new(
- frame.Position.X.Scale,
- math.clamp(startPos.X + delta.X, 0, workspace.CurrentCamera.ViewportSize.X - frame.AbsoluteSize.X),
- frame.Position.Y.Scale,
- math.clamp(startPos.Y + delta.Y, 0, workspace.CurrentCamera.ViewportSize.Y - frame.AbsoluteSize.Y)
- )
- end
- dragBar.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- dragging = true
- dragStart = input.Position
- startPos = frame.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- dragBar.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
- dragInput = input
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if input == dragInput and dragging then
- updatePosition(input)
- end
- end)
- local minimized = false
- minimizeButton.MouseButton1Click:Connect(function()
- minimized = not minimized
- if minimized then
- scrollingFrame.Visible = false
- frame.Size = UDim2.new(0, 350, 0, 40)
- else
- scrollingFrame.Visible = true
- frame.Size = UDim2.new(0, 350, 0, 400)
- end
- end)
Advertisement