R

getplatform enum

public
rrixh Apr 23, 2024 Never 116
Clone
Plaintext getplatform_lulaslollipop.xlsx 39 lines (36 loc) | 1.27 KB
1
--UserInputService
2
local UserInputService = game:GetService("UserInputService")
3
4
local platform = UserInputService:GetPlatform()
5
local devixeName = table.find({Enum.Platform.IOS, Enum.Platform.Android}, platform)
6
local devixe
7
8
if devixeName then
9
if devixeName == 1 then
10
devixe = "iOS"
11
elseif devixeName == 2 then
12
devixe = "Android"
13
else
14
devixe = "Unknown Mobile Platform"
15
end
16
else
17
if platform == Enum.Platform.Windows then
18
devixe = "Windows"
19
elseif platform == Enum.Platform.OSX then
20
devixe = "OSX"
21
elseif platform == Enum.Platform.Ubuntu then
22
devixe = "Ubuntu"
23
elseif platform == Enum.Platform.ChromeOS then
24
devixe = "ChromeOS"
25
elseif platform == Enum.Platform.Linux then
26
devixe = "Linux"
27
elseif platform == Enum.Platform.XBoxOne then
28
devixe = "XBoxOne"
29
elseif platform == Enum.Platform.PS4 then
30
devixe = "PS4"
31
elseif platform == Enum.Platform.Switch then
32
devixe = "Switch"
33
else
34
devixe = "Unknown Platform"
35
end
36
end
37
38
--msg
39
game.StarterGui:SetCore( "ChatMakeSystemMessage", { Text = "Devixe: [ "..devixe.." ]", Color = Color3.fromRGB(255,127,127), Font = Enum.Font.Arial, FontSize = Enum.FontSize.Size24 });