Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Avatar = script.Parent
- -- existing code here...
- -- create a new frame for the buttons
- local buttonFrame = Instance.new("Frame")
- buttonFrame.Parent = Avatar
- buttonFrame.BackgroundTransparency = 1
- buttonFrame.Size = UDim2.new(1, 0, 0, 50)
- -- create a button for loading an avatar from a user ID
- local loadFromUserIdButton = Instance.new("TextButton")
- loadFromUserIdButton.Parent = buttonFrame
- loadFromUserIdButton.Text = "Load Avatar from User ID"
- loadFromUserIdButton.Size = UDim2.new(1, 0, 1, 0)
- loadFromUserIdButton.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
- loadFromUserIdButton.Font = Enum.Font.Arial
- loadFromUserIdButton.TextSize = 14
- -- create a button for loading an avatar from a username
- local loadFromUsernameButton = Instance.new("TextButton")
- loadFromUsernameButton.Parent = buttonFrame
- loadFromUsernameButton.Text = "Load Avatar from Username"
- loadFromUsernameButton.Size = UDim2.new(1, 0, 1, 0)
- loadFromUsernameButton.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
- loadFromUsernameButton.Font = Enum.Font.Arial
- loadFromUsernameButton.TextSize = 14
- -- create a label for the avatar clipboard
- local clipboardLabel = Instance.new("TextLabel")
- clipboardLabel.Parent = buttonFrame
- clipboardLabel.Text = "Avatar Clipboard"
- clipboardLabel.Size = UDim2.new(1, 0, 0, 30)
- clipboardLabel.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
- clipboardLabel.Font = Enum.Font.Arial
- clipboardLabel.TextSize = 14
- -- create a button for copying the current avatar to the clipboard
- local copyToClipboardButton = Instance.new("TextButton")
- copyToClipboardButton.Parent = buttonFrame
- copyToClipboardButton.Text = "Copy Current Avatar"
- copyToClipboardButton.Size = UDim2.new(1, 0, 1, 0)
- copyToClipboardButton.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
- copyToClipboardButton.Font = Enum.Font.Arial
- copyToClipboardButton.TextSize = 14
- -- create a button for loading an avatar from the clipboard
- local loadFromClipboardButton = Instance.new("TextButton")
- loadFromClipboardButton.Parent = buttonFrame
- loadFromClipboardButton.Text = "Load Avatar from Clipboard"
- loadFromClipboardButton.Size = UDim2.new(1, 0, 1, 0)
- loadFromClipboardButton.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
- loadFromClipboardButton.Font = Enum.Font.Arial
- loadFromClipboardButton.TextSize = 14
- -- attach functions to the buttons
- loadFromUserIdButton.MouseButton1Click:Connect(function()
- Avatar:AddTextBox("Load Avatar From UserId",function(userid)
- if userid and tonumber(userid) and Players:GetHumanoidDescriptionFromUserId(tonumber(userid)) then
- local data = ExtractData(Players:GetHumanoidDescriptionFromUserId(tonumber(userid)))
- ConnectionEvent:FireServer(315,data,true)
- end
- end)
- end)
- loadFromUsernameButton.MouseButton1Click
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement