· 5 years ago · May 24, 2020, 12:34 AM
1
2
3local Secret_Key = 926549358735
4
5local Players = game:GetService("Players")
6local LP = Players.LocalPlayer
7local Chat = Instance.new("ScreenGui")
8local Frame = Instance.new("Frame")
9local ChatBarParentFrame = Instance.new("Frame")
10local Frame_2 = Instance.new("Frame")
11local BoxFrame = Instance.new("Frame")
12local Frame_3 = Instance.new("Frame")
13local ChatBar = Instance.new("TextBox")
14local MessageMode = Instance.new("TextButton")
15local TextLabel = Instance.new("TextLabel")
16local ChatChannelParentFrame = Instance.new("Frame")
17local Frame_MessageLogDisplay = Instance.new("Frame")
18local Scroller = Instance.new("ScrollingFrame")
19local UIListLayout = Instance.new("UIListLayout")
20local Frame_8 = Instance.new("Frame")
21local TextLabel_5 = Instance.new("TextLabel")
22local ImageButton = Instance.new("ImageButton")
23local ImageLabel_3 = Instance.new("ImageLabel")
24
25function CreateLabel(Name, Text)
26 local sf = Scroller.Frame
27 local sf2 = Scroller
28 local alls = 20
29 for i,v in pairs(sf:GetChildren()) do
30 if v then
31 alls = v.Size.Y.Offset + alls
32 end
33 if not v then
34 alls = 0
35 end
36 end
37 local tl = Instance.new('TextLabel', sf)
38 local il = Instance.new('Frame', tl)
39 tl.Name = Name
40 tl.Text = "["..Name.."]: "..Text
41 tl.Size = UDim2.new(0,355,0,84)
42 tl.BackgroundTransparency = 1
43 tl.Font = Enum.Font.SourceSansBold
44 tl.ClipsDescendants = true
45 tl.Position = UDim2.new(0,8,0,alls)
46 tl.TextTransparency = 1
47 tl.TextScaled = false
48 tl.TextSize = 18
49 tl.TextWrapped = true
50 tl.TextXAlignment = Enum.TextXAlignment.Left
51 tl.TextYAlignment = Enum.TextYAlignment.Top
52 il.BackgroundTransparency = 1
53 il.BorderSizePixel = 0
54 il.Size = UDim2.new(0,16,1,0)
55 il.Position = UDim2.new(0,316,0,0)
56 tl.TextStrokeTransparency = 0.750
57 tl.TextColor3 = Color3.fromRGB(255,255,255)
58 tl.Size = UDim2.new(0,355,0,tl.TextBounds.Y)
59 sf2.CanvasSize = UDim2.new(0,0,0,alls+tl.TextBounds.Y)
60 sf2.CanvasPosition = Vector2.new(0,sf2.CanvasPosition.Y+tl.TextBounds.Y)
61 local size2 = sf2.CanvasSize.Y.Offset
62 tl.TextTransparency = 0
63end
64
65----------------------------------------------------------------------
66
67local Chat2 = Instance.new("ImageButton")
68local ChatIcon2 = Instance.new("ImageLabel")
69local ChatCounter2 = Instance.new("ImageLabel")
70local ChatCounterText2 = Instance.new("TextLabel")
71
72TMouse = game.Players.LocalPlayer:GetMouse()
73TMouse.KeyDown:connect(function(Key)
74 if (Key=="'") then
75 ChatBar:CaptureFocus()
76 spawn(function()
77 repeat ChatBar.Text = '' until ChatBar.Text == ''
78 end)
79 end
80end)
81
82Chat.Name = "CustomChat"
83Chat.Parent = game.Players[game.Players.LocalPlayer.Name].PlayerGui
84Chat.DisplayOrder = 6
85Chat.ResetOnSpawn = false
86
87Frame.Parent = Chat
88Frame.BackgroundTransparency = 1.000
89Frame.Size = UDim2.new(0.300000012, 0, 0.275945932, 0)
90Frame.Visible = false
91Frame.Position = UDim2.new(0, 0, 0.6, 0)
92
93ChatBarParentFrame.Name = "ChatBarParentFrame"
94ChatBarParentFrame.Parent = Frame
95ChatBarParentFrame.BackgroundTransparency = 1.000
96ChatBarParentFrame.Position = UDim2.new(0, 0, 1, -42)
97ChatBarParentFrame.Size = UDim2.new(1, 0, 0, 42)
98
99Frame_2.Parent = ChatBarParentFrame
100Frame_2.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
101Frame_2.BackgroundTransparency = 1
102Frame_2.BorderSizePixel = 0
103Frame_2.Size = UDim2.new(1, 0, 1, 0)
104
105BoxFrame.Name = "BoxFrame"
106BoxFrame.Parent = Frame_2
107BoxFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
108BoxFrame.BackgroundTransparency = 1
109BoxFrame.BorderSizePixel = 0
110BoxFrame.Position = UDim2.new(0, 7, 0, 7)
111BoxFrame.Size = UDim2.new(1, -14, 1, -14)
112
113Frame_3.Parent = BoxFrame
114Frame_3.BackgroundTransparency = 1.000
115Frame_3.Position = UDim2.new(0, 5, 0, 5)
116Frame_3.Size = UDim2.new(1, -10, 1, -10)
117
118ChatBar.Name = "ChatBar"
119ChatBar.Parent = Frame_3
120ChatBar.BackgroundTransparency = 1.000
121ChatBar.Selectable = false
122ChatBar.Size = UDim2.new(0,370,0,28)
123ChatBar.ClearTextOnFocus = false
124ChatBar.Font = Enum.Font.SourceSansBold
125ChatBar.Text = ""
126ChatBar.TextColor3 = Color3.fromRGB(0, 0, 0)
127ChatBar.TextSize = 18.000
128ChatBar.TextTransparency = 1
129ChatBar.TextWrapped = true
130ChatBar.TextScaled = false
131ChatBar.TextXAlignment = Enum.TextXAlignment.Left
132ChatBar.TextYAlignment = Enum.TextYAlignment.Top
133
134MessageMode.Name = "MessageMode"
135MessageMode.Parent = Frame_3
136MessageMode.BackgroundTransparency = 1.000
137MessageMode.Selectable = false
138MessageMode.Font = Enum.Font.SourceSansBold
139MessageMode.Text = ""
140MessageMode.TextColor3 = Color3.fromRGB(35, 76, 142)
141MessageMode.TextSize = 18.000
142MessageMode.TextTransparency = 0.810
143MessageMode.TextWrapped = true
144MessageMode.TextXAlignment = Enum.TextXAlignment.Left
145
146TextLabel.Parent = Frame_3
147TextLabel.BackgroundTransparency = 1.000
148TextLabel.Size = UDim2.new(1, 0, 1, 0)
149TextLabel.Font = Enum.Font.SourceSansBold
150TextLabel.Text = "To chat click here or press ' key"
151TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
152TextLabel.TextSize = 18.000
153TextLabel.TextTransparency = 1
154TextLabel.TextWrapped = true
155TextLabel.TextXAlignment = Enum.TextXAlignment.Left
156TextLabel.TextYAlignment = Enum.TextYAlignment.Top
157
158ChatChannelParentFrame.Name = "ChatChannelParentFrame"
159ChatChannelParentFrame.Parent = Frame
160ChatChannelParentFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
161ChatChannelParentFrame.BackgroundTransparency = 1
162ChatChannelParentFrame.BorderSizePixel = 0
163ChatChannelParentFrame.Position = UDim2.new(0, 0, 0, 2)
164ChatChannelParentFrame.Size = UDim2.new(1, 0, 1, -46)
165Frame.MouseEnter:connect(function()
166 ChatChannelParentFrame.BackgroundTransparency = 0.6
167 ImageButton.BackgroundTransparency = 0.6
168 Frame_2.BackgroundTransparency = 0.6
169 BoxFrame.BackgroundTransparency = 0.6
170 TextLabel.TextTransparency = 0.4
171 ChatBar.TextTransparency = 0.4
172 Scroller.ScrollBarImageTransparency = 0.4
173end)
174Frame.MouseLeave:connect(function()
175 ChatChannelParentFrame.BackgroundTransparency = 1
176 ImageButton.BackgroundTransparency = 1
177 Frame_2.BackgroundTransparency = 1
178 BoxFrame.BackgroundTransparency = 1
179 TextLabel.TextTransparency = 1
180 ChatBar.TextTransparency = 1
181 Scroller.ScrollBarImageTransparency = 1
182end)
183
184Frame_MessageLogDisplay.Name = "Frame_MessageLogDisplay"
185Frame_MessageLogDisplay.Parent = ChatChannelParentFrame
186Frame_MessageLogDisplay.BackgroundTransparency = 1.000
187Frame_MessageLogDisplay.Size = UDim2.new(1, 0, 1, 0)
188
189Scroller.Name = "Scroller"
190Scroller.Parent = Frame_MessageLogDisplay
191Scroller.Active = true
192Scroller.BackgroundTransparency = 1.000
193Scroller.BorderSizePixel = 0
194Scroller.Position = UDim2.new(0, 0, 0, 3)
195Scroller.Selectable = false
196Scroller.Size = UDim2.new(1, -4, 1, -6)
197Scroller.CanvasSize = UDim2.new(0, 0, 0, 18)
198Scroller.ScrollBarThickness = 4
199Scroller.ScrollingEnabled = true
200Scroller.ZIndex = 5
201
202UIListLayout.Parent = Scroller
203UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
204
205Frame_8.Parent = Scroller
206Frame_8.BackgroundTransparency = 1.000
207Frame_8.LayoutOrder = 1
208Frame_8.Size = UDim2.new(1, 0, 0, 18)
209
210TextLabel_5.Parent = Frame_8
211TextLabel_5.BackgroundTransparency = 1.000
212TextLabel_5.ClipsDescendants = true
213TextLabel_5.Position = UDim2.new(0, 8, 0, 0)
214TextLabel_5.Size = UDim2.new(1, -14, 1, 0)
215TextLabel_5.Font = Enum.Font.SourceSansBold
216TextLabel_5.Text = "Encrypted chat between Exploiters."
217TextLabel_5.TextColor3 = Color3.fromRGB(255, 255, 255)
218TextLabel_5.TextSize = 18.000
219TextLabel_5.TextStrokeTransparency = 0.750
220TextLabel_5.TextWrapped = true
221TextLabel_5.TextXAlignment = Enum.TextXAlignment.Left
222TextLabel_5.TextYAlignment = Enum.TextYAlignment.Top
223
224unread_counter = 0
225local UserInputService = game:GetService("UserInputService")
226rs = game:GetService"RunService"
227
228UserInputService.InputBegan:Connect(function(input, gameProcessed)
229 if ChatBar:IsFocused() == true then
230 TextLabel.Visible = false
231 Frame.Visible = true
232 ChatIcon2.ImageColor3 = Color3.new(0, 255, 0)
233 ChatChannelParentFrame.BackgroundTransparency = 0.6
234 ImageButton.BackgroundTransparency = 0.6
235 Frame_2.BackgroundTransparency = 0.6
236 BoxFrame.BackgroundTransparency = 0.6
237 TextLabel.TextTransparency = 0.4
238 ChatBar.TextTransparency = 0.4
239 ChatCounterText2.Text = ""
240 ChatCounter2.Visible = false
241 unread_counter = 0
242 Scroller.ScrollBarImageTransparency = 0.4
243 elseif ChatBar:IsFocused() == false and input.KeyCode == Enum.KeyCode.Return then
244 ChatBar.Text = ""
245 ChatChannelParentFrame.BackgroundTransparency = 1
246 ImageButton.BackgroundTransparency = 1
247 Frame_2.BackgroundTransparency = 1
248 BoxFrame.BackgroundTransparency = 1
249 TextLabel.TextTransparency = 1
250 ChatBar.TextTransparency = 1
251 TextLabel.Visible = true
252 Scroller.ScrollBarImageTransparency = 1
253 end
254end)
255
256ChatBar.FocusLost:Connect(function(enterPressed)
257 if enterPressed then
258 if string.len(ChatBar.Text) ~= 0 then
259 LP.OsPlatform = GenMsg(ChatBar.Text)
260 end
261 end
262end)
263
264ChatBar.Changed:connect(function()
265 ChatBar.Text = ChatBar.Text:sub(1,234);
266end)
267
268ChatLog = function(plr)
269 plr:GetPropertyChangedSignal("OsPlatform"):Connect(function()
270 if CheckMsg(plr.OsPlatform) then
271 CreateLabel(plr.Name,CheckMsg(plr.OsPlatform))
272 unread_counter = unread_counter + 1
273 ChatCounterText2.Text = unread_counter
274 end
275 end)
276end
277
278Chat2.Name = "Chat"
279Chat2.Parent = game.CoreGui.TopBar
280Chat2.BackgroundTransparency = 1.000
281Chat2.Position = UDim2.new(0, 150, 0, 0)
282Chat2.Size = UDim2.new(0, 50, 0, 36)
283Chat2.AutoButtonColor = false
284Chat2.MouseButton1Click:Connect(function()
285 if Frame.Visible then
286 unread_counter = 0
287 ChatCounter2.Visible = true
288 Frame.Visible = false
289 ChatIcon2.ImageColor3 = Color3.new(255, 255, 255)
290 ChatChannelParentFrame.BackgroundTransparency = 1
291 ImageButton.BackgroundTransparency = 1
292 Frame_2.BackgroundTransparency = 1
293 BoxFrame.BackgroundTransparency = 1
294 TextLabel.TextTransparency = 1
295 elseif not Frame.Visible then
296 ChatCounterText2.Text = ""
297 ChatCounter2.Visible = false
298 unread_counter = 0
299 Frame.Visible = true
300 ChatIcon2.ImageColor3 = Color3.new(0, 255, 0)
301 ChatChannelParentFrame.BackgroundTransparency = 0.6
302 ImageButton.BackgroundTransparency = 0.6
303 Frame_2.BackgroundTransparency = 0.6
304 BoxFrame.BackgroundTransparency = 0.6
305 TextLabel.TextTransparency = 0.4
306 end
307end)
308
309ChatIcon2.Name = "ChatIcon"
310ChatIcon2.Parent = Chat2
311ChatIcon2.BackgroundTransparency = 1.000
312ChatIcon2.Position = UDim2.new(0.5, -14, 0.5, -13)
313ChatIcon2.Size = UDim2.new(0, 28, 0, 27)
314ChatIcon2.Image = "rbxasset://textures/ui/Chat/Chat.png"
315
316ChatCounter2.Name = "ChatCounter"
317ChatCounter2.Parent = ChatIcon2
318ChatCounter2.BackgroundTransparency = 1.000
319ChatCounter2.Position = UDim2.new(1, -12, 0, -4)
320ChatCounter2.Size = UDim2.new(0, 18, 0, 18)
321ChatCounter2.Visible = true
322ChatCounter2.Image = "rbxasset://textures/ui/Chat/MessageCounter.png"
323
324
325ChatCounterText2.Name = "ChatCounterText"
326ChatCounterText2.Parent = ChatCounter2
327ChatCounterText2.BackgroundTransparency = 1.000
328ChatCounterText2.BorderSizePixel = 0
329ChatCounterText2.Position = UDim2.new(0.5, -7, 0.5, -7)
330ChatCounterText2.Size = UDim2.new(0, 13, 0, 9)
331ChatCounterText2.Font = Enum.Font.SourceSansBold
332ChatCounterText2.Text = ""
333ChatCounterText2.TextColor3 = Color3.fromRGB(255, 255, 255)
334ChatCounterText2.TextSize = 14.000
335
336function Match(str, with)
337 local str, with = tostring(str), tostring(with)
338 if (string.match(str, with) and true or false) then
339 return true or false
340 end
341end
342function SplitStr(str, div)
343 local str, sep, div = tostring(str), {}, tostring(div)
344 for i in str:gmatch("[^".. div .."]+") do
345 table.insert(sep, i)
346 end
347 return sep
348end
349function IYEncrypt(Message, PluginKey)
350 local Message, PluginKey, tab = tostring(Message), tonumber(PluginKey), {}
351 for i = 0, 127 do
352 local a = -1
353 repeat a = a + 2
354 until a * (2 * i + 1) % 256 == 1
355 tab[i] = a
356 end
357 local Var1 = PluginKey
358 local Var2 = PluginKey + PluginKey
359 return (Message:gsub(".", function(Encode)
360 local Var3 = Var1 % 274877906944
361 local Var4 = (Var1 - Var3) / 274877906944
362 local Var5 = Var4 % 128
363 Encode = Encode:byte()
364 local Var6 = (Encode * tab[Var5] - (Var4 - Var5) / 128) % 256
365 Var1 = Var3 * Var2 + Var4 + Var6 + Encode
366 return ('%02x'):format(Var6)
367 end))
368end
369function IYDecrypt(Message, PluginKey)
370 local Message, PluginKey = tostring(Message), tonumber(PluginKey)
371 local Var1 = PluginKey
372 local Var2 = PluginKey + PluginKey
373 return(Message:gsub("%x%x", function(Decode)
374 local Var3 = Var1 % 274877906944
375 local Var4 = (Var1 - Var3) / 274877906944
376 local Var5 = Var4 % 128
377 Decode = tonumber(Decode, 16)
378 local Var6 = (Decode + (Var4 - Var5) / 128) * (2 * Var5 + 1) % 256
379 Var1 = Var3 * Var2 + Var4 + Decode + Var6
380 return string.char(Var6)
381 end))
382end
383function GenMsg(str)
384 local str = tostring(str)
385 return "IYChat_"..IYEncrypt("Recieved|||||"..str, Secret_Key)
386end
387function CheckMsg(str)
388 if Match(str, "IYChat_") then
389 if #SplitStr(IYDecrypt(str:gsub("IYChat_", ""), Secret_Key), "|||||") > 1 then
390 if SplitStr(IYDecrypt(str:gsub("IYChat_", ""), Secret_Key), "|||||")[1] == "Recieved" then
391 return SplitStr(IYDecrypt(str:gsub("IYChat_", ""), Secret_Key), "|||||")[2]
392 else
393 return false
394 end
395 end
396 end
397end
398
399for _, plr in pairs(game.Players:GetChildren()) do
400 ChatLog(plr)
401end
402
403game.Players.PlayerAdded:connect(function(player)
404 ChatLog(player)
405end)