C00lkidd27

Hat Adder

Oct 19th, 2024
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. -- Hat Ekleme GUI Script
  2.  
  3. -- GUI ayarları
  4. local ScreenGui = Instance.new("ScreenGui")
  5. local MainFrame = Instance.new("Frame")
  6. local TitleLabel = Instance.new("TextLabel")
  7. local HatIDInput = Instance.new("TextBox")
  8. local AddHatButton = Instance.new("TextButton")
  9. local CloseButton = Instance.new("TextButton")
  10.  
  11. -- GUI bileşenlerini ayarla
  12. ScreenGui.Parent = game.CoreGui
  13.  
  14. MainFrame.Parent = ScreenGui
  15. MainFrame.Size = UDim2.new(0, 300, 0, 200)
  16. MainFrame.Position = UDim2.new(0.5, -150, 0.5, -100)
  17. MainFrame.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
  18.  
  19. TitleLabel.Parent = MainFrame
  20. TitleLabel.Size = UDim2.new(1, 0, 0, 50)
  21. TitleLabel.Text = "Aksesuar Ekle"
  22. TitleLabel.TextColor3 = Color3.new(1, 1, 1)
  23. TitleLabel.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  24.  
  25. HatIDInput.Parent = MainFrame
  26. HatIDInput.Size = UDim2.new(1, -20, 0, 50)
  27. HatIDInput.Position = UDim2.new(0, 10, 0.3, 0)
  28. HatIDInput.PlaceholderText = "Aksesuar ID'sini girin"
  29. HatIDInput.BackgroundColor3 = Color3.new(0.3, 0.3, 0.3)
  30.  
  31. AddHatButton.Parent = MainFrame
  32. AddHatButton.Size = UDim2.new(0, 250, 0, 50)
  33. AddHatButton.Position = UDim2.new(0.5, -125, 0.5, 0)
  34. AddHatButton.Text = "Aksesuarı Ekle"
  35. AddHatButton.BackgroundColor3 = Color3.new(0.3, 0.5, 0.3)
  36.  
  37. CloseButton.Parent = MainFrame
  38. CloseButton.Size = UDim2.new(0, 100, 0, 50)
  39. CloseButton.Position = UDim2.new(0.5, -50, 0.8, 0)
  40. CloseButton.Text = "Kapat"
  41. CloseButton.BackgroundColor3 = Color3.new(1, 0.2, 0.2)
  42.  
  43. -- Aksesuar ekleme fonksiyonu
  44. AddHatButton.MouseButton1Click:Connect(function()
  45. local player = game.Players.LocalPlayer
  46. local hatID = HatIDInput.Text
  47.  
  48. -- Hata kontrolü
  49. if hatID == "" then
  50. print("Lütfen bir aksesuar ID'si girin.")
  51. return
  52. end
  53.  
  54. -- Aksesuarı ekle
  55. local accessory = Instance.new("Accessory")
  56. local hat = Instance.new("MeshPart")
  57.  
  58. -- Aksesuarın özelliklerini ayarla
  59. hat.Name = "Hat"
  60. hat.MeshId = "rbxassetid://" .. hatID
  61. hat.Parent = accessory
  62. accessory.Parent = player.Character
  63.  
  64. -- Aksesuarı karakterin başına ekle
  65. accessory.AttachmentPoint = CFrame.new(0, 0, 0)
  66. accessory.Handle.CFrame = player.Character.Head.CFrame
  67.  
  68. print("Aksesuar eklendi: " .. hatID)
  69. end)
  70.  
  71. -- Kapatma fonksiyonu
  72. CloseButton.MouseButton1Click:Connect(function()
  73. ScreenGui:Destroy()
  74. end)
  75.  
Advertisement
Add Comment
Please, Sign In to add comment