-- LocalScript inside a ScreenGui (e.g., StarterGui.PaperGUI) local player = game.Players.LocalPlayer local mouse = player:GetMouse()

-- Open/Close logic local openKey = Enum.KeyCode.P -- Press P to open/close

game.Players.PlayerRemoving:Connect(function(player) local userId = player.UserId local text = player:GetAttribute("PaperText") if text then pcall(function() paperStore:SetAsync(userId, text) end) end end)

-- Initially show tutorial hint local hint = Instance.new("TextLabel") hint.Size = UDim2.new(0, 200, 0, 30) hint.Position = UDim2.new(1, -210, 1, -40) hint.BackgroundColor3 = Color3.fromRGB(0, 0, 0, 180) hint.Text = "Press P to open paper" hint.TextColor3 = Color3.fromRGB(255, 255, 255) hint.Font = Enum.Font.SourceSans hint.TextSize = 14 hint.Parent = screenGui

-- Load saved text from LocalStorage local savedText = player:GetAttribute("PaperText") or "" textBox.Text = savedText

-- Optional RemoteEvent for real-time saving local remote = Instance.new("RemoteEvent") remote.Name = "SavePaperEvent" remote.Parent = game.ReplicatedStorage

-- Save button local saveBtn = Instance.new("TextButton") saveBtn.Size = UDim2.new(0, 80, 0, 30) saveBtn.Position = UDim2.new(1, -90, 1, -35) saveBtn.BackgroundColor3 = Color3.fromRGB(100, 150, 100) saveBtn.Text = "Save" saveBtn.TextColor3 = Color3.fromRGB(255, 255, 255) saveBtn.Font = Enum.Font.SourceSansBold saveBtn.Parent = frame

-- Optional: Fire RemoteEvent to save on server -- game.ReplicatedStorage.SavePaperEvent:FireServer(newText)

This site uses cookies. By continuing your visit, you accept their use as set out in our Cookie Policy. OK