The ones you are talking about most likely use a custom view over a transparent background, with some custom objects and animations thrown in there for good measure. Since you are a noob and all 😉, there is a little bit easier way to make a simple dialog that avoids having to create the rounded corner background and code the animations and all.
In your AppDelegate or controller script, add an outlet for the alert window:
property alertWindow : missing value
Add an action handler for the button:
on showAlert_(sender)
-- add additional setups or animations as desired
alertWindow's orderFront_(me)
performSelector_withObject_afterDelay_("hideAlert", me, 5) -- close after delay
end showAlert_
And add another handler to hide the window:
on hideAlert()
-- add additional setups or animations as desired
alertWindow's orderOut_(me)
end hideAlert
In the Interface Editor, create another window for your dialog (I use a regular window, since the panels are a bit too dark) and connect the window (not the view) to your alert outlet using the Connections Inspector or equivalent shortcut. Uncheck the "Visible at Launch" option, and make the window animation "Inspector Panel Style" to slow down the (dis)appear time a bit.
Add labels for your alert text (make the text white) and whatever other items and positioning you want. Add/connect whichever button you are wanting to use in your main application window to your action handler, and you are just about ready to go.
You will need to do some additional setup for the alert window to make it gray and partly transparent, so somewhere such as in the AppDelegate's applicationWillFinishLaunching_ handler add the following:
alertWindow's setOpaque_(false)
alertWindow's setBackgroundColor_(current application's NSColor's colorWithCalibratedWhite_alpha_(0.0, 0.5))
In that last statement, the first number sets the grayscale, and the second is the opacity - tweak as desired.
Good Luck!