Change Variables

  1. Variable Change, Inside the pairs Change (Depending if they picked mobile or not)

  2. I’ve copy and paste and change the script but this isn’t very effective when copy and pasting script i’m wondering how to change variable and what inside the in pairs depending on the choice the local player picked

---- Note not that actual Code Just how it should be the variable and inside the pairs
for _, button in pairs(script.Parent.Parent.LeftMiddlePC:GetDescendants()) do
for _, button in pairs(script.Parent.Parent.LeftMiddlePhone:GetDescendants()) do
local Inventoryname = script.Parent.Parent.LeftMiddlePhone.InventoryName
local Inventoryname = script.Parent.Parent.LeftMiddlePC.InventoryName
for _, button in pairs(UIS.TouchEnabled and not UIS.KeyboardEnabled and not UIS.MouseEnabled and not UIS.GamepadEnabled and not GuiService:IsTenFootInterface() and script.Parent.Parent.LeftMiddlePhone:GetDescendants() or script.Parent.Parent.LeftMiddlePC:GetDescendants()) do
local Inventoryname = UIS.TouchEnabled and not UIS.KeyboardEnabled and not UIS.MouseEnabled and not UIS.GamepadEnabled and not GuiService:IsTenFootInterface() and script.Parent.Parent.LeftMiddlePhone.InventoryName or script.Parent.Parent.LeftMiddlePC.InventoryName

Conditional statements without “if”
I’m too lazy to explain :slight_smile: