Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local TextService = game:GetService("TextService")
- function rainbowifyText(text)
- local rainbowColors = {
- Color3.fromRGB(255, 0, 0),
- Color3.fromRGB(255, 127, 0),
- Color3.fromRGB(255, 255, 0),
- Color3.fromRGB(0, 255, 0),
- Color3.fromRGB(0, 0, 255),
- Color3.fromRGB(75, 0, 130),
- Color3.fromRGB(148, 0, 211)
- }
- local rainbowText = ""
- local characters = string.split(text, "")
- for i, char in ipairs(characters) do
- local rainbowColor = rainbowColors[(i % #rainbowColors) + 1]
- rainbowText = rainbowText .. "<font color=\"rgb(" .. rainbowColor.R .. ", " .. rainbowColor.G .. ", " .. rainbowColor.B .. ")\">" .. char .. "</font>"
- end
- return rainbowText
- end
- game.Players.PlayerAdded:Connect(function(player)
- player.Chatted:Connect(function(message)
- local rainbowMessage = rainbowifyText(message)
- game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer(rainbowMessage, "All")
- end)
- end)
- --enables bubble chat also
- textcolour = Color3.new(0,0,0)
- game:GetService("Chat").BubbleChatEnabled = true
- coroutine.wrap(function()
- while wait() do
- for i = 0,255,10 do
- textcolour = Color3.new(255/255,i/255,0/255)
- wait()
- end
- for i = 255,0,-10 do
- textcolour = Color3.new(i/255,255/255,0/255)
- wait()
- end
- for i = 0,255,10 do
- textcolour = Color3.new(0/255,255/255,i/255)
- wait()
- end
- for i = 255,0,-10 do
- textcolour = Color3.new(0/255,i/255,255/255)
- wait()
- end
- for i = 0,255,10 do
- textcolour = Color3.new(i/255,0/255,255/255)
- wait()
- end
- for i = 255,0,-10 do
- textcolour = Color3.new(255/255,0/255,i/255)
- wait()
- end
- end
- end)()
- local settings = {
- }
- while wait() do
- pcall(function()
- game:GetService("Chat"):SetBubbleChatSettings({
- TextColor3 = textcolour,
- -- The amount of time, in seconds, to wait before a bubble fades out.
- BubbleDuration = 10,
- -- The amount of messages to be displayed, before old ones disappear
- -- immediately when a new message comes in.
- MaxBubbles = 20,
- -- Styling for the bubbles. These settings will change various visual aspects.
- BackgroundColor3 = Color3.fromRGB(0, 0, 0),
- TextSize = 16,
- Font = Enum.Font.Ubuntu, --Enum.Font.GothamSemibold
- Transparency = .1,
- CornerRadius = UDim.new(0, 30),
- TailVisible = true,
- Padding = 8, -- in pixels
- MaxWidth = 500, --in pixels
- -- Extra space between the head and the billboard (useful if you want to
- -- leave some space for other character billboard UIs)
- VerticalStudsOffset = 0,
- -- Space in pixels between two bubbles
- BubblesSpacing = 3,
- -- The distance (from the camera) that bubbles turn into a single bubble
- -- with ellipses (...) to indicate chatter.
- MinimizeDistance = 200,
- -- The max distance (from the camera) that bubbles are shown at
- MaxDistance = 400,
- })
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement