Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local UserInputService = game:GetService("UserInputService")
- local GuiService = game:GetService("GuiService")
- local PlaceId = game.PlaceId
- -- 判斷設備類型
- local function getDeviceType()
- if GuiService:IsTenFootInterface() then
- return "大屏設備(例如 Xbox)"
- elseif (UserInputService.TouchEnabled and not UserInputService.KeyboardEnabled) then
- return "移動設備"
- elseif UserInputService.KeyboardEnabled then
- return "電腦端"
- else
- return "未知設備"
- end
- end
- -- 安全加載腳本
- local function safeLoadScript(url)
- local success, result = pcall(function()
- return loadstring(game:HttpGet(url))()
- end)
- if not success then
- warn("腳本加載失敗: ", result)
- end
- end
- -- 判斷 PlaceId 並執行對應腳本
- if PlaceId == 16432271978 then
- safeLoadScript("https://pastebin.com/raw/FF4GNBdk")
- elseif PlaceId == 10772052398 then
- safeLoadScript("https://pastebin.com/raw/yCLxFFLy")
- elseif PlaceId == 18645473062 then
- local deviceType = getDeviceType()
- print("玩家使用的是", deviceType)
- if deviceType == "電腦端" then
- safeLoadScript("https://pastebin.com/raw/SZLVAR6k")
- else
- safeLoadScript("https://pastebin.com/raw/XMYVCWRu")
- end
- elseif PlaceId == 18920893671 then
- safeLoadScript("https://pastebin.com/raw/UwyQ6WWr")
- elseif PlaceId == 12398414727 then
- safeLoadScript("https://pastebin.com/raw/pk6TSQkw")
- else
- print("不支援該遊戲, PlaceId:", PlaceId)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement