1+ local Plugin = {
2+ ["PluginName"] = "jobid",
3+ ["PluginDescription"] = "This plugin lets you join and copy jobid's",
4+ ["Commands"] = {
5+ ["joinjobid"] = {
6+ ["ListName"] = "joinjobid / jid / joinid [jobid]",
7+ ["Description"] = "Teleports you to a specific server.",
8+ ["Aliases"] = {"jid", "joinid"},
9+ ["Function"] = function(args, speaker)
10+ if args[1] then
11+ -- thanks to Amity for fixing
12+ local servers = {}
13+ local req = game:HttpGet("https://games.roblox.com/v1/games/" .. game.PlaceId .. "/servers/Public?sortOrder=Desc&limit=100&excludeFullGames=true")
14+ local body = game:GetService("HttpService"):JSONDecode(req)
15+
16+ if body and body.data then
17+ for i, v in next, body.data do
18+ if type(v) == "table" and v.id == getstring(1, args) then
19+ table.insert(servers, 1, v.id)
20+ end
21+ end
22+ end
23+
24+ if #servers > 0 then
25+ game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, servers[math.random(1, #servers)], game:GetService("Players").LocalPlayer)
26+ else
27+ notify("Error", "Couldn't find that specific server")
28+ end
29+ end
30+ end
31+ },
32+ ["copyjobid"] = {
33+ ["ListName"] = "copyjobid / cid",
34+ ["Description"] = "Copies the job id",
35+ ["Aliases"] = {"cid"},
36+ ["Function"] = function(args, speaker)
37+ everyClipboard(game.JobId)
38+ end
39+ }
40+ }
41+ }
42+
43+ return Plugin
0 commit comments