Advertisement
BlackSonScripts

Untitled

May 27th, 2024 (edited)
450
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.75 KB | None | 0 0
  1. local Avatar = script.Parent
  2.  
  3. -- existing code here...
  4.  
  5. -- create a new frame for the buttons
  6. local buttonFrame = Instance.new("Frame")
  7. buttonFrame.Parent = Avatar
  8. buttonFrame.BackgroundTransparency = 1
  9. buttonFrame.Size = UDim2.new(1, 0, 0, 50)
  10.  
  11. -- create a button for loading an avatar from a user ID
  12. local loadFromUserIdButton = Instance.new("TextButton")
  13. loadFromUserIdButton.Parent = buttonFrame
  14. loadFromUserIdButton.Text = "Load Avatar from User ID"
  15. loadFromUserIdButton.Size = UDim2.new(1, 0, 1, 0)
  16. loadFromUserIdButton.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
  17. loadFromUserIdButton.Font = Enum.Font.Arial
  18. loadFromUserIdButton.TextSize = 14
  19.  
  20. -- create a button for loading an avatar from a username
  21. local loadFromUsernameButton = Instance.new("TextButton")
  22. loadFromUsernameButton.Parent = buttonFrame
  23. loadFromUsernameButton.Text = "Load Avatar from Username"
  24. loadFromUsernameButton.Size = UDim2.new(1, 0, 1, 0)
  25. loadFromUsernameButton.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
  26. loadFromUsernameButton.Font = Enum.Font.Arial
  27. loadFromUsernameButton.TextSize = 14
  28.  
  29. -- create a label for the avatar clipboard
  30. local clipboardLabel = Instance.new("TextLabel")
  31. clipboardLabel.Parent = buttonFrame
  32. clipboardLabel.Text = "Avatar Clipboard"
  33. clipboardLabel.Size = UDim2.new(1, 0, 0, 30)
  34. clipboardLabel.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
  35. clipboardLabel.Font = Enum.Font.Arial
  36. clipboardLabel.TextSize = 14
  37.  
  38. -- create a button for copying the current avatar to the clipboard
  39. local copyToClipboardButton = Instance.new("TextButton")
  40. copyToClipboardButton.Parent = buttonFrame
  41. copyToClipboardButton.Text = "Copy Current Avatar"
  42. copyToClipboardButton.Size = UDim2.new(1, 0, 1, 0)
  43. copyToClipboardButton.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
  44. copyToClipboardButton.Font = Enum.Font.Arial
  45. copyToClipboardButton.TextSize = 14
  46.  
  47. -- create a button for loading an avatar from the clipboard
  48. local loadFromClipboardButton = Instance.new("TextButton")
  49. loadFromClipboardButton.Parent = buttonFrame
  50. loadFromClipboardButton.Text = "Load Avatar from Clipboard"
  51. loadFromClipboardButton.Size = UDim2.new(1, 0, 1, 0)
  52. loadFromClipboardButton.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
  53. loadFromClipboardButton.Font = Enum.Font.Arial
  54. loadFromClipboardButton.TextSize = 14
  55.  
  56. -- attach functions to the buttons
  57. loadFromUserIdButton.MouseButton1Click:Connect(function()
  58.     Avatar:AddTextBox("Load Avatar From UserId",function(userid)
  59.         if userid and tonumber(userid) and Players:GetHumanoidDescriptionFromUserId(tonumber(userid)) then
  60.             local data = ExtractData(Players:GetHumanoidDescriptionFromUserId(tonumber(userid)))
  61.             ConnectionEvent:FireServer(315,data,true)
  62.         end
  63.     end)
  64. end)
  65.  
  66. loadFromUsernameButton.MouseButton1Click
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement