If you modify the script like this, it will create an album from the list of shuffled photos called "Shuffled Photos Album". You could then try to play this album on the iPad as a slideshow.
-- this script will play the currently selected items as a slideshow and shuffle the items for random results
on getCurrentSelection()
tell application "Photos"
set imageSel to {}
try
set imageSel to (get selection)
on error errTexttwonumbererrNumtwo
display dialog "Cannot get the selection: " & errNumtwo & return & errTexttwo
end try
return imageSel
end tell
end getCurrentSelection
set thephotos to getCurrentSelection()
set nitems to (count of thephotos)
repeat 3 times --shuffle three times for more randomness
if (nitems > 1) then
repeat nitems times --shuffle the photos in the list
set split to random number (nitems - 2) + 1
if (split < 1) then
set split to 1
end if
if split is 1 then
set head to {}
set tail to items 2 thru nitems of thephotos
end if
if split is nitems then
set head to items 1 thru (nitems - 1) of thephotos
set tail to {}
end if
if (split > 1) and (split < nitems) then
set head to items 1 thru (split - 1) of thephotos as list
set tail to items (split + 1) thru nitems of thephotos as list
end if
set thephotos to head & tail & (itemsplit of thephotos as list)
end repeat
end if
end repeat
tell application "Photos"
set ShuffledAlbumName to "ShuffledAlbum" -- change this to the name of the album where you want to save the shuffled list of Photos
try
if not (exists container ShuffledAlbumName) then
makenewalbumnamedShuffledAlbumName
end if
on error errTexttwonumbererrNumtwo
display dialog "Could not create album " & ShuffledAlbumName & errNumtwo & return & errTexttwo
end try
set theShuffledAlbum to containerShuffledAlbumName
addthephotostotheShuffledAlbum
start slideshowusingthephotos as list
end tell