Kavo

📅 2024-12-13T16:54:46.840Z
👁️ 19 katselukertaa
🔓 Julkinen


local KavoNotification = {}

local textColor = Color3.fromRGB(255,0,0)
local backgroundColor = Color3.fromRGB(10,10,10)

function KavoNotification:Send(NotificationText,NotificationTime)
	
    -- Elements
	
    local NotificationGui = Instance.new("ScreenGui")
    local Notification = Instance.new("Frame")
    local UICorner = Instance.new("UICorner")
    local TextLabel = Instance.new("TextLabel")
    local Closenotification = Instance.new("TextButton")
    
    NotificationGui.Name = "Not"
    NotificationGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
    NotificationGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
    
    Notification.Name = "Notification"
    Notification.Parent = NotificationGui
    Notification.BackgroundColor3 = backgroundColor
    Notification.Position = UDim2.new(1,0,1,-60)
    Notification.Size = UDim2.new(0, 400, 0, 50)
    
    UICorner.CornerRadius = UDim.new(0, 4)
    UICorner.Parent = Notification
    
    TextLabel.Parent = Notification
    TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
    TextLabel.BackgroundTransparency = 1.000
    TextLabel.Position = UDim2.new(0.025, 0, 0, 0)
    TextLabel.Size = UDim2.new(0, 375, 0, 50)
    TextLabel.Font = Enum.Font.Gotham
    TextLabel.Text = NotificationText
    TextLabel.TextColor3 = textColor
    TextLabel.TextSize = 18.000
    TextLabel.TextWrapped = true
    TextLabel.TextXAlignment = Enum.TextXAlignment.Left
    
    -- Notification animation
	
    TextLabel.Text = NotificationText
    Notification:TweenPosition(UDim2.new(1,-410,1,-60),"Out","Linear",0.25)
    wait(NotificationTime)
    Notification:TweenPosition(UDim2.new(1,0,1,-60),"Out","Linear",0.25)
end

return KavoNotification