If you're using PKSM v6.0.0 or later then you already have most (if not all) scripts already installed
If you're still using PKSM v5.1.x (which is no longer receiving support), do the following:
scripts.7z
from this releasescripts
folder to your SD card so that its path is /3ds/PKSM/scripts
There is risk to using some of these scripts, particularly on the most recent games (US/UM and Su/Mo).
The following is a list of unlabeled scripts (with no legal counterpart) known to edit parts of your save to illegal values:
all versions
Set Vivillon Fancy Form -- any Scatterbug/Spewpa/Vivillon caught or bred after using this will be illegalall versions
Set Vivillon Pokeball form -- any Scatterbug/Spewpa/Vivillon caught or bred after using this will be illegalOld versions of these scripts included the following elements that could be flagged as illegal if a save is put through strict hack checks
USUM, SM
All items 99x -- Black Flute, Blue Scarf, Bug Gem, Cherish Ball, Dark Gem, Discount Coupon, Dragon Gem, Dream Ball, Electric Gem, Fairy Gem, Fighting Gem, Fire Gem, Fluffy Tail, Flying Gem, Ghost Gem, Grass Gem, Green Scarf, Greet Mail, Ground Gem, Ice Gem, Macho Brace, Odd Keystone, Old Amber, Pink Scarf, Poison Gem, Psychic Gem, Red Scarf, Relic Band, Relic Copper, Relic Crown, Relic Gold, Relic Silver, Relic Statue, Relic Vase, Rock Gem, Safari Ball, Shoal Salt, Shoal Shell, Sport Ball, Steel Gem, Water Gem, White Flute, Yellow ScarfUSUM, SM
All Medicine 99x -- Blue Flute, Red Flute, Yellow FluteUSUM, SM
All berries 99x -- Razz Berry, Nanab Berry, Wepear Berry, Cornn Berry, Magost Berry, Rabuta Berry, Nomel Berry, Spelon Berry, Pamtre Berry, Watmel Berry, Durin Berry, Belue BerryORAS
Unlock & max all O-Powers -- unreleased S levelsORAS, XY
Give all items 99x -- Bug Gem, Cherish Ball, Dark Gem, Dragon Gem, Electric Gem, Fairy Gem, Fast Ball, Fighting Gem, Fire Gem, Flying Gem, Friend Ball, Ghost Gem, Grass Gem, Ground Gem, Heavy Ball, Ice Gem, Level Ball, Love Ball, Lure Ball, Moon Ball, Odd Keystone, Park Ball, Poison Gem, Psychic Gem, Relic Band, Relic Copper, Relic Crown, Relic Gold, Relic Silver, Relic Statue, Relic Vase, Rock Gem, Safari Ball, Sport Ball, Steel Gem, Water GemB2W2, BW
Give all items 99x -- Blue Scarf, Cherish Ball, Dream Ball, Fast Ball, Friend Ball, Green Scarf, Heavy Ball, Level Ball, Love Ball, Lure Ball, Moon Ball, Park Ball, Pink Scarf, Red Scarf, Safari Ball, Sport Ball, Yellow ScarfB2W2, BW
Give all berries 99x -- Rabuta Berry, Pamtre BerryHGSS
Give all pokeballs 99x -- Cherish Ball, Park Ball, Sport BallPT, DP
Give all pokeballs 99x -- Cherish BallDP
Give all items 99x -- Shoal Salt, Shoal ShellThese scripts may cause problems in the unlikely event you should ever have to go through thorough hack checks
HGSS
Unlock all Pokewalker Courses -- Rally, Sightseeing, and Amity Meadow were not released for all regionsHGSS, PT
Give all items 99x -- Griseous Orb (untradeable and only one can be obtained per file)PT, DP
Get all Pokewatch apps -- Alarm Clock and Stopwatch were never releasedSome scripts deal with complicated mechanics or have effects that cannot be summarized to fit in their names. Helpful details about these scripts can be found on this wiki page.
For simple scripts and a basic guide to figuring out the edits you want the script to make, see the docs README.
If you're looking to make a picoC script for PKSM, check out the PKSM scripting API documentation in the wiki
# "Legacy" PKSM script structure
# u8 magic[10] // PKSMSCRIPT
# u32 offset // save offset to write the data to
# u32 length // payload length
# u8 payload[len] // payload data
# u32 repeat_times // repeat payload n times
# ...