Advertisement
Elvisfofo_rblx

Name Changer gui

Jun 22nd, 2025
498
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.04 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local player = Players.LocalPlayer
  3. local character = player.Character or player.CharacterAdded:Wait()
  4.  
  5. -- Destroy old UI if it exists
  6. if player:FindFirstChild("PlayerGui"):FindFirstChild("NameChangerUI") then
  7. player.PlayerGui:FindFirstChild("NameChangerUI"):Destroy()
  8. end
  9.  
  10. -- GUI Setup
  11. local screenGui = Instance.new("ScreenGui")
  12. screenGui.Name = "NameChangerUI"
  13. screenGui.ResetOnSpawn = false
  14. screenGui.Parent = player:WaitForChild("PlayerGui")
  15.  
  16. local frame = Instance.new("Frame")
  17. frame.Name = "MainFrame"
  18. frame.Size = UDim2.new(0, 270, 0, 130)
  19. frame.Position = UDim2.new(0.5, -135, 0.4, 0)
  20. frame.BackgroundColor3 = Color3.fromRGB(25, 25, 35)
  21. frame.BackgroundTransparency = 0.1
  22. frame.BorderSizePixel = 0
  23. frame.Active = true
  24. frame.Draggable = true
  25. frame.Parent = screenGui
  26.  
  27. -- Rounded futuristic frame corners
  28. local corner = Instance.new("UICorner")
  29. corner.CornerRadius = UDim.new(0, 16)
  30. corner.Parent = frame
  31.  
  32. -- Glow effect (optional)
  33. local glow = Instance.new("UIStroke")
  34. glow.Thickness = 2
  35. glow.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  36. glow.Color = Color3.fromRGB(60, 160, 255)
  37. glow.Transparency = 0.2
  38. glow.Parent = frame
  39.  
  40. -- TextBox input
  41. local textBox = Instance.new("TextBox")
  42. textBox.PlaceholderText = "Enter new name"
  43. textBox.Text = ""
  44. textBox.Size = UDim2.new(0.85, 0, 0, 36)
  45. textBox.Position = UDim2.new(0.075, 0, 0.2, 0)
  46. textBox.BackgroundColor3 = Color3.fromRGB(35, 35, 55)
  47. textBox.TextColor3 = Color3.new(1, 1, 1)
  48. textBox.Font = Enum.Font.FredokaOne
  49. textBox.TextScaled = true
  50. textBox.ClearTextOnFocus = false
  51. textBox.Parent = frame
  52.  
  53. local boxCorner = Instance.new("UICorner")
  54. boxCorner.CornerRadius = UDim.new(0, 10)
  55. boxCorner.Parent = textBox
  56.  
  57. -- Button
  58. local button = Instance.new("TextButton")
  59. button.Text = "Change Name"
  60. button.Size = UDim2.new(0.85, 0, 0, 36)
  61. button.Position = UDim2.new(0.075, 0, 0.63, 0)
  62. button.BackgroundColor3 = Color3.fromRGB(0, 136, 255)
  63. button.TextColor3 = Color3.new(1, 1, 1)
  64. button.Font = Enum.Font.FredokaOne
  65. button.TextScaled = true
  66. button.Parent = frame
  67.  
  68. local btnCorner = Instance.new("UICorner")
  69. btnCorner.CornerRadius = UDim.new(0, 10)
  70. btnCorner.Parent = button
  71.  
  72. -- Button function
  73. button.MouseButton1Click:Connect(function()
  74. local newName = textBox.Text
  75. if newName ~= "" and character then
  76. local head = character:FindFirstChild("Head")
  77. if head then
  78. local overhead = head:FindFirstChild("Overhead") or Instance.new("BillboardGui", head)
  79. overhead.Name = "Overhead"
  80. overhead.Adornee = head
  81. overhead.Size = UDim2.new(0, 200, 0, 50)
  82. overhead.StudsOffset = Vector3.new(0, 2.5, 0)
  83. overhead.AlwaysOnTop = true
  84.  
  85. local label = overhead:FindFirstChild("CustomName") or Instance.new("TextLabel", overhead)
  86. label.Name = "CustomName"
  87. label.Size = UDim2.new(1, 0, 1, 0)
  88. label.BackgroundTransparency = 1
  89. label.TextColor3 = Color3.fromRGB(255, 255, 255)
  90. label.TextStrokeTransparency = 0.2
  91. label.Text = newName
  92. label.TextScaled = true
  93. label.Font = Enum.Font.FredokaOne
  94. end
  95. end
  96. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement