Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _G.API_KEY = "PUT YOUR API KEY HERE"
- local HttpService = game:GetService("HttpService")
- local Players = game:GetService("Players")
- wait(5)
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "CustomChat for ChatTranslator";
- Text = "Loaded";
- Duration = 5;
- })
- local Chat = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local ChatBarParentFrame = Instance.new("Frame")
- local Frame_2 = Instance.new("Frame")
- local BoxFrame = Instance.new("Frame")
- local Frame_3 = Instance.new("Frame")
- local ChatBar = Instance.new("TextBox")
- local MessageMode = Instance.new("TextButton")
- local TextLabel = Instance.new("TextLabel")
- local ChannelsBarParentFrame = Instance.new("Frame")
- local Frame_4 = Instance.new("Frame")
- local ScrollingBase = Instance.new("Frame")
- local ScrollerSizer = Instance.new("Frame")
- local ScrollerFrame = Instance.new("Frame")
- local Frame_All = Instance.new("Frame")
- local BackgroundFrame = Instance.new("Frame")
- local UnselectedFrame = Instance.new("Frame")
- local TextButton = Instance.new("TextButton")
- local SelectedFrame = Instance.new("Frame")
- local BackgroundImage = Instance.new("ImageLabel")
- local BlueBarLeft = Instance.new("ImageLabel")
- local BlueBarRight = Instance.new("ImageLabel")
- local TextButton_2 = Instance.new("TextButton")
- local TextButton_3 = Instance.new("TextButton")
- local Frame_5 = Instance.new("Frame")
- local ImageLabel = Instance.new("ImageLabel")
- local TextLabel_2 = Instance.new("TextLabel")
- local Frame_System = Instance.new("Frame")
- local BackgroundFrame_2 = Instance.new("Frame")
- local UnselectedFrame_2 = Instance.new("Frame")
- local TextButton_4 = Instance.new("TextButton")
- local SelectedFrame_2 = Instance.new("Frame")
- local BackgroundImage_2 = Instance.new("ImageLabel")
- local BlueBarLeft_2 = Instance.new("ImageLabel")
- local BlueBarRight_2 = Instance.new("ImageLabel")
- local TextButton_5 = Instance.new("TextButton")
- local TextButton_6 = Instance.new("TextButton")
- local Frame_6 = Instance.new("Frame")
- local ImageLabel_2 = Instance.new("ImageLabel")
- local TextLabel_3 = Instance.new("TextLabel")
- local Frame_7 = Instance.new("Frame")
- local LeaveConfirmationFrame = Instance.new("Frame")
- local TextButton_7 = Instance.new("TextButton")
- local TextButton_8 = Instance.new("TextButton")
- local TextButton_9 = Instance.new("TextButton")
- local TextLabel_4 = Instance.new("TextLabel")
- local PageLeftButton = Instance.new("ImageButton")
- local ArrowLabel = Instance.new("ImageLabel")
- local PositionalHelper = Instance.new("Frame")
- local PageRightButton = Instance.new("ImageButton")
- local ArrowLabel_2 = Instance.new("ImageLabel")
- local ChatChannelParentFrame = Instance.new("Frame")
- local Frame_MessageLogDisplay = Instance.new("Frame")
- local Scroller = Instance.new("ScrollingFrame")
- local UIListLayout = Instance.new("UIListLayout")
- local Frame_8 = Instance.new("Frame")
- local TextLabel_5 = Instance.new("TextLabel")
- local ImageButton = Instance.new("ImageButton")
- local ImageLabel_3 = Instance.new("ImageLabel")
- function CreateLabel(Name, Text)
- local sf = Scroller.Frame
- local sf2 = Scroller
- local alls = 20
- for i,v in pairs(sf:GetChildren()) do
- if v then
- alls = v.Size.Y.Offset + alls
- end
- if not v then
- alls = 0
- end
- end
- local tl = Instance.new('TextLabel', sf)
- local il = Instance.new('Frame', tl)
- tl.Name = Name
- --tl.ZIndex = 6
- tl.Text = "["..Name.."]: "..Text
- tl.Size = UDim2.new(0,355,0,84)
- --(1, 0, 1, 0)
- tl.BackgroundTransparency = 1
- tl.Font = Enum.Font.SourceSansBold
- tl.ClipsDescendants = true
- tl.Position = UDim2.new(0,8,0,alls)
- tl.TextTransparency = 1
- tl.TextScaled = false
- tl.TextSize = 18
- tl.TextWrapped = true
- tl.TextXAlignment = Enum.TextXAlignment.Left
- tl.TextYAlignment = Enum.TextYAlignment.Top
- il.BackgroundTransparency = 1
- il.BorderSizePixel = 0
- il.Size = UDim2.new(0,16,1,0)
- il.Position = UDim2.new(0,316,0,0)
- tl.TextStrokeTransparency = 0.750
- tl.TextColor3 = Color3.fromRGB(255,255,255)
- tl.Size = UDim2.new(0,355,0,tl.TextBounds.Y)
- sf2.CanvasSize = UDim2.new(0,0,0,alls+tl.TextBounds.Y)
- sf2.CanvasPosition = Vector2.new(0,sf2.CanvasPosition.Y+tl.TextBounds.Y)
- local size2 = sf2.CanvasSize.Y.Offset
- --[[tl:TweenPosition(UDim2.new(0,8,0,alls), 'In', 'Quint', 0.001)
- for i = 0,50 do wait(0.001)
- tl.TextTransparency = tl.TextTransparency - 0.05
- end--]]
- tl.TextTransparency = 0
- end
- function CreateTLabel(Name, Text)
- local sf = Scroller.Frame
- local sf2 = Scroller
- local alls = 20
- for i,v in pairs(sf:GetChildren()) do
- if v then
- alls = v.Size.Y.Offset + alls
- end
- if not v then
- alls = 0
- end
- end
- local tl = Instance.new('TextLabel', sf)
- local il = Instance.new('Frame', tl)
- tl.Name = Name
- tl.ZIndex = 6
- tl.Text = "["..Name.."]: "..Text
- tl.Size = UDim2.new(0,355,0,84)
- --(1, 0, 1, 0)
- tl.BackgroundTransparency = 1
- tl.Font = Enum.Font.SourceSansBold
- tl.ClipsDescendants = true
- tl.Position = UDim2.new(0,8,0,alls)
- tl.TextTransparency = 1
- tl.TextScaled = false
- tl.TextSize = 18
- tl.TextWrapped = true
- tl.TextXAlignment = Enum.TextXAlignment.Left
- tl.TextYAlignment = Enum.TextYAlignment.Top
- il.BackgroundTransparency = 1
- il.BorderSizePixel = 0
- il.Size = UDim2.new(0,12,1,0)
- il.Position = UDim2.new(0,316,0,0)
- tl.TextStrokeTransparency = 0.750
- tl.TextColor3 = Color3.fromRGB(255,0,0)
- tl.Size = UDim2.new(0,355,0,tl.TextBounds.Y)
- sf2.CanvasSize = UDim2.new(0,0,0,alls+tl.TextBounds.Y)
- sf2.CanvasPosition = Vector2.new(0,sf2.CanvasPosition.Y+tl.TextBounds.Y)
- local size2 = sf2.CanvasSize.Y.Offset
- --[[tl:TweenPosition(UDim2.new(0,8,0,alls), 'In', 'Quint', 0.001)
- for i = 0,50 do wait(0.001)
- tl.TextTransparency = tl.TextTransparency - 0.05
- end--]]
- tl.TextTransparency = 0
- end
- ----------------------------------------------------------------------
- local Chat2 = Instance.new("ImageButton")
- local ChatIcon2 = Instance.new("ImageLabel")
- local ChatCounter2 = Instance.new("ImageLabel")
- local ChatCounterText2 = Instance.new("TextLabel")
- TMouse = game.Players.LocalPlayer:GetMouse()
- TMouse.KeyDown:connect(function(Key)
- if (Key=="'") then
- ChatBar:CaptureFocus()
- spawn(function()
- repeat ChatBar.Text = '' until ChatBar.Text == ''
- end)
- --ChatBar.Text = ""
- --[[spawn(function()
- repeat
- TextLabel.Visible = false
- Frame.Visible = true
- ChatIcon2.ImageColor3 = Color3.new(0, 255, 0)
- ChatChannelParentFrame.BackgroundTransparency = 0.6
- ImageButton.BackgroundTransparency = 0.6
- Frame_2.BackgroundTransparency = 0.6
- BoxFrame.BackgroundTransparency = 0.6
- TextLabel.TextTransparency = 0.4
- ChatBar.TextTransparency = 0.4
- until ChatBar.Text == ''
- end)--]]
- end
- end)
- --Properties:
- Chat.Name = "CustomChat"
- Chat.Parent = game.Players[game.Players.LocalPlayer.Name].PlayerGui
- Chat.DisplayOrder = 6
- Chat.ResetOnSpawn = false
- Frame.Parent = Chat
- Frame.BackgroundTransparency = 1.000
- Frame.Size = UDim2.new(0.300000012, 0, 0.275945932, 0)
- Frame.Visible = false
- ChatBarParentFrame.Name = "ChatBarParentFrame"
- ChatBarParentFrame.Parent = Frame
- ChatBarParentFrame.BackgroundTransparency = 1.000
- ChatBarParentFrame.Position = UDim2.new(0, 0, 1, -42)
- ChatBarParentFrame.Size = UDim2.new(1, 0, 0, 42)
- Frame_2.Parent = ChatBarParentFrame
- Frame_2.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- Frame_2.BackgroundTransparency = 1
- Frame_2.BorderSizePixel = 0
- Frame_2.Size = UDim2.new(1, 0, 1, 0)
- BoxFrame.Name = "BoxFrame"
- BoxFrame.Parent = Frame_2
- BoxFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- BoxFrame.BackgroundTransparency = 1
- BoxFrame.BorderSizePixel = 0
- BoxFrame.Position = UDim2.new(0, 7, 0, 7)
- BoxFrame.Size = UDim2.new(1, -14, 1, -14)
- Frame_3.Parent = BoxFrame
- Frame_3.BackgroundTransparency = 1.000
- Frame_3.Position = UDim2.new(0, 5, 0, 5)
- Frame_3.Size = UDim2.new(1, -10, 1, -10)
- ChatBar.Name = "ChatBar"
- ChatBar.Parent = Frame_3
- ChatBar.BackgroundTransparency = 1.000
- ChatBar.Selectable = false
- ChatBar.Size = UDim2.new(0,370,0,28)
- --(1, 0, 1, 0)
- ChatBar.ClearTextOnFocus = false
- ChatBar.Font = Enum.Font.SourceSansBold
- ChatBar.Text = ""
- ChatBar.TextColor3 = Color3.fromRGB(0, 0, 0)
- ChatBar.TextSize = 18.000
- ChatBar.TextTransparency = 1
- ChatBar.TextWrapped = true
- ChatBar.TextScaled = false
- ChatBar.TextXAlignment = Enum.TextXAlignment.Left
- ChatBar.TextYAlignment = Enum.TextYAlignment.Top
- ChatBar.MouseEnter:connect(function()
- ChatChannelParentFrame.BackgroundTransparency = 0.6
- ImageButton.BackgroundTransparency = 0.6
- Frame_2.BackgroundTransparency = 0.6
- BoxFrame.BackgroundTransparency = 0.6
- TextLabel.TextTransparency = 0.4
- ChatBar.TextTransparency = 0.4
- end)
- --[[ChatBar.MouseLeave:connect(function()
- ChatChannelParentFrame.BackgroundTransparency = 1
- ImageButton.BackgroundTransparency = 1
- Frame_2.BackgroundTransparency = 1
- BoxFrame.BackgroundTransparency = 1
- TextLabel.TextTransparency = 1
- ChatBar.TextTransparency = 1
- end)--]]
- MessageMode.Name = "MessageMode"
- MessageMode.Parent = Frame_3
- MessageMode.BackgroundTransparency = 1.000
- MessageMode.Selectable = false
- MessageMode.Font = Enum.Font.SourceSansBold
- MessageMode.Text = ""
- MessageMode.TextColor3 = Color3.fromRGB(35, 76, 142)
- MessageMode.TextSize = 18.000
- MessageMode.TextTransparency = 0.810
- MessageMode.TextWrapped = true
- MessageMode.TextXAlignment = Enum.TextXAlignment.Left
- TextLabel.Parent = Frame_3
- TextLabel.BackgroundTransparency = 1.000
- TextLabel.Size = UDim2.new(1, 0, 1, 0)
- TextLabel.Font = Enum.Font.SourceSansBold
- TextLabel.Text = "To chat click here or press ' key"
- TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
- TextLabel.TextSize = 18.000
- TextLabel.TextTransparency = 1
- TextLabel.TextWrapped = true
- TextLabel.TextXAlignment = Enum.TextXAlignment.Left
- TextLabel.TextYAlignment = Enum.TextYAlignment.Top
- ChannelsBarParentFrame.Name = "ChannelsBarParentFrame"
- ChannelsBarParentFrame.Parent = Frame
- ChannelsBarParentFrame.BackgroundTransparency = 1.000
- ChannelsBarParentFrame.Size = UDim2.new(1, 0, 0, 34)
- ChannelsBarParentFrame.Visible = false
- Frame_4.Parent = ChannelsBarParentFrame
- Frame_4.BackgroundTransparency = 1.000
- Frame_4.Size = UDim2.new(1, 0, 1, 0)
- ScrollingBase.Name = "ScrollingBase"
- ScrollingBase.Parent = Frame_4
- ScrollingBase.BackgroundTransparency = 1.000
- ScrollingBase.ClipsDescendants = true
- ScrollingBase.Size = UDim2.new(1, 0, 1, 0)
- ScrollerSizer.Name = "ScrollerSizer"
- ScrollerSizer.Parent = ScrollingBase
- ScrollerSizer.BackgroundTransparency = 1.000
- ScrollerSizer.Size = UDim2.new(0.5, 0, 1, 0)
- ScrollerFrame.Name = "ScrollerFrame"
- ScrollerFrame.Parent = ScrollerSizer
- ScrollerFrame.BackgroundTransparency = 1.000
- ScrollerFrame.Size = UDim2.new(1, 0, 1, 0)
- Frame_All.Name = "Frame_All"
- Frame_All.Parent = ScrollerFrame
- Frame_All.BackgroundTransparency = 1.000
- Frame_All.Size = UDim2.new(1, 0, 1, 0)
- BackgroundFrame.Name = "BackgroundFrame"
- BackgroundFrame.Parent = Frame_All
- BackgroundFrame.BackgroundTransparency = 1.000
- BackgroundFrame.Position = UDim2.new(0, 1, 0, 1)
- BackgroundFrame.Size = UDim2.new(1, -2, 1, -2)
- UnselectedFrame.Name = "UnselectedFrame"
- UnselectedFrame.Parent = BackgroundFrame
- UnselectedFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- UnselectedFrame.BackgroundTransparency = 0.873
- UnselectedFrame.BorderSizePixel = 0
- UnselectedFrame.Size = UDim2.new(1, 0, 1, 0)
- UnselectedFrame.Visible = false
- TextButton.Parent = UnselectedFrame
- TextButton.Active = false
- TextButton.BackgroundTransparency = 1.000
- TextButton.Selectable = false
- TextButton.Size = UDim2.new(1, 0, 1, 0)
- TextButton.Font = Enum.Font.SourceSans
- TextButton.Text = "All"
- TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton.TextSize = 18.000
- TextButton.TextStrokeTransparency = 0.873
- TextButton.TextTransparency = 0.873
- SelectedFrame.Name = "SelectedFrame"
- SelectedFrame.Parent = BackgroundFrame
- SelectedFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- SelectedFrame.BackgroundTransparency = 1.000
- SelectedFrame.BorderSizePixel = 0
- SelectedFrame.Size = UDim2.new(1, 0, 1, 0)
- BackgroundImage.Name = "BackgroundImage"
- BackgroundImage.Parent = SelectedFrame
- BackgroundImage.BackgroundColor3 = Color3.fromRGB(93, 100, 115)
- BackgroundImage.BackgroundTransparency = 0.873
- BackgroundImage.BorderSizePixel = 0
- BackgroundImage.Size = UDim2.new(1, 0, 1, 0)
- BackgroundImage.ScaleType = Enum.ScaleType.Slice
- BlueBarLeft.Name = "BlueBarLeft"
- BlueBarLeft.Parent = SelectedFrame
- BlueBarLeft.BackgroundTransparency = 1.000
- BlueBarLeft.Position = UDim2.new(0, 2, 1, -4)
- BlueBarLeft.Size = UDim2.new(0.5, -2, 0, 4)
- BlueBarLeft.Image = "rbxasset://textures/ui/Settings/Slider/SelectedBarLeft.png"
- BlueBarLeft.ImageTransparency = 0.873
- BlueBarLeft.ScaleType = Enum.ScaleType.Slice
- BlueBarLeft.SliceCenter = Rect.new(3, 3, 32, 21)
- BlueBarRight.Name = "BlueBarRight"
- BlueBarRight.Parent = SelectedFrame
- BlueBarRight.BackgroundTransparency = 1.000
- BlueBarRight.Position = UDim2.new(0.5, 0, 1, -4)
- BlueBarRight.Size = UDim2.new(0.5, -2, 0, 4)
- BlueBarRight.Image = "rbxasset://textures/ui/Settings/Slider/SelectedBarRight.png"
- BlueBarRight.ImageTransparency = 0.873
- BlueBarRight.ScaleType = Enum.ScaleType.Slice
- BlueBarRight.SliceCenter = Rect.new(3, 3, 32, 21)
- TextButton_2.Parent = SelectedFrame
- TextButton_2.Active = false
- TextButton_2.BackgroundTransparency = 1.000
- TextButton_2.Selectable = false
- TextButton_2.Size = UDim2.new(1, 0, 1, 0)
- TextButton_2.Font = Enum.Font.SourceSansBold
- TextButton_2.Text = "All"
- TextButton_2.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton_2.TextSize = 18.000
- TextButton_2.TextStrokeTransparency = 0.750
- TextButton_3.Parent = BackgroundFrame
- TextButton_3.BackgroundTransparency = 1.000
- TextButton_3.Selectable = false
- TextButton_3.Size = UDim2.new(1, 0, 1, 0)
- TextButton_3.Font = Enum.Font.SourceSansBold
- TextButton_3.Text = ""
- TextButton_3.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton_3.TextSize = 18.000
- TextButton_3.TextStrokeTransparency = 0.750
- Frame_5.Parent = BackgroundFrame
- Frame_5.BackgroundTransparency = 1.000
- Frame_5.Position = UDim2.new(0.800000012, -9, 0.5, -9)
- Frame_5.Size = UDim2.new(0, 18, 0, 18)
- ImageLabel.Parent = Frame_5
- ImageLabel.BackgroundTransparency = 1.000
- ImageLabel.Size = UDim2.new(1, 0, 1, 0)
- ImageLabel.Visible = false
- ImageLabel.Image = "rbxasset://textures/ui/Chat/MessageCounter.png"
- TextLabel_2.Parent = ImageLabel
- TextLabel_2.BackgroundTransparency = 1.000
- TextLabel_2.Position = UDim2.new(0.5, -7, 0.5, -7)
- TextLabel_2.Size = UDim2.new(0, 13, 0, 9)
- TextLabel_2.Font = Enum.Font.SourceSansBold
- TextLabel_2.Text = ""
- TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_2.TextSize = 14.000
- TextLabel_2.TextStrokeTransparency = 0.750
- Frame_System.Name = "Frame_System"
- Frame_System.Parent = ScrollerFrame
- Frame_System.BackgroundTransparency = 1.000
- Frame_System.Position = UDim2.new(1, 0, 0, 0)
- Frame_System.Size = UDim2.new(1, 0, 1, 0)
- BackgroundFrame_2.Name = "BackgroundFrame"
- BackgroundFrame_2.Parent = Frame_System
- BackgroundFrame_2.BackgroundTransparency = 1.000
- BackgroundFrame_2.Position = UDim2.new(0, 1, 0, 1)
- BackgroundFrame_2.Size = UDim2.new(1, -2, 1, -2)
- UnselectedFrame_2.Name = "UnselectedFrame"
- UnselectedFrame_2.Parent = BackgroundFrame_2
- UnselectedFrame_2.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- UnselectedFrame_2.BackgroundTransparency = 0.873
- UnselectedFrame_2.BorderSizePixel = 0
- UnselectedFrame_2.Size = UDim2.new(1, 0, 1, 0)
- TextButton_4.Parent = UnselectedFrame_2
- TextButton_4.Active = false
- TextButton_4.BackgroundTransparency = 1.000
- TextButton_4.Selectable = false
- TextButton_4.Size = UDim2.new(1, 0, 1, 0)
- TextButton_4.Font = Enum.Font.SourceSans
- TextButton_4.Text = "System"
- TextButton_4.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton_4.TextSize = 18.000
- TextButton_4.TextStrokeTransparency = 0.873
- TextButton_4.TextTransparency = 0.873
- SelectedFrame_2.Name = "SelectedFrame"
- SelectedFrame_2.Parent = BackgroundFrame_2
- SelectedFrame_2.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- SelectedFrame_2.BackgroundTransparency = 1.000
- SelectedFrame_2.BorderSizePixel = 0
- SelectedFrame_2.Size = UDim2.new(1, 0, 1, 0)
- SelectedFrame_2.Visible = false
- BackgroundImage_2.Name = "BackgroundImage"
- BackgroundImage_2.Parent = SelectedFrame_2
- BackgroundImage_2.BackgroundColor3 = Color3.fromRGB(93, 100, 115)
- BackgroundImage_2.BackgroundTransparency = 0.873
- BackgroundImage_2.BorderSizePixel = 0
- BackgroundImage_2.Size = UDim2.new(1, 0, 1, 0)
- BackgroundImage_2.ScaleType = Enum.ScaleType.Slice
- BlueBarLeft_2.Name = "BlueBarLeft"
- BlueBarLeft_2.Parent = SelectedFrame_2
- BlueBarLeft_2.BackgroundTransparency = 1.000
- BlueBarLeft_2.Position = UDim2.new(0, 2, 1, -4)
- BlueBarLeft_2.Size = UDim2.new(0.5, -2, 0, 4)
- BlueBarLeft_2.Image = "rbxasset://textures/ui/Settings/Slider/SelectedBarLeft.png"
- BlueBarLeft_2.ImageTransparency = 0.873
- BlueBarLeft_2.ScaleType = Enum.ScaleType.Slice
- BlueBarLeft_2.SliceCenter = Rect.new(3, 3, 32, 21)
- BlueBarRight_2.Name = "BlueBarRight"
- BlueBarRight_2.Parent = SelectedFrame_2
- BlueBarRight_2.BackgroundTransparency = 1.000
- BlueBarRight_2.Position = UDim2.new(0.5, 0, 1, -4)
- BlueBarRight_2.Size = UDim2.new(0.5, -2, 0, 4)
- BlueBarRight_2.Image = "rbxasset://textures/ui/Settings/Slider/SelectedBarRight.png"
- BlueBarRight_2.ImageTransparency = 0.873
- BlueBarRight_2.ScaleType = Enum.ScaleType.Slice
- BlueBarRight_2.SliceCenter = Rect.new(3, 3, 32, 21)
- TextButton_5.Parent = SelectedFrame_2
- TextButton_5.Active = false
- TextButton_5.BackgroundTransparency = 1.000
- TextButton_5.Selectable = false
- TextButton_5.Size = UDim2.new(1, 0, 1, 0)
- TextButton_5.Font = Enum.Font.SourceSansBold
- TextButton_5.Text = "System"
- TextButton_5.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton_5.TextSize = 18.000
- TextButton_5.TextStrokeTransparency = 0.750
- TextButton_6.Parent = BackgroundFrame_2
- TextButton_6.BackgroundTransparency = 1.000
- TextButton_6.Selectable = false
- TextButton_6.Size = UDim2.new(1, 0, 1, 0)
- TextButton_6.Font = Enum.Font.SourceSans
- TextButton_6.Text = ""
- TextButton_6.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton_6.TextSize = 18.000
- TextButton_6.TextStrokeTransparency = 0.750
- Frame_6.Parent = BackgroundFrame_2
- Frame_6.BackgroundTransparency = 1.000
- Frame_6.Position = UDim2.new(0.800000012, -9, 0.5, -9)
- Frame_6.Size = UDim2.new(0, 18, 0, 18)
- ImageLabel_2.Parent = Frame_6
- ImageLabel_2.BackgroundTransparency = 1.000
- ImageLabel_2.Size = UDim2.new(1, 0, 1, 0)
- ImageLabel_2.Visible = false
- ImageLabel_2.Image = "rbxasset://textures/ui/Chat/MessageCounter.png"
- TextLabel_3.Parent = ImageLabel_2
- TextLabel_3.BackgroundTransparency = 1.000
- TextLabel_3.Position = UDim2.new(0.5, -7, 0.5, -7)
- TextLabel_3.Size = UDim2.new(0, 13, 0, 9)
- TextLabel_3.Font = Enum.Font.SourceSansBold
- TextLabel_3.Text = ""
- TextLabel_3.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_3.TextSize = 14.000
- TextLabel_3.TextStrokeTransparency = 0.750
- Frame_7.Parent = Frame_4
- Frame_7.BackgroundTransparency = 1.000
- Frame_7.ClipsDescendants = true
- Frame_7.Size = UDim2.new(1, 0, 1, 0)
- LeaveConfirmationFrame.Name = "LeaveConfirmationFrame"
- LeaveConfirmationFrame.Parent = Frame_7
- LeaveConfirmationFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- LeaveConfirmationFrame.BackgroundTransparency = 0.600
- LeaveConfirmationFrame.BorderSizePixel = 0
- LeaveConfirmationFrame.Position = UDim2.new(0, 0, 1, 0)
- LeaveConfirmationFrame.Size = UDim2.new(1, 0, 1, 0)
- TextButton_7.Parent = LeaveConfirmationFrame
- TextButton_7.BackgroundTransparency = 1.000
- TextButton_7.Selectable = false
- TextButton_7.Size = UDim2.new(1, 0, 1, 0)
- TextButton_7.Text = ""
- TextButton_8.Parent = LeaveConfirmationFrame
- TextButton_8.BackgroundTransparency = 1.000
- TextButton_8.Selectable = false
- TextButton_8.Size = UDim2.new(0.25, 0, 1, 0)
- TextButton_8.Font = Enum.Font.SourceSansBold
- TextButton_8.Text = "Confirm"
- TextButton_8.TextColor3 = Color3.fromRGB(0, 255, 0)
- TextButton_8.TextSize = 18.000
- TextButton_8.TextStrokeTransparency = 0.750
- TextButton_9.Parent = LeaveConfirmationFrame
- TextButton_9.BackgroundTransparency = 1.000
- TextButton_9.Position = UDim2.new(0.75, 0, 0, 0)
- TextButton_9.Selectable = false
- TextButton_9.Size = UDim2.new(0.25, 0, 1, 0)
- TextButton_9.Font = Enum.Font.SourceSansBold
- TextButton_9.Text = "Cancel"
- TextButton_9.TextColor3 = Color3.fromRGB(255, 0, 0)
- TextButton_9.TextSize = 18.000
- TextButton_9.TextStrokeTransparency = 0.750
- TextLabel_4.Parent = LeaveConfirmationFrame
- TextLabel_4.BackgroundTransparency = 1.000
- TextLabel_4.Position = UDim2.new(0.25, 0, 0, 0)
- TextLabel_4.Size = UDim2.new(0.5, 0, 1, 0)
- TextLabel_4.Font = Enum.Font.SourceSansBold
- TextLabel_4.Text = "Leave channel <XX>?"
- TextLabel_4.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_4.TextSize = 18.000
- TextLabel_4.TextStrokeTransparency = 0.750
- PageLeftButton.Name = "PageLeftButton"
- PageLeftButton.Parent = Frame_4
- PageLeftButton.BackgroundTransparency = 1.000
- PageLeftButton.Position = UDim2.new(0, 4, 0.150000006, 0)
- PageLeftButton.Selectable = false
- PageLeftButton.Size = UDim2.new(0.699999988, 0, 0.699999988, 0)
- PageLeftButton.SizeConstraint = Enum.SizeConstraint.RelativeYY
- PageLeftButton.Visible = false
- PageLeftButton.Image = "rbxassetid://471630199"
- PageLeftButton.ImageTransparency = 0.873
- ArrowLabel.Name = "ArrowLabel"
- ArrowLabel.Parent = PageLeftButton
- ArrowLabel.BackgroundTransparency = 1.000
- ArrowLabel.Position = UDim2.new(0.25, 0, 0.300000012, 0)
- ArrowLabel.Rotation = 180.000
- ArrowLabel.Size = UDim2.new(0.400000006, 0, 0.400000006, 0)
- ArrowLabel.Image = "rbxassetid://471630112"
- ArrowLabel.ImageTransparency = 0.873
- PositionalHelper.Name = "PositionalHelper"
- PositionalHelper.Parent = Frame_4
- PositionalHelper.BackgroundTransparency = 1.000
- PositionalHelper.Position = UDim2.new(1, 0, 0.150000006, 0)
- PositionalHelper.Size = UDim2.new(0.699999988, 0, 0.699999988, 0)
- PositionalHelper.SizeConstraint = Enum.SizeConstraint.RelativeYY
- PageRightButton.Name = "PageRightButton"
- PageRightButton.Parent = PositionalHelper
- PageRightButton.BackgroundTransparency = 1.000
- PageRightButton.Position = UDim2.new(-1, -4, 0, 0)
- PageRightButton.Selectable = false
- PageRightButton.Size = UDim2.new(1, 0, 1, 0)
- PageRightButton.Visible = false
- PageRightButton.Image = "rbxassetid://471630199"
- PageRightButton.ImageTransparency = 0.873
- ArrowLabel_2.Name = "ArrowLabel"
- ArrowLabel_2.Parent = PageRightButton
- ArrowLabel_2.BackgroundTransparency = 1.000
- ArrowLabel_2.Position = UDim2.new(0.350000024, 0, 0.300000012, 0)
- ArrowLabel_2.Size = UDim2.new(0.400000006, 0, 0.400000006, 0)
- ArrowLabel_2.Image = "rbxassetid://471630112"
- ArrowLabel_2.ImageTransparency = 0.873
- ChatChannelParentFrame.Name = "ChatChannelParentFrame"
- ChatChannelParentFrame.Parent = Frame
- ChatChannelParentFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- ChatChannelParentFrame.BackgroundTransparency = 1
- ChatChannelParentFrame.BorderSizePixel = 0
- ChatChannelParentFrame.Position = UDim2.new(0, 0, 0, 2)
- ChatChannelParentFrame.Size = UDim2.new(1, 0, 1, -46)
- ChatChannelParentFrame.MouseEnter:connect(function()
- ChatChannelParentFrame.BackgroundTransparency = 0.6
- ImageButton.BackgroundTransparency = 0.6
- Frame_2.BackgroundTransparency = 0.6
- BoxFrame.BackgroundTransparency = 0.6
- TextLabel.TextTransparency = 0.4
- ChatBar.TextTransparency = 0.4
- Scroller.ScrollBarImageTransparency = 0.4
- end)
- ChatChannelParentFrame.MouseLeave:connect(function()
- ChatChannelParentFrame.BackgroundTransparency = 1
- ImageButton.BackgroundTransparency = 1
- Frame_2.BackgroundTransparency = 1
- BoxFrame.BackgroundTransparency = 1
- TextLabel.TextTransparency = 1
- ChatBar.TextTransparency = 1
- Scroller.ScrollBarImageTransparency = 1
- end)
- Frame_MessageLogDisplay.Name = "Frame_MessageLogDisplay"
- Frame_MessageLogDisplay.Parent = ChatChannelParentFrame
- Frame_MessageLogDisplay.BackgroundTransparency = 1.000
- Frame_MessageLogDisplay.Size = UDim2.new(1, 0, 1, 0)
- Scroller.Name = "Scroller"
- Scroller.Parent = Frame_MessageLogDisplay
- Scroller.Active = true
- Scroller.BackgroundTransparency = 1.000
- Scroller.BorderSizePixel = 0
- Scroller.Position = UDim2.new(0, 0, 0, 3)
- Scroller.Selectable = false
- Scroller.Size = UDim2.new(1, -4, 1, -6)
- Scroller.CanvasSize = UDim2.new(0, 0, 0, 18)
- Scroller.ScrollBarThickness = 4
- Scroller.ScrollingEnabled = true
- Scroller.ZIndex = 5
- UIListLayout.Parent = Scroller
- UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- Frame_8.Parent = Scroller
- Frame_8.BackgroundTransparency = 1.000
- Frame_8.LayoutOrder = 1
- Frame_8.Size = UDim2.new(1, 0, 0, 18)
- TextLabel_5.Parent = Frame_8
- TextLabel_5.BackgroundTransparency = 1.000
- TextLabel_5.ClipsDescendants = true
- TextLabel_5.Position = UDim2.new(0, 8, 0, 0)
- TextLabel_5.Size = UDim2.new(1, -14, 1, 0)
- TextLabel_5.Font = Enum.Font.SourceSansBold
- TextLabel_5.Text = "Chat '/?' or '/help' for a list of chat commands."
- TextLabel_5.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_5.TextSize = 18.000
- TextLabel_5.TextStrokeTransparency = 0.750
- TextLabel_5.TextWrapped = true
- TextLabel_5.TextXAlignment = Enum.TextXAlignment.Left
- TextLabel_5.TextYAlignment = Enum.TextYAlignment.Top
- ImageButton.Parent = Frame
- ImageButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- ImageButton.BackgroundTransparency = 1
- ImageButton.BorderSizePixel = 0
- ImageButton.Position = UDim2.new(1, -42, 1, -42)
- ImageButton.Selectable = false
- ImageButton.Size = UDim2.new(0, 42, 0, 42)
- ImageButton.Visible = false
- ImageLabel_3.Parent = ImageButton
- ImageLabel_3.BackgroundTransparency = 1.000
- ImageLabel_3.Position = UDim2.new(0.200000003, 0, 0.200000003, 0)
- ImageLabel_3.Size = UDim2.new(0.800000012, 0, 0.800000012, 0)
- ImageLabel_3.Image = "rbxassetid://261880743"
- ImageLabel_3.ImageTransparency = 0.873
- -------------------------------------------------------------------------------------------------------------------------------------------------
- --Properties:
- unread_counter = 0
- local UserInputService = game:GetService("UserInputService")
- rs = game:GetService"RunService"
- UserInputService.InputBegan:Connect(function(input, gameProcessed)
- if ChatBar:IsFocused() == true then
- TextLabel.Visible = false
- --TextLabel.Text = ""
- Frame.Visible = true
- ChatIcon2.ImageColor3 = Color3.new(0, 255, 0)
- ChatChannelParentFrame.BackgroundTransparency = 0.6
- ImageButton.BackgroundTransparency = 0.6
- Frame_2.BackgroundTransparency = 0.6
- BoxFrame.BackgroundTransparency = 0.6
- TextLabel.TextTransparency = 0.4
- ChatBar.TextTransparency = 0.4
- ChatCounterText2.Text = ""
- ChatCounter2.Visible = false
- unread_counter = 0
- Scroller.ScrollBarImageTransparency = 0.4
- --[[if input.KeyCode == Enum.KeyCode.Return then
- if string.len(ChatBar.Text) == 0 then
- else
- local A_1 = ChatBar.Text
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(game.Players.LocalPlayer.Name,ChatBar.Text)
- ChatBar.Text = ""
- ChatChannelParentFrame.BackgroundTransparency = 1
- ImageButton.BackgroundTransparency = 1
- Frame_2.BackgroundTransparency = 1
- BoxFrame.BackgroundTransparency = 1
- TextLabel.TextTransparency = 1
- ChatBar.TextTransparency = 1
- end
- TextLabel.Visible = true
- Scroller.ScrollBarImageTransparency = 1
- end--]]
- --print(ChatBar:IsFocused())
- elseif ChatBar:IsFocused() == false and input.KeyCode == Enum.KeyCode.Return then
- ChatBar.Text = ""
- ChatChannelParentFrame.BackgroundTransparency = 1
- ImageButton.BackgroundTransparency = 1
- Frame_2.BackgroundTransparency = 1
- BoxFrame.BackgroundTransparency = 1
- TextLabel.TextTransparency = 1
- ChatBar.TextTransparency = 1
- TextLabel.Visible = true
- Scroller.ScrollBarImageTransparency = 1
- end
- end)
- --[[ChatBar.Focused:Connect(function()
- ChatBar:CaptureFocus()
- TextLabel.Visible = false
- --TextLabel.Text = ""
- Frame.Visible = true
- ChatIcon2.ImageColor3 = Color3.new(0, 255, 0)
- ChatChannelParentFrame.BackgroundTransparency = 0.6
- ImageButton.BackgroundTransparency = 0.6
- Frame_2.BackgroundTransparency = 0.6
- BoxFrame.BackgroundTransparency = 0.6
- TextLabel.TextTransparency = 0.4
- ChatBar.TextTransparency = 0.4
- ChatCounterText2.Text = ""
- ChatCounter2.Visible = false
- unread_counter = 0
- Scroller.ScrollBarImageTransparency = 0.4
- end)--]]
- ChatBar.FocusLost:Connect(function(enterPressed)
- if enterPressed then
- if string.len(ChatBar.Text) == 0 then
- else
- --[[if ChatBar.Text:sub(1, 6) == "/e de " then
- local A_1 = ChatBar.Text:sub(7)
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- end--]]
- for i,plr in pairs(Players:GetPlayers()) do
- if ChatBar.Text:sub(1, 6) == "/e de " and plr.Name == game.Players.LocalPlayer.Name then --German
- local LocalMessage = ChatBar.Text:sub(7,#ChatBar.Text)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-de&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(game.Players.LocalPlayer.Name,LocalTranslate_data.text[1])
- elseif ChatBar.Text:sub(1, 6) == "/e ru " and plr.Name == game.Players.LocalPlayer.Name then --Russian
- local LocalMessage = ChatBar.Text:sub(7,#ChatBar.Text)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-ru&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(game.Players.LocalPlayer.Name,LocalTranslate_data.text[1])
- elseif ChatBar.Text:sub(1, 6) == "/e fr " and plr.Name == game.Players.LocalPlayer.Name then --France
- local LocalMessage = ChatBar.Text:sub(7,#ChatBar.Text)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-fr&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(game.Players.LocalPlayer.Name,LocalTranslate_data.text[1])
- elseif ChatBar.Text:sub(1, 6) == "/e es " and plr.Name == game.Players.LocalPlayer.Name then --Spanish
- local LocalMessage = ChatBar.Text:sub(7,#ChatBar.Text)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-es&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(game.Players.LocalPlayer.Name,LocalTranslate_data.text[1])
- elseif ChatBar.Text:sub(1, 6) == "/e hu " and plr.Name == game.Players.LocalPlayer.Name then --Hungarian
- local LocalMessage = ChatBar.Text:sub(7,#ChatBar.Text)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-hu&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(game.Players.LocalPlayer.Name,LocalTranslate_data.text[1])
- elseif ChatBar.Text:sub(1, 6) == "/e tr " and plr.Name == game.Players.LocalPlayer.Name then --Turkish
- local LocalMessage = ChatBar.Text:sub(7,#ChatBar.Text)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-tr&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(game.Players.LocalPlayer.Name,LocalTranslate_data.text[1])
- elseif ChatBar.Text:sub(1, 6) == "/e ja " and plr.Name == game.Players.LocalPlayer.Name then --Japanese
- local LocalMessage = ChatBar.Text:sub(7,#ChatBar.Text)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-ja&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(game.Players.LocalPlayer.Name,LocalTranslate_data.text[1])
- elseif ChatBar.Text:sub(1, 6) == "/e no " and plr.Name == game.Players.LocalPlayer.Name then --Norvegian
- local LocalMessage = ChatBar.Text:sub(7,#ChatBar.Text)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-no&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(game.Players.LocalPlayer.Name,LocalTranslate_data.text[1])
- elseif ChatBar.Text:sub(1, 6) == "/e ro " and plr.Name == game.Players.LocalPlayer.Name then --Romanian
- local LocalMessage = ChatBar.Text:sub(7,#ChatBar.Text)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-ro&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(game.Players.LocalPlayer.Name,LocalTranslate_data.text[1])
- elseif ChatBar.Text:sub(1, 6) == "/e pt " and plr.Name == game.Players.LocalPlayer.Name then --Portoguese
- local LocalMessage = ChatBar.Text:sub(7,#ChatBar.Text)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-pt&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(game.Players.LocalPlayer.Name,LocalTranslate_data.text[1])
- elseif ChatBar.Text:sub(1, 6) == "/e zh " and plr.Name == game.Players.LocalPlayer.Name then --Chinese
- local LocalMessage = ChatBar.Text:sub(7,#ChatBar.Text)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-zh&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(game.Players.LocalPlayer.Name,LocalTranslate_data.text[1])
- elseif ChatBar.Text:sub(1, 6) == "/e ko " and plr.Name == game.Players.LocalPlayer.Name then --Chinese
- local LocalMessage = ChatBar.Text:sub(7,#ChatBar.Text)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-ko&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(game.Players.LocalPlayer.Name,LocalTranslate_data.text[1])
- else
- if plr.Name == game.Players.LocalPlayer.Name then
- local A_1 = ChatBar.Text
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(game.Players.LocalPlayer.Name,ChatBar.Text)
- end
- end
- end
- end
- end
- end)
- --[[function resizeChatbox()
- local property
- local TextService = game:GetService("TextService")
- local frame = TextService:GetTextSize(ChatBar.Text, 18, Enum.Font.SourceSansBold, Vector2.new(2000, 13))
- if property == "Text" or property == "AbsoluteSize" then
- if not ChatBar.TextFits or ChatBar.TextBounds.Y < ChatBar.AbsoluteSize.Y and not sizeChangeInProgress then
- sizeChangeInProgress = true
- wait()
- local frame = TextService:GetTextSize(ChatBar.Text, 18, Enum.Font.SourceSansBold, Vector2.new(2000, 13))
- local textLines
- if frame.X == 0 then
- textLines = 1
- else
- textLines = math.ceil(frame.X/ChatBar.TextBounds.X)
- end
- local chatSize = 13 * textLines
- ChatBar.Size = UDim2.new(.8, 0, 0, chatSize)
- ChatBar.Position = UDim2.new(.1, 0, 1, -10 - chatSize)
- BoxFrame.Position = UDim2.new(0, 0, 1, -22 - chatSize)
- sizeChangeInProgress = false
- end
- end
- end--]]
- local function updateSize()
- local TextService = game:GetService("TextService")
- local frame = TextService:GetTextSize(ChatBar.Text, 18, Enum.Font.SourceSansBold, Vector2.new(2000, 18))
- local textLines
- if frame.X == 0 then
- textLines = 1
- else
- textLines = math.ceil(frame.X/ChatBar.TextBounds.X)
- end
- local chatSize = 18 * textLines
- ChatBar.Size = UDim2.new(0, 355, 0, chatSize)
- --ChatBar.Position = UDim2.new(0, 0, 1.5, -10 - chatSize)
- BoxFrame.Size = UDim2.new(0, 370, 0.25, 0 + chatSize)
- Frame_3.Size = UDim2.new(1, -10, 1, -10 + chatSize+0.25)
- Frame_2.Size = UDim2.new(1, 0, 0.56, chatSize*1.25)
- --BoxFrame.Position = UDim2.new(0.018, 0, 0.25, -22 + chatSize)
- end
- ChatBar:GetPropertyChangedSignal("TextBounds"):Connect(updateSize)
- ChatBar.Changed:connect(function()
- ChatBar.Text = ChatBar.Text:sub(1,234);
- --[[if ChatBar.Text:sub(1, 5) == "/e de" then
- local A_1 = "Cómo estás?"
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- end--]]
- end)
- ChatLog = function(plr)
- plr.Chatted:Connect(function(Message)
- if Message:sub(1, 3) == "/t " or Message:sub(1, 3) == "/w " or Message:sub(1, 3) == "/e " then
- else
- --response_lang = {}
- local autoDetect = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/detect?key=".._G.API_KEY.."&text="..HttpService:UrlEncode(Message))
- local detect_lan = HttpService:JSONDecode(autoDetect)
- --table.insert(response_lang, detect_lan.lang)
- local translatedText = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang="..detect_lan.lang.."-en&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(Message))
- local data = HttpService:JSONDecode(translatedText)
- CreateLabel(plr.Name,Message)
- if detect_lan.lang == "de" or detect_lan.lang == "ru" or detect_lan.lang == "fr" or detect_lan.lang == "es" or detect_lan.lang == "hu" or detect_lan.lang == "tr" or detect_lan.lang == "ja" or detect_lan.lang == "no" or detect_lan.lang == "ro" or detect_lan.lang == "pt" or detect_lan.lang == "zh" or detect_lan.lang == "ko" then
- game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{
- Text = "Use /e "..tostring(detect_lan.lang).." [text without brackets] to respond.",
- Color = Color3.new(1, 0, 0)
- })
- game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{
- Text = plr.Name..": "..data.text[1],
- Color = Color3.new(1, 0, 0)
- })
- CreateTLabel(plr.Name,data.text[1])
- CreateTLabel("ChatTranslator","Use /e "..tostring(detect_lan.lang).." [text without brackets] to respond.")
- end
- unread_counter = unread_counter + 1
- ChatCounterText2.Text = unread_counter
- end
- if Message:sub(1, 6) == "/e de " and plr.Name == game.Players.LocalPlayer.Name then --German
- local LocalMessage = Message:sub(7,#Message)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-de&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(plr.Name,LocalTranslate_data.text[1])
- end
- if Message:sub(1, 6) == "/e ru " and plr.Name == game.Players.LocalPlayer.Name then --Russian
- local LocalMessage = Message:sub(7,#Message)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-ru&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(plr.Name,LocalTranslate_data.text[1])
- end
- if Message:sub(1, 6) == "/e fr " and plr.Name == game.Players.LocalPlayer.Name then --France
- local LocalMessage = Message:sub(7,#Message)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-fr&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(plr.Name,LocalTranslate_data.text[1])
- end
- if Message:sub(1, 6) == "/e es " and plr.Name == game.Players.LocalPlayer.Name then --Spanish
- local LocalMessage = Message:sub(7,#Message)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-es&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(plr.Name,LocalTranslate_data.text[1])
- end
- if Message:sub(1, 6) == "/e hu " and plr.Name == game.Players.LocalPlayer.Name then --Hungarian
- local LocalMessage = Message:sub(7,#Message)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-hu&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(plr.Name,LocalTranslate_data.text[1])
- end
- if Message:sub(1, 6) == "/e tr " and plr.Name == game.Players.LocalPlayer.Name then --Turkish
- local LocalMessage = Message:sub(7,#Message)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-tr&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(plr.Name,LocalTranslate_data.text[1])
- end
- if Message:sub(1, 6) == "/e ja " and plr.Name == game.Players.LocalPlayer.Name then --Japanese
- local LocalMessage = Message:sub(7,#Message)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-ja&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(plr.Name,LocalTranslate_data.text[1])
- end
- if Message:sub(1, 6) == "/e no " and plr.Name == game.Players.LocalPlayer.Name then --Norvegian
- local LocalMessage = Message:sub(7,#Message)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-no&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(plr.Name,LocalTranslate_data.text[1])
- end
- if Message:sub(1, 6) == "/e ro " and plr.Name == game.Players.LocalPlayer.Name then --Romanian
- local LocalMessage = Message:sub(7,#Message)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-ro&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(plr.Name,LocalTranslate_data.text[1])
- end
- if Message:sub(1, 6) == "/e pt " and plr.Name == game.Players.LocalPlayer.Name then --Portoguese
- local LocalMessage = Message:sub(7,#Message)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-pt&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(plr.Name,LocalTranslate_data.text[1])
- end
- if Message:sub(1, 6) == "/e zh " and plr.Name == game.Players.LocalPlayer.Name then --Chinese
- local LocalMessage = Message:sub(7,#Message)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-zh&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(plr.Name,LocalTranslate_data.text[1])
- end
- if Message:sub(1, 6) == "/e ko " and plr.Name == game.Players.LocalPlayer.Name then --Korean
- local LocalMessage = Message:sub(7,#Message)
- local LocalTranslate = game:HttpGet("https://translate.yandex.net/api/v1.5/tr.json/translate?lang=en-ko&key=".._G.API_KEY.."&text="..HttpService:UrlEncode(LocalMessage))
- local LocalTranslate_data = HttpService:JSONDecode(LocalTranslate)
- local A_1 = LocalTranslate_data.text[1]
- local A_2 = "All"
- local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest
- Event:FireServer(A_1, A_2)
- CreateLabel(plr.Name,LocalTranslate_data.text[1])
- end
- end)
- end
- for _, plr in pairs(game.Players:GetChildren()) do
- if plr.ClassName == "Player" then
- ChatLog(plr)
- end
- end
- game.Players.PlayerAdded:connect(function(player)
- ChatLog(player)
- end)
- Chat2.Name = "Chat"
- Chat2.Parent = game.CoreGui.RobloxGui.TopBarContainer
- Chat2.BackgroundTransparency = 1.000
- Chat2.Position = UDim2.new(0, 150, 0, 0)
- Chat2.Size = UDim2.new(0, 50, 0, 36)
- Chat2.AutoButtonColor = false
- Chat2.MouseButton1Click:Connect(function()
- if Frame.Visible then
- unread_counter = 0
- ChatCounter2.Visible = true
- Frame.Visible = false
- ChatIcon2.ImageColor3 = Color3.new(255, 255, 255)
- ChatChannelParentFrame.BackgroundTransparency = 1
- ImageButton.BackgroundTransparency = 1
- Frame_2.BackgroundTransparency = 1
- BoxFrame.BackgroundTransparency = 1
- TextLabel.TextTransparency = 1
- elseif not Frame.Visible then
- ChatCounterText2.Text = ""
- ChatCounter2.Visible = false
- unread_counter = 0
- Frame.Visible = true
- ChatIcon2.ImageColor3 = Color3.new(0, 255, 0)
- ChatChannelParentFrame.BackgroundTransparency = 0.6
- ImageButton.BackgroundTransparency = 0.6
- Frame_2.BackgroundTransparency = 0.6
- BoxFrame.BackgroundTransparency = 0.6
- TextLabel.TextTransparency = 0.4
- end
- end)
- ChatIcon2.Name = "ChatIcon"
- ChatIcon2.Parent = Chat2
- ChatIcon2.BackgroundTransparency = 1.000
- ChatIcon2.Position = UDim2.new(0.5, -14, 0.5, -13)
- ChatIcon2.Size = UDim2.new(0, 28, 0, 27)
- ChatIcon2.Image = "rbxasset://textures/ui/Chat/Chat.png"
- ChatCounter2.Name = "ChatCounter"
- ChatCounter2.Parent = ChatIcon2
- ChatCounter2.BackgroundTransparency = 1.000
- ChatCounter2.Position = UDim2.new(1, -12, 0, -4)
- ChatCounter2.Size = UDim2.new(0, 18, 0, 18)
- ChatCounter2.Visible = true
- ChatCounter2.Image = "rbxasset://textures/ui/Chat/MessageCounter.png"
- ChatCounterText2.Name = "ChatCounterText"
- ChatCounterText2.Parent = ChatCounter2
- ChatCounterText2.BackgroundTransparency = 1.000
- ChatCounterText2.BorderSizePixel = 0
- ChatCounterText2.Position = UDim2.new(0.5, -7, 0.5, -7)
- ChatCounterText2.Size = UDim2.new(0, 13, 0, 9)
- ChatCounterText2.Font = Enum.Font.SourceSansBold
- ChatCounterText2.Text = ""
- ChatCounterText2.TextColor3 = Color3.fromRGB(255, 255, 255)
- ChatCounterText2.TextSize = 14.000
Add Comment
Please, Sign In to add comment