Advertisement
kele666CN

Untitled

Sep 30th, 2024 (edited)
1,753
0
240 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.77 KB | Cybersecurity | 0 0
  1. local HttpService = game:GetService("HttpService")
  2. local baseURL = "https://raw.githubusercontent.com/0xwdwdwdwadA/d0w9a0dx/main/"
  3.  
  4. export type gameMapping = {
  5.     exclusions: table?,
  6.     main: string
  7. }
  8.  
  9. if not getgenv().ExecutorSupport then
  10.     loadstring(game:HttpGet(baseURL .. "/executorTest.lua"))()
  11. end
  12.  
  13. if not getgenv().BloxstrapRPC then
  14.     local BloxstrapRPC = {}
  15.  
  16.     export type RichPresence = {
  17.         details:     string?,
  18.         state:       string?,
  19.         timeStart:   number?,
  20.         timeEnd:     number?,
  21.         smallImage:  RichPresenceImage?,
  22.         largeImage:  RichPresenceImage?
  23.     }
  24.  
  25.     export type RichPresenceImage = {
  26.         assetId:    number?,
  27.         hoverText:  string?,
  28.         clear:      boolean?,
  29.         reset:      boolean?
  30.     }
  31.  
  32.     function BloxstrapRPC.SendMessage(command: string, data: any)
  33.         local json = HttpService:JSONEncode({
  34.             command = command,
  35.             data = data
  36.         })
  37.        
  38.         print("[BloxstrapRPC] " .. json)
  39.     end
  40.  
  41.     function BloxstrapRPC.SetRichPresence(data: RichPresence)
  42.         if data.timeStart ~= nil then
  43.             data.timeStart = math.round(data.timeStart)
  44.         end
  45.        
  46.         if data.timeEnd ~= nil then
  47.             data.timeEnd = math.round(data.timeEnd)
  48.         end
  49.        
  50.         BloxstrapRPC.SendMessage("SetRichPresence", data)
  51.     end
  52.  
  53.     getgenv().BloxstrapRPC = BloxstrapRPC
  54. end
  55.  
  56. local mapping: gameMapping = HttpService:JSONDecode(game:HttpGet(baseURL .. "/mappings/" .. game.GameId .. ".json"))
  57. local scriptPath = mapping.main
  58.  
  59. if mapping.exclusions and mapping.exclusions[tostring(game.PlaceId)] then
  60.     scriptPath = mapping.exclusions[tostring(game.PlaceId)]
  61. end
  62.  
  63. loadstring(game:HttpGet(baseURL .. scriptPath))()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement