Pinkstack/roblox-luau-corpus-text huggingface dataset:
--Serverside logic


Event.OnServerEvent:Connect(function(player,ExhaustParticle,FireBool)
	
	print("ExhaustParticle")
	
	if FireBool then
		
		local RanNum = tostring(math.random(1,3))
		ExhaustPart2["Backfire"..RanNum]:Play()
		ExhaustPart2.PointLight.Enabled = true
		ExhaustPart2[ExhaustParticle].Enabled = true
		
		if ExhaustParticle == "FlamesSmall" then 
			
			ExhaustPart2.PointLight.Range = 6  
			ExhaustPart2.PointLight.Brightness = 5
			ExhaustPart2.Sparks.Enabled = false
			
		else 
			
			ExhaustPart2.PointLight.Range = 8
			ExhaustPart2.PointLight.Brightness = 12
			ExhaustPart2.Sparks.Enabled = true
			
		end	
		
	else
		
		ExhaustPart2[ExhaustParticle].Enabled = false
		ExhaustPart2.PointLight.Enabled = false
		
	end	
	
end)
-----<< TESTING >>-----
--[[
player.Character.ChildAdded:Connect(function(obj)
	print("Added: " .. tostring(obj))
end)

player.Character.ChildRemoved:Connect(function(obj)
	print("Removed: " .. tostring(obj))
end)

for i, v in pairs(player.Character:GetChildren()) do
	v.ChildAdded:Connect(function(obj)
		print("Added: " .. tostring(obj))
	end)

	v.ChildRemoved:Connect(function(obj)
		print("Removed: " .. tostring(obj))
	end)
end
--]]
--- Add a task to clean up
-- @usage
-- Maid[key] = (function)         Adds a task to perform
-- Maid[key] = (event connection) Manages an event connection
-- Maid[key] = (Maid)             Maids can act as an event connection, allowing a Maid to have other maids to clean up.
-- Maid[key] = (Object)           Maids can cleanup objects with a `Destroy` method
-- Maid[key] = nil                Removes a named task. If the task is an event, it is disconnected. If it is an object,
--                                it is destroyed.


function Maid:__newindex(index, newTask)
	if (Maid[index] ~= nil) then
		error(("'%s' is reserved"):format(tostring(index)), 2)
	end

	local tasks = self._tasks
	local oldTask = tasks[index]
	tasks[index] = newTask

	if (oldTask) then
		if (type(oldTask) == "function") then
			oldTask()
		elseif (typeof(oldTask) == "RBXScriptConnection") then
			oldTask:Disconnect()
		elseif (oldTask.Destroy) then
			oldTask:Destroy()
		end
	end
end
--!strict


local LuauPolyfill = script.Parent.Parent
local types = require(LuauPolyfill.types)
type Array<T> = types.Array<T>
local map = require(script.Parent.map)

return function<T>(arr: Array<T>, separator: string?): string
	if #arr == 0 then
		return ""
	end
	-- JS does tostring conversion implicitely but in Lua we need to do that explicitely
	local stringifiedArray = map(arr, function(item)
		return tostring(item)
	end)

	return table.concat(stringifiedArray, separator or ",")
end
-- функция слежения, будет исполняться когда будет добавлен новый элемент


function Sledim(param)	
	local txt = tostring(param.Value)
	
	local tmp = frame:Clone()
	tmp.TextLabel.Text = txt
	tmp.Parent = sf
	
	-- отсюда начнётся магия
	Debris:AddItem(tmp,MyTimer)		-- самоуничтожение через указанное время
	Debris:AddItem(param,MyTimer)	-- оригинал с сообщением тоже прикончим
	
	local tween = TweenService:Create(tmp, tweenInfo, result)	-- сжимаем
	local tween2 = TweenService:Create(tmp.TextLabel, tweenInfo, result2)	-- исчезаем
	tween:Play()
	tween2:Play()
end

incoming.ChildAdded:Connect(Sledim)	-- реагировать на новый элемент
--------LEFT DOOR --------


game.Workspace.doorleft.l13.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorleft.l22.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorleft.l31.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorleft.l43.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorleft.l52.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorleft.l61.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorleft.l73.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
-- Changes the body orientiation to make it face a given direction. Returns the computed angles


function OrientableBody:face(direction: Vector3): Vector2?
	local humanoid: Humanoid? = self.character and self.character:FindFirstChild("Humanoid")
	if not humanoid or not humanoid.RootPart then
		return nil
	end

	direction = humanoid.RootPart.CFrame:PointToObjectSpace(humanoid.RootPart.Position + direction)

	local verticalAngle = math.asin(direction.Y)
	if verticalAngle < Constants.OFFSET_Y and verticalAngle > -Constants.OFFSET_Y then
		-- Vertical angle is within dead zone, do not change head orientation
		verticalAngle = 0
	else
		if verticalAngle > 0 then
			verticalAngle = verticalAngle - Constants.OFFSET_Y
		else
			verticalAngle = verticalAngle + Constants.OFFSET_Y
		end
	end

	local horizontalAngle = math.atan2(-direction.X, -direction.Z)
	-- If looking behind the character, it will instead rotate towards the camera
	if horizontalAngle > math.pi / 2 then
		horizontalAngle = math.pi - horizontalAngle
	elseif horizontalAngle < -math.pi / 2 then
		horizontalAngle = -math.pi - horizontalAngle
	end

	self.motor:setGoal({
		horizontalAngle = Otter.spring(horizontalAngle),
		verticalAngle = Otter.spring(verticalAngle),
	})

	return Vector2.new(horizontalAngle, verticalAngle)
end
------//Sprinting Animations


self.RightSprint = CFrame.new(-1, 1.1, -0.5) * CFrame.Angles(math.rad(-30), math.rad(0), math.rad(0));
self.LeftSprint = CFrame.new(1,1,-0.9) * CFrame.Angles(math.rad(-30),math.rad(35),math.rad(-25));

self.RightElbowSprint = CFrame.new(0,0,0)  * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0));
self.LeftElbowSprint = CFrame.new(0,0,0)  * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0));

self.RightWristSprint = CFrame.new(0,0,0)  * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0));
self.LeftWristSprint = CFrame.new(0,0,0)  * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0));

return self
--------RIGHT DOOR --------


game.Workspace.doorright.l11.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l23.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l32.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l41.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l53.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l62.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l71.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)

game.Workspace.doorright.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
--[[
	[Horizontal and Vertical limits for head and body tracking.]
	[Setting to 0 negates tracking, setting to 1 is normal tracking, and setting to anything higher than 1 goes past real life head/body rotation capabilities.]
--]]


local HeadHorFactor = 1
local HeadVertFactor = 1
local BodyHorFactor = 1
local BodyVertFactor = 1
--[[**
		ensures value matches given interface definition

		@param checkTable The interface definition

		@returns A function that will return true iff the condition is passed
	**--]]


	function t.interface(checkTable)
		assert(checkInterface(checkTable))
		return function(value)
			local tableSuccess = t.table(value)
			if tableSuccess == false then
				return false
			end

			for key, check in pairs(checkTable) do
				local success = check(value[key])
				if success == false then
					return false
				end
			end

			return true
		end
	end
--	for i = 1,#allButtons,1 do
--		local object = allButtons[i]:FindFirstChild("Object")
--		local dependency = allButtons[i]:FindFirstChild("Dependency")
--		if object ~= nil and dependency ~= nil then
--			if dependency.Value == unlockPurchases[u][1] then
--				table.insert(ignore[u],object.Value)
--				scanForDependenceis(ignore[u],object.Value)
--			end
--		end
--	end
--[=[
	@within ClientRemoteSignal
	@interface Connection
	.Disconnect () -> ()
]=]



function ClientRemoteSignal.new(
	re: RemoteEvent,
	inboundMiddleware: Types.ClientMiddleware?,
	outboudMiddleware: Types.ClientMiddleware?
)
	local self = setmetatable({}, ClientRemoteSignal)
	self._re = re
	if outboudMiddleware and #outboudMiddleware > 0 then
		self._hasOutbound = true
		self._outbound = outboudMiddleware
	else
		self._hasOutbound = false
	end
	if inboundMiddleware and #inboundMiddleware > 0 then
		self._directConnect = false
		self._signal = Signal.new()
		self._reConn = self._re.OnClientEvent:Connect(function(...)
			local args = table.pack(...)
			for _, middlewareFunc in ipairs(inboundMiddleware) do
				local middlewareResult = table.pack(middlewareFunc(args))
				if not middlewareResult[1] then
					return
				end
				args.n = #args
			end
			self._signal:Fire(table.unpack(args, 1, args.n))
		end)
	else
		self._directConnect = true
	end
	return self
end

function ClientRemoteSignal:_processOutboundMiddleware(...: any)
	local args = table.pack(...)
	for _, middlewareFunc in ipairs(self._outbound) do
		local middlewareResult = table.pack(middlewareFunc(args))
		if not middlewareResult[1] then
			return table.unpack(middlewareResult, 2, middlewareResult.n)
		end
		args.n = #args
	end
	return table.unpack(args, 1, args.n)
end
-- no touchy


local path
local waypoint
local oldpoints
local isWandering = 0

if canWander then
	spawn(function()
		while isWandering == 0 do
			isWandering = 1
			local desgx, desgz = hroot.Position.x + math.random(-WanderX, WanderX), hroot.Position.z + math.random(-WanderZ, WanderZ)
			human:MoveTo( Vector3.new(desgx, 0, desgz) )
			wait(math.random(4, 6))
			isWandering = 0
		end
	end)
end

while wait() do
	local enemybody = Getbody(hroot.Position)	
	if enemybody ~= nil then -- if player detected
		isWandering = 1
		local function checkw(t)
			local ci = 3
			if ci > #t then
				ci = 3
			end
			if t[ci] == nil and ci < #t then
				repeat
					ci = ci + 1
					wait()
				until t[ci] ~= nil
				return Vector3.new(1, 0, 0) + t[ci]
			else
				ci = 3
				return t[ci]
			end
		end
		
		path = pfs:FindPathAsync(hroot.Position, enemybody.Position)
		waypoint = path:GetWaypoints()
		oldpoints = waypoint
		local connection;
		
		local direct = Vector3.FromNormalId(Enum.NormalId.Front)
		local ncf = hroot.CFrame * CFrame.new(direct)
		direct = ncf.p.unit
		local rootr = Ray.new(hroot.Position, direct)
		local phit, ppos = game.Workspace:FindPartOnRay(rootr, hroot)
		
		if path and waypoint or checkw(waypoint) then
			if checkw(waypoint) ~= nil and checkw(waypoint).Action == Enum.PathWaypointAction.Walk then
				human:MoveTo( checkw(waypoint).Position )
				human.Jump = false
			end
			
			-- CANNOT LET BALDI JUMPS --
			--[[if checkw(waypoint) ~= nil and checkw(waypoint).Action == Enum.PathWaypointAction.Jump then
				human.Jump = true
				connection = human.Changed:connect(function()
					human.Jump = true
				end)
				human:MoveTo( checkw(waypoint).Position )
			else
				human.Jump = false
			end]]
			
			--[[hroot.Touched:connect(function(p)
				local bodypartnames = GetPlayersbodyParts(enemybody)
				if p:IsA'Part' and not p.Name == bodypartnames and phit and phit.Name ~= bodypartnames and phit:IsA'Part' and rootr:Distance(phit.Position) < 5 then
					connection = human.Changed:connect(function()
						human.Jump = true
					end)
				else
					human.Jump = false
				end
			end)]]
			
			if connection then
				connection:Disconnect()
			end
			
		else
			for i = 3, #oldpoints do
				human:MoveTo( oldpoints[i].Position )	
			end
		end
	elseif enemybody == nil and canWander then -- if player not detected
		isWandering = 0
		path = nil
		waypoint = nil
		human.MoveToFinished:Wait()
	end
end
---Flip


function Flip()
	if (car.DriveSeat.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector.y > .1 or FlipDB then
		FlipWait=tick()
	else
		if tick()-FlipWait>=3 then
			FlipDB=true
			local gyro = car.DriveSeat.Flip
			gyro.maxTorque = Vector3.new(10000,0,10000)
			gyro.P=3000
			gyro.D=500
			wait(1)
			gyro.maxTorque = Vector3.new(0,0,0)
			gyro.P=0
			gyro.D=0
			FlipDB=false
		end
	end
end
--[=[
	@within TableUtil
	@function Extend
	@param target table
	@param extension table
	@return table

	Extends the target array with the extension array.

	```lua
	local t = {10, 20, 30}
	local t2 = {30, 40, 50}
	local tNew = TableUtil.Extend(t, t2)
	print(tNew) --> {10, 20, 30, 30, 40, 50}
	```

	:::note Arrays only
	This function works on arrays, but not dictionaries.
]=]


local function Extend<T, E>(target: { T }, extension: { E }): { T } & { E }
	local tbl = table.clone(target) :: { any }
	for _, v in extension do
		table.insert(tbl, v)
	end
	return tbl
end
-- Auto saving and issue queue managing:


RunService.Heartbeat:Connect(function()
	-- 1) Auto saving: --
	local auto_save_list_length = #AutoSaveList
	if auto_save_list_length > 0 then
		local auto_save_index_speed = SETTINGS.AutoSaveProfiles / auto_save_list_length
		local os_clock = os.clock()
		while os_clock - LastAutoSave > auto_save_index_speed do
			LastAutoSave = LastAutoSave + auto_save_index_speed
			local profile = AutoSaveList[AutoSaveIndex]
			if os_clock - profile._load_timestamp < SETTINGS.AutoSaveProfiles then
				-- This profile is freshly loaded - auto-saving immediately after loading will cause a warning in the log:
				profile = nil
				for _ = 1, auto_save_list_length - 1 do
					-- Move auto save index to the right:
					AutoSaveIndex = AutoSaveIndex + 1
					if AutoSaveIndex > auto_save_list_length then
						AutoSaveIndex = 1
					end
					profile = AutoSaveList[AutoSaveIndex]
					if os_clock - profile._load_timestamp >= SETTINGS.AutoSaveProfiles then
						break
					else
						profile = nil
					end
				end
			end
			-- Move auto save index to the right:
			AutoSaveIndex = AutoSaveIndex + 1
			if AutoSaveIndex > auto_save_list_length then
				AutoSaveIndex = 1
			end
			-- Perform save call:
			if profile ~= nil then
				task.spawn(SaveProfileAsync, profile) -- Auto save profile in new thread
			end
		end
	end
	-- 2) Issue queue: --
	-- Critical state handling:
	if ProfileService.CriticalState == false then
		if #IssueQueue >= SETTINGS.IssueCountForCriticalState then
			ProfileService.CriticalState = true
			ProfileService.CriticalStateSignal:Fire(true)
			CriticalStateStart = os.clock()
			warn("[ProfileService]: Entered critical state")
		end
	else
		if #IssueQueue >= SETTINGS.IssueCountForCriticalState then
			CriticalStateStart = os.clock()
		elseif os.clock() - CriticalStateStart > SETTINGS.CriticalStateLast then
			ProfileService.CriticalState = false
			ProfileService.CriticalStateSignal:Fire(false)
			warn("[ProfileService]: Critical state ended")
		end
	end
	-- Issue queue:
	while true do
		local issue_time = IssueQueue[1]
		if issue_time == nil then
			break
		elseif os.clock() - issue_time > SETTINGS.IssueLast then
			table.remove(IssueQueue, 1)
		else
			break
		end
	end
end)
------------------------------------------------------------------------
--
-- * used only in (lparser) luaY:primaryexp()
------------------------------------------------------------------------


function luaK:_self(fs, e, key)
  self:exp2anyreg(fs, e)
  self:freeexp(fs, e)
  local func = fs.freereg
  self:reserveregs(fs, 2)
  self:codeABC(fs, "OP_SELF", func, e.info, self:exp2RK(fs, key))
  self:freeexp(fs, key)
  e.info = func
  e.k = "VNONRELOC"
end
-- HELPER FUNCTIONS
----------------------------------------
-- Set the "MotorMaxTorque" property on all of the CylindricalConstraint motors


local function setMotorTorque(torque)
	motorFR.MotorMaxTorque = torque
	motorFL.MotorMaxTorque = torque
	motorBR.MotorMaxTorque = torque
	motorBL.MotorMaxTorque = torque
end
--[[Transmission]]

--
Tune.Clutch			= true		-- Implements a realistic clutch.

Tune.TransModes		= {"DCT"}												--[[
	[Modes]
		"Manual"	;	Traditional clutch operated manual transmission
		"DCT"		;	Dual clutch transmission, where clutch is operated automatically 
		"Auto"		;	Automatic transmission that shifts for you
		
		>Include within brackets
			eg: {"Manual"} or {"DCT", "Manual"}								
	>First mode is default mode				]]
-- ANimation


local Sound = script:WaitForChild("Haoshoku Sound")

UIS.InputBegan:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.V and Debounce == 1 and Tool.Equip.Value == true and Tool.Active.Value == "None" then
		Debounce = 2
		Track1 = plr.Character.Humanoid:LoadAnimation(script.AnimationCharge)
		Track1:Play()
		script.RemoteEventS:FireServer()
	    EF = game.ReplicatedStorage.Thunder.Aim:Clone()
		EF.Parent = plr.Character
		EF.Name = "AIM"
		for i = 1,math.huge do
			if Debounce == 2 then
				EF.CFrame = CFrame.new(Mouse.Hit.p)
				plr.Character.HumanoidRootPart.CFrame = CFrame.new(plr.Character.HumanoidRootPart.Position, Mouse.Hit.p)
				plr.Character.HumanoidRootPart.Anchored = true
			else
				
				break
				end
	     wait()
	  end
	end
end)

UIS.InputEnded:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.V and Debounce == 2 and Tool.Equip.Value == true and Tool.Active.Value == "None" then
		Debounce = 3
		local Track2 = plr.Character.Humanoid:LoadAnimation(script.AnimationRelease)
		Track2:Play()
		Track1:Stop()
		Sound:Play()
		local mousepos = Mouse.Hit
		script.RemoteEvent:FireServer(mousepos,Mouse.Hit.p)
		wait(0.5)
		EF:Destroy()
		Track2:Stop()
		plr.Character.HumanoidRootPart.Anchored = false
		Tool.Active.Value = "None"
		wait(3)
		Debounce = 1
	end
end)
--model.Part.Touched:Connect(function(player)


	--if triggered==false then
	--	triggered=true
	--	leftTweenOpen:Play()
	--	rightTweenOpen:Play()
	--	model.Part.DoorStart:Play()
	--	wait(4)
	--	model.Part.DoorStart:Stop()
	--	model.Part.DoorStop:Play()
----------------------------------------------------------------------------------------------------
-----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,VRecoil = {0,0}				--- Vertical Recoil
	,HRecoil = {0,0}				--- Horizontal Recoil
	,AimRecover = 0					---- Between 0 & 1
	
	,RecoilPunch = 0
	,VPunchBase = 0					--- Vertical Punch
	,HPunchBase = 0					--- Horizontal Punch
	,DPunchBase = 0 				--- Tilt Punch | useless
	
	,AimRecoilReduction = 0 		--- Recoil Reduction Factor While Aiming (Do not set to 0)
	,PunchRecover = 0
	,MinRecoilPower = 0
	,MaxRecoilPower = 0
	,RecoilPowerStepAmount = 0
	
	,MinSpread = 0					--- Min bullet spread value | Studs
	,MaxSpread = 0					--- Max bullet spread value | Studs
	,AimInaccuracyStepAmount = 0
	,WalkMultiplier = 0				--- Bullet spread based on player speed

	,SwayBase = 0.05				--- Weapon Base Sway | Studs
	,MaxSway =	2					--- Max sway value based on player stamina | Studs
--end



function UpdateGUI(health)
	local pgui = game.Players:GetPlayerFromCharacter(humanoid.Parent).PlayerGui
	local tray = pgui.HealthGUI.Tray
	
	tray.HealthBar.Size = UDim2.new(0.2, 0, 0.8 * (health / humanoid.MaxHealth), 0) 
	tray.HealthBar.Position = UDim2.new(0.4, 0, 0.8 * (1-  (health / humanoid.MaxHealth)) , 0) 
	if script.Parent.Humanoid.Health <= 30 then
		tray.HealthBar.BackgroundColor3 = Color3.new(255/255, 0/255, 0/255)
		print("red")
		tray.Color.Value = "Red"
	elseif script.Parent.Humanoid.Health <= 70 then
		tray.HealthBar.BackgroundColor3 = Color3.new(255/255, 255/255, 0/255)
		print("yellow")
		tray.Color.Value = "Yellow"
	elseif script.Parent.Humanoid.Health > 70 then
		tray.HealthBar.BackgroundColor3 = Color3.new(0/255, 255/255, 0/255)
		print("green")
		tray.Color.Value = "Green"
	end
	if script.Parent.Humanoid.Health == 0 then
		print("dead")
		tray.Color.Value = "Dead"
	end
end


function HealthChanged(health)
	UpdateGUI(health)
end
---Green Script---



script.Parent.Red.Transparency = 0.9
 
script.Parent.Gre.Transparency = 0.9

while true do

	script.Parent.Red.Transparency = 0

	script.Parent.Gre.Transparency = 0.9
	
	wait (1)
	
	script.Parent.Red.Transparency = 0

	script.Parent.Gre.Transparency = 0.9
	
	wait (30)
	
	script.Parent.Red.Transparency = 0 

	script.Parent.Gre.Transparency = 0.9
	
	wait (4)
	
	script.Parent.Red.Transparency = 0

	script.Parent.Gre.Transparency = 0.9
	
	wait (3)
	
	script.Parent.Red.Transparency = 0

	script.Parent.Gre.Transparency = 0.9
	
	wait (1)
	
	script.Parent.Red.Transparency = 0.9
	script.Parent.SoundBox.Beep:Play()
	script.Parent.Gre.Transparency = 0 
	
	wait (25)
	script.Parent.SoundBox.Beep:Stop()
	script.Parent.FlashScript.Disabled = false
	
	wait (5) 
	
	script.Parent.FlashScript.Disabled = true 
	
	script.Parent.Red.Transparency = 0

	script.Parent.Gre.Transparency = 0.9 
	
	wait (4)
	
	script.Parent.Red.Transparency = 0
 
	script.Parent.Gre.Transparency = 0.9
	
	wait (3)	
	
end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------




function Update()
	--- Grab states
	local touchEnabled = _L.Services.UserInputService.TouchEnabled
	local keyboardEnabled = _L.Services.UserInputService.KeyboardEnabled
	local mouseEnabled = _L.Services.UserInputService.MouseEnabled
	local gamepadEnabled =  _L.Services.UserInputService.GamepadEnabled
	local gryoEnabled = _L.Services.UserInputService.GyroscopeEnabled
	local meterEnabled = _L.Services.UserInputService.AccelerometerEnabled
	local vrEnabled = _L.Services.UserInputService.VREnabled
	local isTV = game:GetService("GuiService"):IsTenFootInterface()
	
	--- Vars
	local console = false
	local mobile = false
	local desktop = false
	local vr = false
	
	--- Platform logic
	if gamepadEnabled then
		--- Console (for sure)
		console = true
		
	elseif isTV and (not mouseEnabled) then
		--- Console (maybeee)
		console = true
		
	elseif vrEnabled then
		--- VR (for sure)
		vr = true
		desktop = _L.Settings.SupportsVR or false
		
	elseif touchEnabled and (not mouseEnabled) then
		--- Mobile (for sure)
		mobile = true
		
	elseif gryoEnabled or meterEnabled then
		--- Mobile (maybe)
		mobile = true
		
	else
		--- Desktop (if all else)
		desktop = true
	end
	
	--- Variable logic
	_L.Variables.Desktop = desktop
	_L.Variables.Mobile = mobile
	_L.Variables.Console = console
	_L.Variables.VR = vr
	
end