You cannot save and execute JavaScript on Roblox. You can store it as plain text, but Roblox uses Lua for in-game scripting.