Advertisement
ILovePotato

Untitled

Jan 25th, 2025
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. local CoreGui = game:GetService("CoreGui")
  2. local StarterGui = game:GetService("StarterGui")
  3. local player = game.Players.LocalPlayer
  4.  
  5. -- Function to create the core notification
  6. local function createCoreNotification()
  7. local Notification = Instance.new("ScreenGui")
  8. Notification.Name = "NotificationGui"
  9. Notification.Parent = CoreGui
  10.  
  11. local Frame = Instance.new("Frame")
  12. Frame.Size = UDim2.new(0, 300, 0, 150)
  13. Frame.Position = UDim2.new(0.5, -150, 0.5, -75)
  14. Frame.BackgroundColor3 = Color3.fromRGB(34, 34, 34)
  15. Frame.Parent = Notification
  16.  
  17. local Title = Instance.new("TextLabel")
  18. Title.Size = UDim2.new(1, 0, 0, 40)
  19. Title.BackgroundTransparency = 1
  20. Title.Text = "Are You Sure?"
  21. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  22. Title.TextSize = 24
  23. Title.TextAlign = Enum.TextXAlignment.Center
  24. Title.Parent = Frame
  25.  
  26. local Message = Instance.new("TextLabel")
  27. Message.Size = UDim2.new(1, 0, 0, 60)
  28. Message.Position = UDim2.new(0, 0, 0, 40)
  29. Message.BackgroundTransparency = 1
  30. Message.Text = "Are you sure to remove the GUI?"
  31. Message.TextColor3 = Color3.fromRGB(255, 255, 255)
  32. Message.TextSize = 18
  33. Message.TextAlign = Enum.TextXAlignment.Center
  34. Message.Parent = Frame
  35.  
  36. local YesButton = Instance.new("TextButton")
  37. YesButton.Size = UDim2.new(0.45, 0, 0, 40)
  38. YesButton.Position = UDim2.new(0.05, 0, 0.75, 0)
  39. YesButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
  40. YesButton.Text = "Yes"
  41. YesButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  42. YesButton.TextSize = 18
  43. YesButton.Parent = Frame
  44.  
  45. local NoButton = Instance.new("TextButton")
  46. NoButton.Size = UDim2.new(0.45, 0, 0, 40)
  47. NoButton.Position = UDim2.new(0.5, 0, 0.75, 0)
  48. NoButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  49. NoButton.Text = "No"
  50. NoButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  51. NoButton.TextSize = 18
  52. NoButton.Parent = Frame
  53.  
  54. -- Yes button functionality
  55. YesButton.MouseButton1Click:Connect(function()
  56. Rayfield:Destroy()
  57. Notification:Destroy() -- Closes the notification
  58. end)
  59.  
  60. -- No button functionality
  61. NoButton.MouseButton1Click:Connect(function()
  62. Notification:Destroy() -- Closes the notification
  63. end)
  64. end
  65.  
  66. -- Call the function to display the notification
  67. createCoreNotification()
  68.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement