Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Hat Ekleme GUI Script
- -- GUI ayarları
- local ScreenGui = Instance.new("ScreenGui")
- local MainFrame = Instance.new("Frame")
- local TitleLabel = Instance.new("TextLabel")
- local HatIDInput = Instance.new("TextBox")
- local AddHatButton = Instance.new("TextButton")
- local CloseButton = Instance.new("TextButton")
- -- GUI bileşenlerini ayarla
- ScreenGui.Parent = game.CoreGui
- MainFrame.Parent = ScreenGui
- MainFrame.Size = UDim2.new(0, 300, 0, 200)
- MainFrame.Position = UDim2.new(0.5, -150, 0.5, -100)
- MainFrame.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
- TitleLabel.Parent = MainFrame
- TitleLabel.Size = UDim2.new(1, 0, 0, 50)
- TitleLabel.Text = "Aksesuar Ekle"
- TitleLabel.TextColor3 = Color3.new(1, 1, 1)
- TitleLabel.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- HatIDInput.Parent = MainFrame
- HatIDInput.Size = UDim2.new(1, -20, 0, 50)
- HatIDInput.Position = UDim2.new(0, 10, 0.3, 0)
- HatIDInput.PlaceholderText = "Aksesuar ID'sini girin"
- HatIDInput.BackgroundColor3 = Color3.new(0.3, 0.3, 0.3)
- AddHatButton.Parent = MainFrame
- AddHatButton.Size = UDim2.new(0, 250, 0, 50)
- AddHatButton.Position = UDim2.new(0.5, -125, 0.5, 0)
- AddHatButton.Text = "Aksesuarı Ekle"
- AddHatButton.BackgroundColor3 = Color3.new(0.3, 0.5, 0.3)
- CloseButton.Parent = MainFrame
- CloseButton.Size = UDim2.new(0, 100, 0, 50)
- CloseButton.Position = UDim2.new(0.5, -50, 0.8, 0)
- CloseButton.Text = "Kapat"
- CloseButton.BackgroundColor3 = Color3.new(1, 0.2, 0.2)
- -- Aksesuar ekleme fonksiyonu
- AddHatButton.MouseButton1Click:Connect(function()
- local player = game.Players.LocalPlayer
- local hatID = HatIDInput.Text
- -- Hata kontrolü
- if hatID == "" then
- print("Lütfen bir aksesuar ID'si girin.")
- return
- end
- -- Aksesuarı ekle
- local accessory = Instance.new("Accessory")
- local hat = Instance.new("MeshPart")
- -- Aksesuarın özelliklerini ayarla
- hat.Name = "Hat"
- hat.MeshId = "rbxassetid://" .. hatID
- hat.Parent = accessory
- accessory.Parent = player.Character
- -- Aksesuarı karakterin başına ekle
- accessory.AttachmentPoint = CFrame.new(0, 0, 0)
- accessory.Handle.CFrame = player.Character.Head.CFrame
- print("Aksesuar eklendi: " .. hatID)
- end)
- -- Kapatma fonksiyonu
- CloseButton.MouseButton1Click:Connect(function()
- ScreenGui:Destroy()
- end)
Advertisement
Add Comment
Please, Sign In to add comment