Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = owner
- local char = plr.Character
- local torso = char.Torso
- local head = char.Head
- function Random(num)
- local section=num % 1 * 3;
- local secondary=0.5 * math.pi * (section % 1);
- if section < 1 then
- return 1,1 - math.cos(secondary),1 - math.sin(secondary);
- elseif section < 2 then
- return 1 - math.sin(secondary),1,1 - math.cos(secondary);
- else
- return 1 - math.cos(secondary),1 - math.sin(secondary),1;
- end
- end
- function custommessage(msg)
- local bg = Instance.new("BillboardGui", char)
- bg.Adornee = char.Head
- bg.Size = UDim2.new(1, 0, 1, 0)
- bg.StudsOffset = Vector3.new(0.5, 4, 0)
- local txt = Instance.new("TextLabel")
- txt.Parent = bg
- txt.Transparency = 0
- txt.BackgroundColor3 = Color3.new(1,1,1)
- txt.BackgroundTransparency = 1
- txt.BorderSizePixel = 0
- txt.Size = UDim2.new(0, 0, 0.05, 0)
- txt.Position = UDim2.new(0, 0, 0, 0)
- txt:TweenSize(UDim2.new(5,0,0.05,0),"Out","Quart",0.5,true)
- txt:TweenPosition(UDim2.new(-2.5,0,0,0),"Out","Quart",0.5,true)
- txt.Font = "Code"
- txt.FontSize = "Size8"
- txt.TextStrokeColor3 = Color3.new(0,0,0)
- txt.TextStrokeTransparency = 1
- txt.TextScaled = true
- txt.BackgroundColor3 = Color3.new(0,0,0)
- txt.Text = " "
- txt.SizeConstraint = 0
- game:service'RunService'.RenderStepped:connect(function()
- txt.TextColor3 = Color3.new(Random(tick()))
- end)
- wait(0.5)
- txt:TweenSize(UDim2.new(5,0,2,0),"In","Quart",0.5,true)
- txt:TweenPosition(UDim2.new(-2.5,0,0,0),"In","Quart",0.5,true)
- wait(0.5)
- for i = 0, msg:len(), 1 do
- txt.Text = msg:sub(0, i)
- texteffect = Instance.new("Sound",char)
- texteffect.SoundId = "rbxassetid://156286438"
- texteffect.TimePosition = 0
- texteffect:Play()
- wait(0.02)
- end
- wait(3)
- for i = 0,1,0.1 do
- wait()
- txt.TextTransparency = i
- end
- txt:TweenSize(UDim2.new(0,0,2,0),"Out","Quart",0.25,true)
- txt:TweenPosition(UDim2.new(0,0,0,0),"Out","Quart",0.25,true)
- wait(0.25)
- bg:Destroy()
- end
- coroutine.resume(coroutine.create(function()
- custommessage("_Rainbow")
- end))
- plr.Chatted:connect(function(message)
- custommessage(message)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement