Universal Script 📌
11.3k Views
31 Executions

Open Source Universal GetDevice

Universal Script 📌
CMDS
CMDSPublished 10
3 years ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

code for your scripts and things (made by PawsThePaw)

View Raw
local GuiService = game:GetService("GuiService")

local UserInputService = game:GetService("UserInputService")

local function GetDevice()
    if (GuiService:IsTenFootInterface()) then
        return "Console"
    elseif (UserInputService.TouchEnabled and not UserInputService.MouseEnabled) then
        local DeviceSize = workspace.CurrentCamera.ViewportSize
        if (DeviceSize.Y >= 600) then
            return "Tablet"
        else
            return "Phone"
        end
    else
        return "Desktop"
    end
end


Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!

Tags

More universal scripts

See all
Universal Script 📌
6.1k
17.8k
Bumped 3 hours ago
Key System
Universal Script 📌
532.8k
336.7k
Bumped 5 hours ago
Script hub
2.6k
2.2k
Bumped 6 hours ago
Key System
Universal Script 📌
541
38
Approved 6 hours ago