Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local showWhenCharacterRespawns = true -- If set to true, then the welcome GUI will show up whenever a person respawns
- function createWGUI(player)
- while (not player.DataReady and player:FindFirstChild("PlayerGui") == nil) do
- wait()
- end
- local pgui = player.PlayerGui
- local textColorR = 230 -- Change only if you know about Color3 values
- local textColorG = 230 -- Change only if you know about Color3 values
- local textColorB = 230 -- Change only if you know about Color3 values
- local textTransparency = 0.5 -- Select a value between 0 and 1
- local leftToRight = false -- if false then it will go from right to left
- local text = "Scirpt builder!" -- Place any text you desire here; this will be shown on the welcome GUI
- local font = "ArialBold" -- You can change this to any of the following: Arial, ArialBold, Legacy
- local fontSize = "Size24" -- You can change this to any of the following: Size8, Size9, Size10, Size11, Size12, Size18, Size24, Size36, Size48
- local scaled = false -- If this is set to true, then the font size chosen will be useless because it'll adjust the size of the font to fit the frame
- local primaryFrameColorR = 255 -- Change only if you know about Color3 values
- local primaryFrameColorG = 0 -- Change only if you know about Color3 values
- local primaryFrameColorB = 0 -- Change only if you know about Color3 values
- local secondaryFrameColorR = 100 -- Change only if you know about Color3 values
- local secondaryFrameColorG = 100 -- Change only if you know about Color3 values
- local secondaryFrameColorB = 100 -- Change only if you know about Color3 values
- local primaryFrameTransparency = 0.4 -- Select a value between 0 and 1
- local secondaryFrameTransparency = 0.5 -- Select a value between 0 and 1
- local totaltime = 5 -- Change this to how long you want the GUI to take to get across the screen
- local intervaltime = 5 -- Change this to how long you want the GUI to wait until it goes across the screen again
- local numberofTimes = 3 -- Change this to how many times you want the GUI to go from left to right across the screen before disappearing
- local sgui = Instance.new("ScreenGui", pgui)
- sgui.Name = "WelcomeGUI"
- local mainf = Instance.new("Frame", sgui)
- mainf.Name = "Main"
- mainf.Size = UDim2.new(1, 0, 0.05, 0)
- mainf.Position = UDim2.new(-1, 0, 0.05, 0)
- mainf.BorderSizePixel = 0
- mainf.BackgroundTransparency = primaryFrameTransparency
- mainf.BackgroundColor3 = Color3.new(primaryFrameColorR/255, primaryFrameColorG/255, primaryFrameColorB/255)
- local if1 = Instance.new("Frame", mainf)
- if1.Size = UDim2.new(1, 0, 0.2, 0)
- if1.Position = UDim2.new(0, 0, -0.2, 0)
- if1.BackgroundTransparency = secondaryFrameTransparency
- if1.BackgroundColor3 = Color3.new(secondaryFrameColorR/255,secondaryFrameColorG/255, secondaryFrameColorB/255)
- if1.BorderSizePixel = 0
- if1.Name = "detailF1"
- local if2 = Instance.new("Frame", mainf)
- if2.Size = UDim2.new(1, 0, 0.2, 0)
- if2.Position = UDim2.new(0, 0, 1, 0)
- if2.BackgroundTransparency = secondaryFrameTransparency
- if2.BackgroundColor3 = Color3.new(secondaryFrameColorR/255,secondaryFrameColorG/255, secondaryFrameColorB/255)
- if2.BorderSizePixel = 0
- if2.Name = "detailF2"
- local textl = Instance.new("TextLabel", mainf)
- textl.Size = UDim2.new(1, 0, 1, 0)
- textl.TextColor3 = Color3.new(textColorR/255,textColorG/255, textColorB/255)
- textl.TextTransparency = textTransparency
- textl.BackgroundTransparency = 1
- textl.Text = text
- textl.Font = font
- textl.FontSize = fontSize
- if scaled then
- text.TextScaled = true
- end
- for i = 1, numberofTimes do
- if leftToRight then
- mainf.Position = UDim2.new(-1, 0, 0.05, 0)
- wait()
- mainf:TweenPosition(UDim2.new(1, 0, 0.05, 0), "Out", "Linear", totaltime, true)
- wait(totaltime)
- wait(intervaltime)
- else
- mainf.Position = UDim2.new(1, 0, 0.05, 0)
- wait()
- mainf:TweenPosition(UDim2.new(-1, 0, 0.05, 0), "Out", "Linear", totaltime, true)
- wait(totaltime)
- wait(intervaltime)
- end
- end
- sgui:Destroy()
- end
- game.Players.PlayerAdded:connect(function(player)
- local coro = coroutine.create(createWGUI)
- coroutine.resume(coro, player)
- wait(10)
- player.CharacterAdded:connect(function(char)
- if showWhenCharacterRespawns then
- local coro2 = coroutine.create(createWGUI)
- coroutine.resume(coro2, player)
- end
- end)
- end)
- for _,v in pairs(game.Players:GetChildren()) do
- local coro = coroutine.create(createWGUI)
- coroutine.resume(coro, v)
- v.CharacterAdded:connect(function(char)
- if showWhenCharacterRespawns then
- local coro2 = coroutine.create(createWGUI)
- coroutine.resume(coro2, v)
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement