Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local CurrentChannel = nil
- local MainChannel = script.Parent.Frame.MainChannel
- local SDChannel = script.Parent.Frame.SDChannel
- local MTFChannel = script.Parent.Frame.MTFChannel
- local SCDChannel = script.Parent.Frame.SCDChannel
- local MDChannel = script.Parent.Frame.MDChannel
- local ETChannel = script.Parent.Frame.ETChannel
- local ISDChannel = script.Parent.Frame.ISDChannel
- local IAChannel = script.Parent.Frame.IAChannel
- local ECChannel = script.Parent.Frame.ECChannel
- local DEAChannel = script.Parent.Frame.DEAChannel
- local ADChannel = script.Parent.Frame.ADChannel
- local CDChannel = script.Parent.Frame.CDChannel
- local TextService = game:GetService("TextService")
- local ReceivingEvent = game.ReplicatedStorage.ChattedEvent
- local TextBoxEvent = game.ReplicatedStorage.ChattedEvent
- local PlayerEvent = game.ReplicatedStorage.PlayerEvent
- local SendBackEvent = game.ReplicatedStorage.SendBackEvent
- local TextBox = script.Parent.Frame.TextBox
- local Contents = TextBox.Text
- script.Parent.Frame.ChannelSelection.MainChannel.MouseButton1Down:Connect(function()
- CurrentChannel = nil
- wait(0.5)
- CurrentChannel = MainChannel
- MainChannel.Visible = true
- SDChannel.Visible = false
- MTFChannel.Visible = false
- SCDChannel.Visible = false
- MDChannel.Visible = false
- ETChannel.Visible = false
- ISDChannel.Visible = false
- IAChannel.Visible = false
- ECChannel.Visible = false
- DEAChannel.Visible = false
- ADChannel.Visible = false
- CDChannel.Visible = false
- script.Parent.Frame.TextLabel.Text = "Current Channel: "..CurrentChannel.Name
- end)
- script.Parent.Frame.ChannelSelection.SDChannel.MouseButton1Down:Connect(function()
- CurrentChannel = nil
- wait(0.5)
- CurrentChannel = SDChannel
- MainChannel.Visible = false
- SDChannel.Visible = true
- MTFChannel.Visible = false
- SCDChannel.Visible = false
- MDChannel.Visible = false
- ETChannel.Visible = false
- ISDChannel.Visible = false
- IAChannel.Visible = false
- ECChannel.Visible = false
- DEAChannel.Visible = false
- ADChannel.Visible = false
- CDChannel.Visible = false
- script.Parent.Frame.TextLabel.Text = "Current Channel: "..CurrentChannel.Name
- end)
- --[[function DoSomethingWithTheCall(sender, message)
- local Template = game.Players.LocalPlayer.PlayerGui.ChatBox.Frame.ScrollingFrame.TextLabel
- local ClonedTemplate = Template:Clone()
- ClonedTemplate.Text = sender..": "..message
- ClonedTemplate.Parent = Template.Parent
- ClonedTemplate.TextTransparency = 0
- script.Parent.CanvasPosition = script.Parent.CanvasPosition + Vector2.new(0,17)
- script.Parent.CanvasSize= script.Parent.CanvasSize + UDim2.new(0,0, 0,17)
- end--]]
- local Mouse = game.Players.LocalPlayer:GetMouse()
- Mouse.KeyDown:Connect(function(Key)
- if Key:lower() == "/" then
- script.Parent.Frame.TextBox:CaptureFocus()
- end
- end)
- function DoSomethingWithTheTextCall(wait)
- local playerFrom = game.Players.LocalPlayer
- local Contents = TextBox.Text
- TextBoxEvent:FireServer(Contents)
- end
- TextBox.FocusLost:Connect(function()
- DoSomethingWithTheTextCall()
- end)
- if CurrentChannel == nil then
- print("CurrentChannel, Nil Value, Error:1")
- else
- print("Channel path found successfully.")
- end
- SendBackEvent.OnClientEvent:Connect(function(Contents2, SentPlayer)
- wait(0.1)
- local Template = CurrentChannel.TextLabel
- local ClonedTemplate = Template:Clone()
- ClonedTemplate.Text = SentPlayer.Name..": "..Contents2
- ClonedTemplate.Parent = Template.Parent
- ClonedTemplate.TextTransparency = 0
- CurrentChannel.CanvasPosition = CurrentChannel.CanvasPosition + Vector2.new(0,30)
- CurrentChannel.CanvasSize= CurrentChannel.CanvasSize + UDim2.new(0,0, 0,17)
- end)
- PlayerEvent:FireServer()
- --ReceivingEvent.OnClientEvent:Connect(DoSomethingWithTheCall)
- game:GetService("StarterGui"):SetCoreGuiEnabled("Chat", false)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement