-- Decompiled with the Synapse X Luau decompiler.


client = nil;
service = nil;
return function(p1)
	local l__Player__1 = p1.Player;
	local l__Message__2 = p1.Message;
	local l__Title__3 = p1.Title;
	local v4 = client.UI.Make("Window", {
		Name = "PrivateMessage", 
		Title = tostring(l__Player__1), 
		Size = { 300, 150 }
	});
	local v5 = v4:Add("TextLabel", {
		Text = p1.Message, 
		Size = UDim2.new(1, -10, 1, -40), 
		BackgroundTransparency = 1, 
		TextScaled = true, 
		TextWrapped = true
	});
	local u1 = false;
	local l__Player__2 = service.Player;
	local u3 = v4:Add("TextBox", {
		Text = "", 
		PlaceholderText = "Enter reply", 
		Size = UDim2.new(1, -65, 0, 30), 
		Position = UDim2.new(0, 5, 1, -35), 
		ClearTextOnFocus = false, 
		TextScaled = true
	});
	local v6 = {
		Text = "Send", 
		Size = UDim2.new(0, 60, 0, 30), 
		Position = UDim2.new(1, -65, 1, -35)
	};
	local function u4(p2)
		if not u1 then
			u1 = true;
			if p2 then
				v4:Close();
				client.Remote.Send("PrivateMessage", "Reply from " .. l__Player__2.Name, l__Player__1, l__Player__2, u3.Text);
				client.UI.Make("Hint", {
					Message = "Reply sent"
				});
			end;
			u1 = false;
		end;
	end;
	function v6.OnClick()
		u4(true);
	end;
	local v7 = v4:Add("TextButton", v6);
	v7.BackgroundColor3 = v7.BackgroundColor3:lerp(Color3.new(0, 0, 0), 0.1);
	u3.FocusLost:connect(u4);
	local l__gTable__8 = v4.gTable;
	client.UI.Make("Notification", {
		Title = "New Message", 
		Message = "Message from " .. l__Player__1.Name, 
		Time = false, 
		OnClick = function()
			v4:Ready();
		end, 
		OnClose = function()
			v4:Destroy();
		end, 
		OnIgnore = function()
			v4:Destroy();
		end
	});
end;
