Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- made by _Exec4tle_#2226 as a FE Scripting Utility!
- you can execute loadstring just once
- loadstring(game:HttpGet("http://pastebin.com/raw/nfVbXZ6D", true))()
- example of usage:
- notify("Hello, this is a testing notification!", 10, 17)
- notify( "string", duration, fontsize )
- made not for long messages and not recommended to set high values on duration
- ]]--
- --variables
- local starterGui = game:GetService("StarterGui")
- local pl = game.Players.LocalPlayer
- local ts = game:GetService("TweenService")
- _G.start = true
- --main function
- getgenv().notify = function(message, duration, fontSize)
- task.spawn(function()
- message = message or ""
- duration = duration or 2
- fontSize = fontSize or 16
- local layoutGrid = Instance.new("UIListLayout")
- local screenGui = Instance.new("ScreenGui")
- local container = Instance.new("Frame")
- if pl:WaitForChild("PlayerGui"):FindFirstChild("NotificationGui") then
- --print("Notif Gui alr maden.\n"
- --,"Re-Creating...\n"
- -- )
- --pl.PlayerGui.NotificationGui:Destroy()
- else ------------
- screenGui.ResetOnSpawn = false
- screenGui.Name = "NotificationGui"
- screenGui.Parent = pl:FindFirstChild("PlayerGui")
- container.Name = "Container"
- container.Parent = screenGui
- container.Position = UDim2.new(0.775,0, 0,0)
- container.Size = UDim2.new(0,350, 1,0)
- container.Transparency = 1
- layoutGrid.Name = "Grid"
- layoutGrid.Parent = container
- layoutGrid.Padding = UDim.new(0.01,0)
- layoutGrid.HorizontalAlignment = "Right"
- layoutGrid.SortOrder = "LayoutOrder"
- end
- local textLabel = Instance.new("TextLabel")
- textLabel.Size = UDim2.new(1, 0, 0.1, 0)
- textLabel.Position = UDim2.new(1, 0, 0, 0)
- textLabel.BackgroundTransparency = 1.0
- textLabel.Transparency = 1.0
- textLabel.BackgroundColor3 = Color3.new(0.08, 0, 0.2)
- textLabel.TextColor3 = Color3.new(1, 1, 1)
- textLabel.Font = Enum.Font.Ubuntu
- textLabel.TextSize = fontSize
- textLabel.TextWrapped = true
- textLabel.Text = message
- textLabel.Parent = pl.PlayerGui.NotificationGui.Container
- textLabel.BorderSizePixel = 0.0
- textLabel.BorderColor3 = Color3.fromRGB(0, 255, 255)
- textLabel.BorderMode = "Inset"
- local durFrame = Instance.new("Frame")
- durFrame.Parent = textLabel
- durFrame.Position = UDim2.new(0.0,0.0, 0.8,0.0)
- durFrame.Size = UDim2.new(1.0,0.0, 0.2,0.0)
- durFrame.BorderSizePixel = 0.0
- -- Tweens
- ts:Create(textLabel, TweenInfo.new(duration/16, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {BackgroundTransparency = 0.0 } ):Play()
- ts:Create(textLabel, TweenInfo.new(duration/16), {Transparency = 0.0 } ):Play()
- ts:Create(durFrame, TweenInfo.new(duration/2, Enum.EasingStyle.Linear), {Size = UDim2.new(0.0,0.0, 0.2,0.0) } ):Play()
- ts:Create(durFrame, TweenInfo.new(duration/16, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {BackgroundTransparency = 0.0 } ):Play()
- wait(duration/2)
- ts:Create(textLabel, TweenInfo.new(duration/16, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {BackgroundTransparency = 1.0}):Play()
- ts:Create(textLabel, TweenInfo.new(duration/16), {Transparency = 1.0}):Play()
- ts:Create(durFrame, TweenInfo.new(duration/2, Enum.EasingStyle.Linear), {Size = UDim2.new(0.0,0.0, 0.2,0.0) } ):Play()
- wait(duration/18)
- textLabel:Destroy()
- end)
- end
- _G.notify = getgenv().notify
- getgenv().notff = _G.notify
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement