Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Create a new ScreenGui
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "PiggyIntermission"
- screenGui.ResetOnSpawn = false
- -- Create a new Frame
- local frame = Instance.new("Frame")
- frame.Name = "IntermissionFrame"
- frame.Size = UDim2.new(0.5, 0, 0.5, 0)
- frame.Position = UDim2.new(0.25, 0, 0.25, 0)
- frame.BackgroundTransparency = 0.5
- frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- frame.BorderSizePixel = 0
- frame.Parent = screenGui
- -- Create a new TextLabel
- local textLabel = Instance.new("TextLabel")
- textLabel.Name = "IntermissionText"
- textLabel.Size = UDim2.new(1, 0, 0.3, 0)
- textLabel.Position = UDim2.new(0, 0, 0.1, 0)
- textLabel.Text = "Intermission"
- textLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- textLabel.BackgroundTransparency = 1
- textLabel.Font = Enum.Font.SourceSansBold
- textLabel.TextSize = 36
- textLabel.Parent = frame
- -- Create a new TextButton
- local textButton = Instance.new("TextButton")
- textButton.Name = "IntermissionButton"
- textButton.Size = UDim2.new(0.4, 0, 0.2, 0)
- textButton.Position = UDim2.new(0.3, 0, 0.7, 0)
- textButton.Text = "Continue"
- textButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- textButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- textButton.Font = Enum.Font.SourceSansBold
- textButton.TextSize = 24
- textButton.Parent = frame
- -- Add a function to the button to close the intermission
- textButton.MouseButton1Click:Connect(function()
- screenGui:Destroy()
- end)
- -- Add the ScreenGui to the player's PlayerGui
- game.Players.LocalPlayer:WaitForChild("PlayerGui").PiggyIntermission = screenGui
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement