How do i test my custom codes in single player?

Well the title says it all, how do i test my scripts, gamode edits, ect in garrysmod, single player?

I’ve been searching for this for ages, and would appreciate a tutorial, or just some info.

Thank you.

if it’s a script for the server place it in /garrysmod/lua/autorun/server
if it’s a script for the client place it in /garrysmod/lua/autorun/client
Start a singleplayer sandbox game and they should load
if you need to load a script again after editing it use the console command lua_openscript for server files and lua_openscript_cl for client files, if it’s a shared file run both on the same file

if it’s a gamemode place it in the /garrysmod/gamemodes folder just like on a server.

Then in the map selection part of new game look for three tabs on the right side, one of them has gamemode selection in it.

Hope this helps, it might be a little unclear but, then so was your question.