โ† Back to all scripts

Toast Notification

Pop-up toast that slides in from the bottom and auto-dismisses.

GUIIntermediateLocalScript in StarterGui
toast-notification.lua
-- Toast Notification โ€” call showToast() from anywhere
local TweenService = game:GetService("TweenService")
local gui = script.Parent

local function showToast(message, duration)
    duration = duration or 2.5
    local screen = Instance.new("ScreenGui", gui.Parent)
    screen.ResetOnSpawn = false; screen.IgnoreGuiInset = true
    local frame = Instance.new("Frame", screen)
    frame.Size = UDim2.new(0,260,0,48); frame.AnchorPoint = Vector2.new(0.5,1)
    frame.Position = UDim2.new(0.5,0,0.92,60); frame.BackgroundColor3 = Color3.fromRGB(20,20,40)
    frame.BorderSizePixel = 0; Instance.new("UICorner",frame).CornerRadius = UDim.new(0,10)
    local label = Instance.new("TextLabel", frame)
    label.Size = UDim2.new(1,-20,1,0); label.Position = UDim2.new(0,10,0,0)
    label.BackgroundTransparency = 1; label.Text = message
    label.TextColor3 = Color3.new(1,1,1); label.TextSize = 14
    label.Font = Enum.Font.GothamMedium; label.TextXAlignment = Enum.TextXAlignment.Left
    local info = TweenInfo.new(0.3, Enum.EasingStyle.Quint)
    TweenService:Create(frame, info, {Position=UDim2.new(0.5,0,0.92,0)}):Play()
    task.wait(duration)
    local out = TweenService:Create(frame, info, {Position=UDim2.new(0.5,0,0.92,60)})
    out:Play(); out.Completed:Wait(); screen:Destroy()
end

showToast("โœ“ Item purchased!")
Related scripts in GUI
GUI Slide-in TweenBeginner โ†’Mobile Action ButtonBeginner โ†’
Something broken or not working?
๐Ÿ”ง Try the AI Script Fixer โ†’