Roblox Fe Gui Script Review
-- 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
-- Save button function (stores in player attribute + localStorage) saveBtn.MouseButton1Click:Connect(function() local newText = textBox.Text player:SetAttribute("PaperText", newText)
-- Load saved text from LocalStorage local savedText = player:GetAttribute("PaperText") or "" textBox.Text = savedText Roblox FE GUI Script
-- Close button local closeBtn = Instance.new("TextButton") closeBtn.Size = UDim2.new(0, 40, 1, 0) closeBtn.Position = UDim2.new(1, -40, 0, 0) closeBtn.BackgroundColor3 = Color3.fromRGB(200, 50, 50) closeBtn.Text = "X" closeBtn.TextColor3 = Color3.fromRGB(255, 255, 255) closeBtn.Font = Enum.Font.SourceSansBold closeBtn.Parent = titleBar
frame.InputChanged:Connect(function(input) if drag and input.UserInputType == Enum.UserInputType.MouseMovement then local delta = input.Position - dragStart frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) end end) -- Save button local saveBtn = Instance
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)
-- Server Script (for DataStore) local DataStoreService = game:GetService("DataStoreService") local paperStore = DataStoreService:GetDataStore("PlayerPaperData") game.Players.PlayerAdded:Connect(function(player) local userId = player.UserId local success, data = pcall(function() return paperStore:GetAsync(userId) end) 30) saveBtn.Position = UDim2.new(1
-- Open/Close logic local openKey = Enum.KeyCode.P -- Press P to open/close