Roblox Fe Gui Script Apr 2026
-- Draggable local drag = false local dragStart, startPos
frame.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then drag = true dragStart = input.Position startPos = frame.Position end end)
local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 400, 0, 300) frame.Position = UDim2.new(0.5, -200, 0.5, -150) frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255) frame.BorderSizePixel = 2 frame.Visible = false frame.Parent = screenGui
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) Roblox FE GUI Script
-- Open/Close logic local openKey = Enum.KeyCode.P -- Press P to open/close
-- Load saved text from LocalStorage local savedText = player:GetAttribute("PaperText") or "" textBox.Text = savedText
if success and data then player:SetAttribute("PaperText", data) else player:SetAttribute("PaperText", "") end end) -- Draggable local drag = false local dragStart,
-- Save button function (stores in player attribute + localStorage) saveBtn.MouseButton1Click:Connect(function() local newText = textBox.Text player:SetAttribute("PaperText", newText)
task.wait(5) hint:Destroy() If you want the paper's text to persist across server hops and rejoin, use a Script in ServerScriptService :
frame.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then drag = false end end) 300) frame.Position = UDim2.new(0.5
-- Close button function closeBtn.MouseButton1Click:Connect(function() frame.Visible = false end)
-- LocalScript inside a ScreenGui (e.g., StarterGui.PaperGUI) local player = game.Players.LocalPlayer local mouse = player:GetMouse()