Advertisement
chen399d

啟動器

Sep 28th, 2024 (edited)
552
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.43 KB | Source Code | 0 0
  1. local UserInputService = game:GetService("UserInputService")
  2. local GuiService = game:GetService("GuiService")
  3. local PlaceId = game.PlaceId
  4.  
  5. -- 判斷設備類型
  6. local function getDeviceType()
  7.     if GuiService:IsTenFootInterface() then
  8.         return "大屏設備(例如 Xbox)"
  9.     elseif (UserInputService.TouchEnabled and not UserInputService.KeyboardEnabled) then
  10.         return "移動設備"
  11.     elseif UserInputService.KeyboardEnabled then
  12.         return "電腦端"
  13.     else
  14.         return "未知設備"
  15.     end
  16. end
  17.  
  18. -- 安全加載腳本
  19. local function safeLoadScript(url)
  20.     local success, result = pcall(function()
  21.         return loadstring(game:HttpGet(url))()
  22.     end)
  23.     if not success then
  24.         warn("腳本加載失敗: ", result)
  25.     end
  26. end
  27.  
  28. -- 判斷 PlaceId 並執行對應腳本
  29. if PlaceId == 16432271978 then
  30.     safeLoadScript("https://pastebin.com/raw/FF4GNBdk")
  31. elseif PlaceId == 10772052398 then
  32.     safeLoadScript("https://pastebin.com/raw/yCLxFFLy")
  33. elseif PlaceId == 18645473062 then
  34.     local deviceType = getDeviceType()
  35.     print("玩家使用的是", deviceType)
  36.     if deviceType == "電腦端" then
  37.         safeLoadScript("https://pastebin.com/raw/SZLVAR6k")
  38.     else
  39.         safeLoadScript("https://pastebin.com/raw/XMYVCWRu")
  40.     end
  41. elseif PlaceId == 18920893671 then
  42.     safeLoadScript("https://pastebin.com/raw/UwyQ6WWr")
  43. elseif PlaceId == 12398414727 then
  44.     safeLoadScript("https://pastebin.com/raw/pk6TSQkw")
  45. else
  46.     print("不支援該遊戲, PlaceId:", PlaceId)
  47. end
  48.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement