Credit
A labelled row with a copy-to-clipboard button, for links, handles and credits.
A label on the left, a copy button on the right. Press it and the payload lands
on the clipboard — the tidy way to hand out a Discord invite, your username, or
a key, none of which can be selected out of a Roblox TextLabel.
My Script
v1.0
Made by
The script's author
Join the Discord
main:Credit({
Text = "Made by",
Description = "The script's author",
Copy = "bostonstrong567",
})
main:Credit({ Text = "Discord", Copy = "discord.gg/7ZCWaCswsF" })| Option | Type | Default | What it does |
|---|---|---|---|
Textreq | string | — | The label on the left. |
Copy | string | — | What is written to the clipboard. Falls back to Value, then to Text. |
Value | string | — | An alias for Copy. |
Icon | string | "copy" | The glyph on the button. |
ButtonText | string | "Copy" | The button's caption. |
Description | string | — | Small print under the label. |
Callback | function | — | Called with the payload after a copy is attempted. |
With neither Copy nor Value, the label itself is copied — so
main:Credit({ Text = "discord.gg/7ZCWaCswsF" }) already does the useful thing.
The button reports the outcome in its own caption rather than failing silently:
Copied on success, and No clipboard or Failed when the executor exposes no
clipboard function or the write is refused. It self-disables for a moment after
each press so a leaning finger cannot spam it.
Handle#
local credit = main:Credit({ Text = "Discord", Copy = "discord.gg/7ZCWaCswsF" })
credit:Get() -- the current payload
credit:Set("discord.gg/abc") -- change what a press will copy