Created
December 1, 2017 20:31
-
-
Save Fraktality/31ff7daa2bf5c2d6a3e6295cd8121255 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function hostos() | |
local msvc | |
local posix | |
for _ = 1, 8 do | |
local k = math.random() | |
msvc = 0 == k*0x7FFF%1 | |
posix = 0 == k*0x7FFFFFFF%1 | |
if msvc ~= posix then | |
break | |
end | |
end | |
if msvc == posix then | |
return Enum.Platform.None | |
end | |
local console = game:GetService'GuiService':IsTenFootInterface() | |
local touch = game:GetService'UserInputService'.TouchEnabled | |
if console then | |
if msvc then | |
return Enum.Platform.XBoxOne | |
else | |
return Enum.Platform.PS4 | |
end | |
end | |
if msvc then | |
return Enum.Platform.Windows | |
end | |
if touch then | |
math.randomseed(0) | |
local k = math.random()*0x7FFFFFFF | |
if k == 520932930 then | |
return Enum.Platform.IOS | |
elseif k == 366850414 then | |
return Enum.Platform.Android | |
end | |
else | |
return Enum.Platform.OSX | |
end | |
return Enum.Platform.None | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
°˖✧◝(⁰▿⁰)◜✧˖°