Advertisement
mjv2023

matrix gui

Aug 27th, 2023
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1. -- Create a ScreenGui
  2. local gui = Instance.new("ScreenGui")
  3. gui.Name = "TextGui"
  4. gui.Parent = game.Players.LocalPlayer.PlayerGui
  5.  
  6. -- Create the main frame
  7. local frame = Instance.new("Frame")
  8. frame.Size = UDim2.new(0, 300, 0, 200)
  9. frame.Position = UDim2.new(0.5, -150, 0.5, -100)
  10. frame.BackgroundColor3 = Color3.new(0, 0, 0)
  11. frame.BorderSizePixel = 0
  12. frame.Parent = gui
  13.  
  14. -- Create the text label
  15. local textLabel = Instance.new("TextLabel")
  16. textLabel.Size = UDim2.new(1, 0, 0.5, 0)
  17. textLabel.BackgroundColor3 = Color3.new(0, 1, 0) -- Green color
  18. textLabel.TextColor3 = Color3.new(1, 1, 1)
  19. textLabel.TextStrokeTransparency = 0
  20. textLabel.Font = Enum.Font.Code
  21. textLabel.TextSize = 14
  22. textLabel.TextWrapped = true
  23. textLabel.Text = "10110100101010010100101011010010101001010010101101001010100101001010110100101010010100101011010010101001010010101101001010100101001010110100101010010100101011010010101001010010"
  24. textLabel.Parent = frame
  25.  
  26. -- Create the close button
  27. local closeButton = Instance.new("TextButton")
  28. closeButton.Size = UDim2.new(0, 80, 0, 30)
  29. closeButton.Position = UDim2.new(1, -90, 0, 5)
  30. closeButton.BackgroundColor3 = Color3.new(0, 0, 0)
  31. closeButton.TextColor3 = Color3.new(1, 1, 1)
  32. closeButton.Font = Enum.Font.Code
  33. closeButton.TextSize = 14
  34. closeButton.Text = "Close"
  35. closeButton.Parent = frame
  36.  
  37. -- Function to toggle the text
  38. local function toggleText()
  39. if textLabel.Text == "10110100101010010100101011010010101001010010101101001010100101001010110100101010010100101011010010101001010010101101001010100101001010110100101010010100101011010010101001010010" then
  40. textLabel.Text = "0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
  41. else
  42. textLabel.Text = "10110100101010010100101011010010101001010010101101001010100101001010110100101010010100101011010010101001010010101101001010100101001010110100101010010100101011010010101001010010"
  43. end
  44. end
  45.  
  46. -- Connect the toggleText function to the button's click event
  47. closeButton.MouseButton1Click:Connect(toggleText)
  48.  
  49. -- Auto-switch text after 0.5 seconds
  50. local switchInterval = 0.5
  51. while true do
  52. wait(switchInterval)
  53. toggleText()
  54. end
  55.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement