Advertisement
DaDogeDevelopment

Basic Piggy menu script

Apr 29th, 2023
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.56 KB | None | 0 0
  1. -- Create a new ScreenGui
  2. local screenGui = Instance.new("ScreenGui")
  3. screenGui.Name = "PiggyIntermission"
  4. screenGui.ResetOnSpawn = false
  5.  
  6. -- Create a new Frame
  7. local frame = Instance.new("Frame")
  8. frame.Name = "IntermissionFrame"
  9. frame.Size = UDim2.new(0.5, 0, 0.5, 0)
  10. frame.Position = UDim2.new(0.25, 0, 0.25, 0)
  11. frame.BackgroundTransparency = 0.5
  12. frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  13. frame.BorderSizePixel = 0
  14. frame.Parent = screenGui
  15.  
  16. -- Create a new TextLabel
  17. local textLabel = Instance.new("TextLabel")
  18. textLabel.Name = "IntermissionText"
  19. textLabel.Size = UDim2.new(1, 0, 0.3, 0)
  20. textLabel.Position = UDim2.new(0, 0, 0.1, 0)
  21. textLabel.Text = "Intermission"
  22. textLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  23. textLabel.BackgroundTransparency = 1
  24. textLabel.Font = Enum.Font.SourceSansBold
  25. textLabel.TextSize = 36
  26. textLabel.Parent = frame
  27.  
  28. -- Create a new TextButton
  29. local textButton = Instance.new("TextButton")
  30. textButton.Name = "IntermissionButton"
  31. textButton.Size = UDim2.new(0.4, 0, 0.2, 0)
  32. textButton.Position = UDim2.new(0.3, 0, 0.7, 0)
  33. textButton.Text = "Continue"
  34. textButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  35. textButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  36. textButton.Font = Enum.Font.SourceSansBold
  37. textButton.TextSize = 24
  38. textButton.Parent = frame
  39.  
  40. -- Add a function to the button to close the intermission
  41. textButton.MouseButton1Click:Connect(function()
  42.     screenGui:Destroy()
  43. end)
  44.  
  45. -- Add the ScreenGui to the player's PlayerGui
  46. game.Players.LocalPlayer:WaitForChild("PlayerGui").PiggyIntermission = screenGui
Tags: #roblox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement