Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local CoreGui = game:GetService("CoreGui")
- local StarterGui = game:GetService("StarterGui")
- local player = game.Players.LocalPlayer
- -- Function to create the core notification
- local function createCoreNotification()
- local Notification = Instance.new("ScreenGui")
- Notification.Name = "NotificationGui"
- Notification.Parent = CoreGui
- local Frame = Instance.new("Frame")
- Frame.Size = UDim2.new(0, 300, 0, 150)
- Frame.Position = UDim2.new(0.5, -150, 0.5, -75)
- Frame.BackgroundColor3 = Color3.fromRGB(34, 34, 34)
- Frame.Parent = Notification
- local Title = Instance.new("TextLabel")
- Title.Size = UDim2.new(1, 0, 0, 40)
- Title.BackgroundTransparency = 1
- Title.Text = "Are You Sure?"
- Title.TextColor3 = Color3.fromRGB(255, 255, 255)
- Title.TextSize = 24
- Title.TextAlign = Enum.TextXAlignment.Center
- Title.Parent = Frame
- local Message = Instance.new("TextLabel")
- Message.Size = UDim2.new(1, 0, 0, 60)
- Message.Position = UDim2.new(0, 0, 0, 40)
- Message.BackgroundTransparency = 1
- Message.Text = "Are you sure to remove the GUI?"
- Message.TextColor3 = Color3.fromRGB(255, 255, 255)
- Message.TextSize = 18
- Message.TextAlign = Enum.TextXAlignment.Center
- Message.Parent = Frame
- local YesButton = Instance.new("TextButton")
- YesButton.Size = UDim2.new(0.45, 0, 0, 40)
- YesButton.Position = UDim2.new(0.05, 0, 0.75, 0)
- YesButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
- YesButton.Text = "Yes"
- YesButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- YesButton.TextSize = 18
- YesButton.Parent = Frame
- local NoButton = Instance.new("TextButton")
- NoButton.Size = UDim2.new(0.45, 0, 0, 40)
- NoButton.Position = UDim2.new(0.5, 0, 0.75, 0)
- NoButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
- NoButton.Text = "No"
- NoButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- NoButton.TextSize = 18
- NoButton.Parent = Frame
- -- Yes button functionality
- YesButton.MouseButton1Click:Connect(function()
- Rayfield:Destroy()
- Notification:Destroy() -- Closes the notification
- end)
- -- No button functionality
- NoButton.MouseButton1Click:Connect(function()
- Notification:Destroy() -- Closes the notification
- end)
- end
- -- Call the function to display the notification
- createCoreNotification()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement