local lp = game:GetService("Players").LocalPlayer
local gui = Instance.new("ScreenGui")
gui.Name = "dsc_popup"
gui.ResetOnSpawn = false
if not pcall(function() gui.Parent = game:GetService("CoreGui") end) then
gui.Parent = lp:WaitForChild("PlayerGui")
end
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 300, 0, 150)
frame.Position = UDim2.new(0.5, 0, 0.5, 0)
frame.AnchorPoint = Vector2.new(0.5, 0.5)
frame.BackgroundColor3 = Color3.fromRGB(15, 15, 15)
frame.BorderSizePixel = 0
frame.Parent = gui
local c = Instance.new("UICorner")
c.CornerRadius = UDim.new(0, 12)
c.Parent = frame
local btn = Instance.new("TextButton")
btn.Size = UDim2.new(0, 240, 0, 50)
btn.Position = UDim2.new(0.5, 0, 0.5, 0)
btn.AnchorPoint = Vector2.new(0.5, 0.5)
btn.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
btn.Text = "click this for the discord"
btn.TextColor3 = Color3.fromRGB(0, 0, 0)
btn.Font = Enum.Font.GothamBold
btn.TextSize = 16
btn.Parent = frame
local c2 = Instance.new("UICorner")
c2.CornerRadius = UDim.new(0, 8)
c2.Parent = btn
local link = "https://discord.gg/hsB4Wtsbj"
btn.MouseButton1Click:Connect(function()
if setclipboard then
setclipboard(link)
btn.Text = "Copied!"
btn.BackgroundColor3 = Color3.fromRGB(180, 180, 180)
task.wait(2)
btn.Text = "click this for the discord"
btn.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
else
local tb = Instance.new("TextBox")
tb.Size = btn.Size
tb.Position = btn.Position
tb.AnchorPoint = btn.AnchorPoint
tb.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
tb.TextColor3 = Color3.fromRGB(255, 255, 255)
tb.Font = Enum.Font.Gotham
tb.TextSize = 14
tb.Text = link
tb.ClearTextOnFocus = false
tb.TextEditable = false
tb.Parent = frame
local c3 = Instance.new("UICorner")
c3.CornerRadius = UDim.new(0, 8)
c3.Parent = tb
btn.Visible = false
tb:CaptureFocus()
tb.SelectionStart = 1
tb.CursorPosition = #link + 1
end
end)
Comments
No comments yet
Be the first to share your thoughts!