RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a tool gui that can open when you press q"
-- local script (StarterGUI) local player = game.Players.LocalPlayer local screenGui = Instance.new("ScreenGui", player.PlayerGui) local toolGui = Instance.new("Frame", screenGui) toolGui.BackgroundColor3 = Color3.fromRGB(0, 0, 0) toolGui.Size = UDim2.new(0, 200, 0, 100) toolGui.Position = UDim2.new(0.5, -100, 0.5, -50) toolGui.Visible = false local toolList = Instance.new("ScrollingFrame", toolGui) toolList.Size = UDim2.new(1, 0, 1, 0) toolList.CanvasSize = UDim2.new(0, 0, 0, 0) local function updateToolList() local yOffset = 0 for _, tool in ipairs(player.Backpack:GetChildren()) do if tool:IsA("Tool") then local toolLabel = Instance.new("TextLabel", toolList) toolLabel.Text = tool.Name toolLabel.Size = UDim2.new(1, 0, 0, 20) toolLabel.Position = UDim2.new(0, 0, 0, yOffset) toolLabel.TextColor3 = Color3.fromRGB(255, 255, 255) toolLabel.BackgroundColor3 = Color3.fromRGB(0, 0, 0) yOffset = yOffset + 20 end end toolList.CanvasSize = UDim2.new(0, 0, 0, yOffset) end local function onKeyPress(inputObject, gameProcessedEvent) if inputObject.KeyCode == Enum.KeyCode.Q and not gameProcessedEvent then toolGui.Visible = not toolGui.Visible if toolGui.Visible then updateToolList() end end end player:GetMouse().KeyDown:Connect(onKeyPress)