To create a script, you need to create a file with the ending .js (for example: bedwars.js) The file needs to be located in your scripts folder.
Once the file is created, open it with a editor of your choise (We recommend VSCode)
print("Hello Spigot!")
Insert following into the file, save it and execute /jsreload ingame. You should see the line Hello Spigot! in your console.