-
Notifications
You must be signed in to change notification settings - Fork 19
/
Images&Videos.lua
23 lines (16 loc) · 1.02 KB
/
Images&Videos.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--this one start in top of list and auto starts when click in game
local function main()
local getgamename = game.getgamename()
getgamename = getgamename:gsub(" ", "+")
local results = {}
local mtable = { name = "Main",
links = {},
ScriptName = "img&vids"
}
table.insert(mtable.links,{ name = "Game Trailers", link = "https://www.youtube.com/results?search_query=" .. getgamename .. "+trailer", addtodownloadlist = false })
table.insert(mtable.links,{ name = "Game Images", link = "https://www.google.com/search?q=".. getgamename .. "+gameplay&tbm=isch", addtodownloadlist = false })
table.insert(mtable.links,{ name = "Gameplay Videos", link = "https://www.youtube.com/results?search_query=" .. getgamename .. "+gameplay", addtodownloadlist = false })
table.insert(results, mtable)
communication.receiveSearchResults(results)
end
client.add_callback("on_scriptselected", main)--on a game is selected in menu callback