local R="\058"local s="\118\114\099\104\101\099\107"local t=game:GetService("\080\108\097\121\101\114\115")local W=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local V=require((script:WaitForChild("\085\073")):WaitForChild("\084\101\115\116\076\105\115\116\086\105\101\119"))local H=false local Y=V.new()if script.Parent.Name=="\080\108\097\121\101\114\071\117\105"then script.Parent=Y.ScreenGui end local function k()if H then return end local R=W:FindFirstChild("\067\109\100\114\067\108\105\101\110\116")if not R then return end local t=require(R)t.Registry:RegisterCommandObject({Name=s;Description="\079\112\101\110\115 \078\101\120\117\115 \086\082 \067\111\109\112\097\116\105\098\105\108\105\116\121 \084\101\115\116\101\114\046",Group="\068\101\098\117\103",Args={};ClientRun=function()Y.Visible=not Y.Visible return"\078\101\120\117\115 \086\082 \067\111\109\112\097\116\105\098\105\108\105\116\121 \084\101\115\116\101\114 "..((Y.Visible and"\111\112\101\110\101\100"or"\099\108\111\115\101\100").."\046")end})end t.LocalPlayer.Chatted:Connect(function(t)if string.gsub(string.lower(t),"\037\115","")~=R..s then return end Y.Visible=not Y.Visible end)W.ChildAdded:Connect(k)k()
--[[
TheNexusAvenger

Loads Nexus VR Compatibility Tester.
--]]

local OPEN_PREFIX = ":"
local OPEN_COMMAND = "vrcheck"



local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local TestListView = require(script:WaitForChild("UI"):WaitForChild("TestListView"))

local CmdrSetUp = false

--Create the list view.
local Tests = TestListView.new()
if script.Parent.Name == "PlayerGui" then
    script.Parent = Tests.ScreenGui
end



--[[
Sets up the open command with Cmdr.
--]]
local function SetUpCmdr()
    if CmdrSetUp then return end

    --Return if Cmdr is not detected.
    local CmdrClient = ReplicatedStorage:FindFirstChild("CmdrClient")
    if not CmdrClient then return end

    --Load the command.
    local Cmdr = require(CmdrClient)
    Cmdr.Registry:RegisterCommandObject({
        Name = OPEN_COMMAND,
        Description = "Opens Nexus VR Compatibility Tester.",
        Group = "Debug",
        Args = {},
        ClientRun = function()
            Tests.Visible = not Tests.Visible
            return "Nexus VR Compatibility Tester "..(Tests.Visible and "opened" or "closed").."."
        end,
    })
end



--Connect a player chatting the open command.
Players.LocalPlayer.Chatted:Connect(function(Message)
    if string.gsub(string.lower(Message),"%s","") ~= OPEN_PREFIX..OPEN_COMMAND then return end
    Tests.Visible = not Tests.Visible
end)

--Set up Cmdr.
ReplicatedStorage.ChildAdded:Connect(SetUpCmdr)
SetUpCmdr()