Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local a = {}
- local TweenService = game:GetService("TweenService") local RunService = game:GetService("RunService") function a:now(name, text, img, time)
- local gui = Instance.new("ScreenGui")
- gui.Parent = game.CoreGui
- local frame = Instance.new("Frame")
- frame.BackgroundTransparency = 0.3
- frame.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- frame.Size = UDim2.new(0, 220, 0, 130)
- frame.AnchorPoint = Vector2.new(0, 1)
- frame.Position = UDim2.new(0, -250, 1, -20)
- frame.Parent = gui
- local uiCorner = Instance.new("UICorner")
- uiCorner.CornerRadius = UDim.new(0, 12)
- uiCorner.Parent = frame
- local uiStroke = Instance.new("UIStroke")
- uiStroke.Thickness = 2
- uiStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
- uiStroke.LineJoinMode = Enum.LineJoinMode.Round
- uiStroke.Parent = frame
- local nameLabel = Instance.new("TextLabel")
- nameLabel.Text = name
- nameLabel.Font = Enum.Font.GothamBold
- nameLabel.TextSize = 16
- nameLabel.TextColor3 = Color3.new(1, 1, 1)
- nameLabel.BackgroundTransparency = 1
- nameLabel.Position = UDim2.new(1, -110, 0, 10)
- nameLabel.Size = UDim2.new(0, 100, 0, 20)
- nameLabel.TextXAlignment = Enum.TextXAlignment.Right
- nameLabel.Parent = frame
- local textLabel = Instance.new("TextLabel")
- textLabel.Text = text
- textLabel.Font = Enum.Font.Gotham
- textLabel.TextSize = 14
- textLabel.TextColor3 = Color3.new(1, 1, 1) textLabel.BackgroundTransparency = 1
- textLabel.Position = UDim2.new(0, 15, 0, 35)
- textLabel.Size = UDim2.new(1, -30, 0, 50)
- textLabel.TextWrapped = true
- textLabel.TextXAlignment = Enum.TextXAlignment.Left
- textLabel.TextYAlignment = Enum.TextYAlignment.Top
- textLabel.Parent = frame
- local imageContainer
- if img ~= "" then
- imageContainer = Instance.new("Frame")
- imageContainer.Size = UDim2.new(0, 60, 0, 60)
- imageContainer.Position = UDim2.new(0, 15, 1, -65)
- imageContainer.BackgroundTransparency = 1
- imageContainer.Parent = frame
- local imageLabel = Instance.new("ImageLabel")
- imageLabel.Image = img
- imageLabel.Size = UDim2.new(1, -8, 1, -8)
- imageLabel.Position = UDim2.new(0.5, 0, 0.5, 0)
- imageLabel.AnchorPoint = Vector2.new(0.5, 0.5)
- imageLabel.BackgroundTransparency = 1
- imageLabel.Parent = imageContainer
- local imageCorner = Instance.new("UICorner")
- imageCorner.CornerRadius = UDim.new(0, 8)
- imageCorner.Parent = imageLabel
- local imageStroke = Instance.new("UIStroke")
- imageStroke.Thickness = 1
- imageStroke.Color = Color3.new(0, 0, 0)
- imageStroke.Parent = imageLabel
- end
- local tween = TweenService:Create(frame, TweenInfo.new(
- time,
- Enum.EasingStyle.Quint,
- Enum.EasingDirection.Out
- ), {
- Position = UDim2.new(0, 20, 1, -20)
- })
- tween:Play()
- local hue = 0
- local connection
- connection = RunService.Heartbeat:Connect(function(deltaTime)
- hue = (hue + deltaTime * 0.6) % 1
- uiStroke.Color = Color3.fromHSV(hue, 0.8, 1)
- end)
- tween.Completed:Connect(function()
- connection:Disconnect()
- if imageContainer then
- imageContainer.Visible = false
- end
- local fadeTween = TweenService:Create(frame, TweenInfo.new(0.2), {
- BackgroundTransparency = 1
- })
- local strokeTween = TweenService:Create(uiStroke, TweenInfo.new(0.2), {
- Transparency = 1
- })
- local shrinkTween = TweenService:Create(frame, TweenInfo.new(0.3, Enum.EasingStyle.Quad), {
- Size = UDim2.new(0, 0, 0, 0),
- Position = UDim2.new(0, frame.AbsolutePosition.X, 1, -20)
- })
- fadeTween:Play()
- strokeTween:Play()
- shrinkTween:Play()
- task.wait(0.3)
- gui:Destroy()
- end)
- end
- return a
- --[[
- 示例:
- a = loadstring(game:HttpGet("https://pastebin.com/raw/bUgHf3iT"))()
- a:now(" 通知 ", " 示例通知!.", "http://www.roblox.com/asset/?id=1764960410", 3)
- --]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement