View difference between Paste ID: QHckrsB8 and DzQaufty
SHOW: | | - or go back to the newest paste.
1
--// Variables
2
-- // Services
3
local players = game:GetService("Players")
4
local reps = game:GetService("ReplicatedStorage")
5
6
-- // Instaces
7
local sg = Instance.new('ScreenGui',owner:FindFirstChildWhichIsA'PlayerGui')
8
sg.ResetOnSpawn = false
9
10
local f1 = Instance.new('Frame',sg)
11
f1.AnchorPoint = Vector2.new(.5,.5)
12
f1.BackgroundColor3 = Color3.new(0,0,0)
13
f1.BackgroundTransparency = .5
14
f1.Position = UDim2.new(.5,0,.5,0)
15
f1.Size = UDim2.new(.375,0,.5,0)
16
f1.Active = true
17
f1.Selectable = true
18
19
local sf = Instance.new('ScrollingFrame',f1)
20
sf.BackgroundColor3 = Color3.new(0,0,0)
21
sf.Size = UDim2.new(.75,0,1,0)
22
sf.ClipsDescendants = true
23
sf.CanvasSize = UDim2.new(0,0,0,50)
24
sf.ScrollingDirection = Enum.ScrollingDirection.Y
25
26
local TLd = Instance.new("TextLabel",sf)
27
TLd.BackgroundColor3 = Color3.new(0, 0, 0)
28
TLd.Size = UDim2.new(1,0,0,50)
29
TLd.Font = Enum.Font.Code
30-
TLd.Text = '[[ Start of Join Logs]]'
30+
TLd.Text = 'Chat Log Loaded!'
31
TLd.TextColor3 = Color3.new(255, 255, 255)
32
TLd.TextScaled = true
33
34
local re1 = reps:FindFirstChild('AS_RE1',true)
35
36
-- // Values
37
local lognum = 0
38
39
40
41
--// Default Properties
42
sg.Enabled = true
43
f1.Draggable = true
44
f1.Position = UDim2.new(.5,0,.5,0)
45
46
47
48
--// Functions
49
local function Gui_In()
50
	f1:TweenPosition(UDim2.new(.5,0,.5,0))
51
	wait(1)
52
	f1.Draggable = true
53
end
54
local function Gui_Out()
55
	f1.Draggable = false
56
	if f1.Position~=UDim2.new(.5,0,.5,0)then
57
		f1:TweenPosition(UDim2.new(.5,0,.5,0))
58
		wait(1)
59
	end
60
	f1:TweenPosition(UDim2.new(1.25,0,.5,0))
61
	wait(1)
62
end
63-
local function MakeLog(pl,msg)
63+
local function MakeLog(msg)
64
	for _,v in pairs(sf:GetChildren())do
65
		local vpos = v.Position
66
		v.Position = UDim2.new(vpos.X.Scale,vpos.X.Offset,vpos.Y.Scale,vpos.Y.Offset + 50)
67
	end
68-
	sf.CanvasSize = UDim2.new(sf.CanvasSize.X.Scale,sf.CanvasSize.X.Offset,sf.CanvasSize.Y.Scale,sf.CanvasSize.Y.Offset + 50)
68+
69
	TL.BackgroundColor3 = Color3.new(0, 0, 0)
70
	TL.Size = UDim2.new(1,0,0,50)
71
	TL.Font = Enum.Font.Code
72
	TL.Text = msg
73-
	TL.Text = (pl.Name..' '..msg..'.')
73+
74
	TL.TextScaled = true
75
end
76
77
--// Events
78
79-
--[[
79+
game.Players.PlayerAdded:Connect(function(plr)
80-
re1.OnClientEvent:Connect(function(arg1)
80+
	plr.Chatted:Connect(function(m)
81-
	if arg1=='GetGui'then
81+
		MakeLog(plr.Name .. ": " .. m)
82-
		Gui_In()
82+
	end)
83-
	elseif arg1=='DestroyGui'then
83+
84-
		Gui_Out()
84+
85
for i,plr in pairs(game.Players:GetPlayers()) do
86
	plr.Chatted:Connect(function(m)
87-
--]]
87+
		MakeLog(plr.Name .. ": " .. m)
88-
players.PlayerAdded:Connect(function(pl)
88+
	end)
89-
	MakeLog(pl,'joined')
89+
end