Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Create a ScreenGui
- local gui = Instance.new("ScreenGui")
- gui.Name = "TextGui"
- gui.Parent = game.Players.LocalPlayer.PlayerGui
- -- Create the main frame
- local frame = Instance.new("Frame")
- frame.Size = UDim2.new(0, 300, 0, 200)
- frame.Position = UDim2.new(0.5, -150, 0.5, -100)
- frame.BackgroundColor3 = Color3.new(0, 0, 0)
- frame.BorderSizePixel = 0
- frame.Parent = gui
- -- Create the text label
- local textLabel = Instance.new("TextLabel")
- textLabel.Size = UDim2.new(1, 0, 0.5, 0)
- textLabel.BackgroundColor3 = Color3.new(0, 1, 0) -- Green color
- textLabel.TextColor3 = Color3.new(1, 1, 1)
- textLabel.TextStrokeTransparency = 0
- textLabel.Font = Enum.Font.Code
- textLabel.TextSize = 14
- textLabel.TextWrapped = true
- textLabel.Text = "10110100101010010100101011010010101001010010101101001010100101001010110100101010010100101011010010101001010010101101001010100101001010110100101010010100101011010010101001010010"
- textLabel.Parent = frame
- -- Create the close button
- local closeButton = Instance.new("TextButton")
- closeButton.Size = UDim2.new(0, 80, 0, 30)
- closeButton.Position = UDim2.new(1, -90, 0, 5)
- closeButton.BackgroundColor3 = Color3.new(0, 0, 0)
- closeButton.TextColor3 = Color3.new(1, 1, 1)
- closeButton.Font = Enum.Font.Code
- closeButton.TextSize = 14
- closeButton.Text = "Close"
- closeButton.Parent = frame
- -- Function to toggle the text
- local function toggleText()
- if textLabel.Text == "10110100101010010100101011010010101001010010101101001010100101001010110100101010010100101011010010101001010010101101001010100101001010110100101010010100101011010010101001010010" then
- textLabel.Text = "0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
- else
- textLabel.Text = "10110100101010010100101011010010101001010010101101001010100101001010110100101010010100101011010010101001010010101101001010100101001010110100101010010100101011010010101001010010"
- end
- end
- -- Connect the toggleText function to the button's click event
- closeButton.MouseButton1Click:Connect(toggleText)
- -- Auto-switch text after 0.5 seconds
- local switchInterval = 0.5
- while true do
- wait(switchInterval)
- toggleText()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement