Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- plr = owner
- plrgui = plr.PlayerGui
- local gui = Instance.new("ScreenGui", plrgui)
- gui.Name = "chat"
- local scroll = Instance.new("ScrollingFrame", gui)
- scroll.Size = UDim2.new(0, 350, 0, 550)
- scroll.AnchorPoint = Vector2.new(1, 1)
- scroll.Position = UDim2.new(1, 0, 1, 0)
- scroll.BorderSizePixel = 2
- scroll.BackgroundTransparency = 0.15
- scroll.BorderColor3 = Color3.new(1, 1, 1)
- scroll.BackgroundColor3 = BrickColor.new("Bright blue").Color
- local last = nil
- function message2(texto)
- for i,v in pairs (scroll:children()) do
- if v:IsA("TextLabel") then
- v.AnchorPoint = v.AnchorPoint - Vector2.new(0, 0.025)
- v.Position = v.Position - UDim2.new(0, 0, 0.025, 0)
- end
- end
- local text = Instance.new("TextLabel", scroll)
- text.Size = UDim2.new(0, 275, 0, 50)
- text.BackgroundTransparency = 1
- text.TextColor3 = Color3.new(1, 1, 1)
- text.TextScaled = true
- if last == nil then
- text.AnchorPoint = Vector2.new(0, 0.075)
- text.Position = UDim2.new(0, 0, 0.075, 0)
- else
- text.AnchorPoint = Vector2.new(0, text.AnchorPoint.y + 0.025)
- text.Position = last.Position + UDim2.new(0, 0, 0.025, 0)
- end
- text.Text = texto
- end
- message2("scroll down for the actual chat")
- function message(texto)
- for i,v in pairs (scroll:children()) do
- if v:IsA("TextLabel") then
- v.AnchorPoint = v.AnchorPoint - Vector2.new(0, 0.025)
- v.Position = v.Position - UDim2.new(0, 0, 0.025, 0)
- end
- end
- local text = Instance.new("TextLabel", scroll)
- text.Size = UDim2.new(0, 275, 0, 50)
- text.BackgroundTransparency = 1
- text.TextColor3 = Color3.new(1, 1, 1)
- text.TextScaled = true
- if last == nil then
- text.AnchorPoint = Vector2.new(0, 0.45)
- text.Position = UDim2.new(0, 0, 0.45, 0)
- else
- text.AnchorPoint = Vector2.new(0, text.AnchorPoint.y + 0.025)
- text.Position = last.Position + UDim2.new(0, 0, 0.025, 0)
- end
- text.Text = texto
- if texto:sub(1, 7) == "/invert" then
- text.Text = texto:sub(9)
- text.Rotation = 180
- end
- last = text
- end
- function getplayermessages()
- for i,v in pairs (game:GetService("Players"):children()) do
- if v:IsA("Player") then
- v.Chatted:connect(function(msg)
- message(v.Name ..": " ..msg)
- end)
- end
- end
- game:GetService("Players").PlayerAdded:connect(function(p)
- message(p.Name .." joined!")
- p.Chatted:connect(function(msg)
- message(p.Name ..": " ..msg)
- end)
- end)
- game:GetService("Players").PlayerRemoving:connect(function(p)
- message(p.Name .." left! D:")
- end)
- end
- getplayermessages()
- message("this is my custom chat. enjoy i guess (by youngmacka123)")
- --by youngmacka123
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement