InTesting

GetClassIcon but without PluginSecurity

Jul 19th, 2021 (edited)
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.39 KB | None | 0 0
  1. -- dictionary, where index = <string: classname> and value = <number: rectoffset>
  2. local ClassNameRectOffsetX = {
  3.     ABTestService = 0;
  4.     Accessory = 512;
  5.     Accoutrement = 512;
  6.     Actor = 0;
  7.     AdService = 0;
  8.     AdvancedDragger = 0;
  9.     AlignOrientation = 1600;
  10.     AlignPosition = 1584;
  11.     AnalysticsSettings = 0;
  12.     AnalyticsService = 0;
  13.     AngularVelocity = 1648;
  14.     Animation = 960;
  15.     AnimationController = 960;
  16.     AnimationTrack = 960;
  17.     Animator = 0;
  18.     AppStorageService = 0;
  19.     AppUpdateService = 0;
  20.     ArcHandles = 896;
  21.     AssetCounterService = 0;
  22.     AssetDeliveryProxy = 0;
  23.     AssetManagerService = 0;
  24.     AssetService = 0;
  25.     Atmosphere = 448;
  26.     Attachment = 1296;
  27.     AvatarEditorService = 0;
  28.     AvatarImportService = 0;
  29.     Backpack = 320;
  30.     BackpackItem = 0;
  31.     BadgeService = 0;
  32.     BallSocketConstraint = 1376;
  33.     BasePart = 0;
  34.     BasePlayerGui = 0;
  35.     BaseScript = 0;
  36.     BaseWrap = 0;
  37.     Beam = 1536;
  38.     BevelMesh = 0;
  39.     BillboardGui = 1024;
  40.     BinaryStringValue = 0;
  41.     BindableEvent = 1072;
  42.     BindableFunction = 1056;
  43.     BlockMesh = 128;
  44.     BloomEffect = 1328;
  45.     BlurEffect = 1328;
  46.     BodyAngularVelocity = 224;
  47.     BodyColors = 0;
  48.     BodyForce = 224;
  49.     BodyGyro = 224;
  50.     BodyMover = 0;
  51.     BodyPosition = 224;
  52.     BodyThrust = 224;
  53.     BodyVelocity = 224;
  54.     Bone = 1824;
  55.     BoolValue = 64;
  56.     BoxHandleAdornment = 1776;
  57.     BrickColorValue = 64;
  58.     BrowserService = 0;
  59.     BulkImportService = 0;
  60.     CacheableContentProvider = 0;
  61.     CalloutService = 0;
  62.     Camera = 80;
  63.     CatalogPages = 0;
  64.     CFrameValue = 64;
  65.     ChangeHistoryService = 0;
  66.     CharacterAppearance = 0;
  67.     CharacterMesh = 960;
  68.     Chat = 528;
  69.     ChorusSoundEffect = 1344;
  70.     ClickDetector = 656;
  71.     ClientReplicator = 0;
  72.     Clothing = 0;
  73.     Clouds = 448;
  74.     ClusterPacketCache = 0;
  75.     CollectionService = 0;
  76.     Color3Value = 64;
  77.     ColorCorrectionEffect = 1328;
  78.     CompressorSoundEffect = 1344;
  79.     ConeHandleAdornment = 1760;
  80.     Configuration = 928;
  81.     Constraint = 1376;
  82.     ContentProvider = 0;
  83.     ContextActionService = 0;
  84.     Controller = 0;
  85.     ControllerService = 0;
  86.     CookiesService = 0;
  87.     CoreGui = 736;
  88.     CorePackages = 320;
  89.     CoreScript = 0;
  90.     CoreScriptSyncService = 0;
  91.     CornerWedgePart = 16;
  92.     CSGDictionaryService = 0;
  93.     CustomEvent = 64;
  94.     CustomEventReceiver = 64;
  95.     CylinderHandleAdornment = 1744;
  96.     CylinderMesh = 128;
  97.     CylindricalConstraint = 1520;
  98.     DataModel = 0;
  99.     DataModelMesh = 0;
  100.     DataModelSession = 0;
  101.     DataStore = 0;
  102.     DataStoreEnumerationPages = 0;
  103.     DataStoreIncrementOptions = 0;
  104.     DataStoreInfo = 0;
  105.     DataStoreKeyInfo = 0;
  106.     DataStoreKeyPages = 0;
  107.     DataStoreKeyVersionInfo = 0;
  108.     DataStorePages = 0;
  109.     DataStoreService = 0;
  110.     DataStoreSetOptions = 0;
  111.     DataStoreVersionPages = 0;
  112.     Debris = 480;
  113.     DebuggerBreakpoint = 0;
  114.     DebuggerManager = 0;
  115.     DebuggerWatch = 0;
  116.     DebugSettings = 0;
  117.     Decal = 112;
  118.     DepthOfFieldEffect = 1328;
  119.     Dialog = 992;
  120.     DialogChoice = 1008;
  121.     DistortionSoundEffect = 1344;
  122.     DockWidgetPluginGui = 0;
  123.     DoubleConstrainedValue = 64;
  124.     DraftsService = 0;
  125.     Dragger = 0;
  126.     DraggerService = 0;
  127.     DynamicRotate = 0;
  128.     EchoSoundEffect = 1344;
  129.     EmotesPages = 0;
  130.     EqualizerSoundEffect = 1344;
  131.     EventIngestService = 0;
  132.     Explosion = 576;
  133.     FaceInstance = 0;
  134.     Feature = 0;
  135.     File = 0;
  136.     FileMesh = 0;
  137.     Fire = 976;
  138.     Flag = 608;
  139.     FlagStand = 624;
  140.     FlagStandService = 0;
  141.     FlangeSoundEffect = 1344;
  142.     FloorWire = 64;
  143.     FlyweightService = 0;
  144.     Folder = 1232;
  145.     ForceField = 592;
  146.     FormFactorPart = 0;
  147.     Frame = 768;
  148.     FriendPages = 0;
  149.     FriendService = 0;
  150.     FunctionalTest = 0;
  151.     GamepadService = 0;
  152.     GamePassService = 0;
  153.     GameSettings = 0;
  154.     GenericSettings = 0;
  155.     Geometry = 0;
  156.     GetDataStoreOptions = 0;
  157.     GlobalDataStore = 0;
  158.     GlobalSettings = 0;
  159.     Glue = 0;
  160.     GoogleAnalyticsConfiguration = 0;
  161.     GroupService = 0;
  162.     GuiBase = 0;
  163.     GuiBase2d = 0;
  164.     GuiBase3d = 0;
  165.     GuiButton = 832;
  166.     GuidRegistryService = 0;
  167.     GuiLabel = 0;
  168.     GuiMain = 752;
  169.     GuiObject = 0;
  170.     GuiService = 0;
  171.     HandleAdornment = 0;
  172.     Handles = 848;
  173.     HandlesBase = 0;
  174.     HapticService = 0;
  175.     Hat = 720;
  176.     HeightmapImporterService = 0;
  177.     HingeConstraint = 1392;
  178.     Hint = 528;
  179.     Hole = 0;
  180.     Hopper = 0;
  181.     HopperBin = 352;
  182.     HttpRbxApiService = 0;
  183.     HttpRequest = 0;
  184.     HttpService = 0;
  185.     Humanoid = 144;
  186.     HumanoidController = 0;
  187.     HumanoidDescription = 1664;
  188.     ILegacyStudioBridge = 0;
  189.     ImageButton = 832;
  190.     ImageHandleAdornment = 1728;
  191.     ImageLabel = 784;
  192.     IncrementalPatchBuilder = 0;
  193.     InputObject = 0;
  194.     InsertService = 0;
  195.     Instance = 0;
  196.     InstanceAdornment = 0;
  197.     IntConstrainedValue = 64;
  198.     InternalContainer = 0;
  199.     IntValue = 64;
  200.     InventoryPages = 0;
  201.     IXPService = 0;
  202.     JointInstance = 544;
  203.     JointsService = 0;
  204.     KeyboardService = 0;
  205.     Keyframe = 960;
  206.     KeyframeMarker = 960;
  207.     KeyframeSequence = 0;
  208.     KeyframeSequenceProvider = 0;
  209.     LanguageService = 0;
  210.     LayerCollector = 0;
  211.     LegacyStudioBridge = 0;
  212.     Light = 208;
  213.     Lighting = 208;
  214.     LineForce = 1616;
  215.     LineHandleAdornment = 1712;
  216.     LocalizationService = 1472;
  217.     LocalizationTable = 1552;
  218.     LocalScript = 288;
  219.     LocalStorageService = 0;
  220.     LoginService = 0;
  221.     LogService = 0;
  222.     LuaSettings = 0;
  223.     LuaSourceContainer = 0;
  224.     LuaWebService = 0;
  225.     ManualGlue = 0;
  226.     ManualSurfaceJointInstance = 0;
  227.     ManualWeld = 0;
  228.     MarketplaceService = 736;
  229.     MemoryStoreQueue = 0;
  230.     MemoryStoreService = 0;
  231.     MemoryStoreSortedMap = 0;
  232.     MemStorageConnection = 0;
  233.     MemStorageService = 0;
  234.     MeshContentProvider = 0;
  235.     MeshPart = 1168;
  236.     Message = 528;
  237.     MessagingService = 0;
  238.     Model = 32;
  239.     ModuleScript = 1216;
  240.     Motor = 0;
  241.     Motor6D = 1696;
  242.     MotorFeature = 0;
  243.     Mouse = 0;
  244.     MouseService = 0;
  245.     MultipleDocumentInterfaceInstance = 0;
  246.     NegateOperation = 1152;
  247.     NetworkClient = 256;
  248.     NetworkMarker = 0;
  249.     NetworkPeer = 0;
  250.     NetworkReplicator = 464;
  251.     NetworkServer = 240;
  252.     NetworkSettings = 0;
  253.     NoCollisionConstraint = 1680;
  254.     NonReplicatedCSGDictionaryService = 0;
  255.     NotificationService = 0;
  256.     NumberPose = 960;
  257.     NumberValue = 64;
  258.     ObjectValue = 64;
  259.     ObjectVersionInfo = 0;
  260.     OrderedDataStore = 0;
  261.     OutfitPages = 0;
  262.     PackageLink = 1568;
  263.     PackageService = 0;
  264.     Pages = 0;
  265.     Pants = 704;
  266.     ParabolaAdornment = 0;
  267.     Part = 16;
  268.     PartAdornment = 0;
  269.     ParticleEmitter = 1280;
  270.     PartOperation = 0;
  271.     PartOperationAsset = 0;
  272.     Path = 0;
  273.     PathfindingService = 0;
  274.     PermissionsService = 0;
  275.     PhysicsService = 0;
  276.     PhysicsSettings = 0;
  277.     PitchShiftSoundEffect = 1344;
  278.     Platform = 560;
  279.     Player = 192;
  280.     PlayerEmulatorService = 0;
  281.     PlayerGui = 736;
  282.     PlayerMouse = 0;
  283.     Players = 336;
  284.     PlayerScripts = 1248;
  285.     Plugin = 1376;
  286.     PluginAction = 0;
  287.     PluginDebugService = 736;
  288.     PluginDragEvent = 0;
  289.     PluginGui = 0;
  290.     PluginGuiService = 736;
  291.     PluginManager = 0;
  292.     PluginManagerInterface = 0;
  293.     PluginMenu = 0;
  294.     PluginMouse = 0;
  295.     PluginPolicyService = 0;
  296.     PluginToolbar = 0;
  297.     PluginToolbarButton = 0;
  298.     PointLight = 208;
  299.     PointsService = 0;
  300.     PolicyService = 0;
  301.     Pose = 960;
  302.     PoseBase = 960;
  303.     PostEffect = 0;
  304.     PrismaticConstraint = 1408;
  305.     ProximityPrompt = 1984;
  306.     ProximityPromptService = 0;
  307.     PublishService = 0;
  308.     PVAdornment = 0;
  309.     PVInstance = 0;
  310.     QWidgetPluginGui = 0;
  311.     RayValue = 64;
  312.     RbxAnalyticsService = 0;
  313.     ReflectionMetadata = 0;
  314.     ReflectionMetadataCallbacks = 0;
  315.     ReflectionMetadataClass = 0;
  316.     ReflectionMetadataClasses = 0;
  317.     ReflectionMetadataEnum = 0;
  318.     ReflectionMetadataEnumItem = 0;
  319.     ReflectionMetadataEnums = 0;
  320.     ReflectionMetadataEvents = 0;
  321.     ReflectionMetadataFunctions = 0;
  322.     ReflectionMetadataItem = 0;
  323.     ReflectionMetadataMember = 0;
  324.     ReflectionMetadataProperties = 0;
  325.     ReflectionMetadataYieldFunctions = 0;
  326.     RemoteEvent = 1200;
  327.     RemoteFunction = 1184;
  328.     RenderingTest = 80;
  329.     RenderSettings = 0;
  330.     ReplicatedFirst = 1120;
  331.     ReplicatedScriptService = 1120;
  332.     ReplicatedStorage = 1120;
  333.     ReverbSoundEffect = 1344;
  334.     RobloxPluginGuiService = 736;
  335.     RobloxReplicatedStorage = 0;
  336.     RocketPropulsion = 224;
  337.     RodConstraint = 1440;
  338.     RopeConstraint = 1424;
  339.     Rotate = 0;
  340.     RotateP = 0;
  341.     RotateV = 0;
  342.     RunningAverageItemDouble = 0;
  343.     RunningAverageItemInt = 0;
  344.     RunningAverageTimeIntervalItem = 0;
  345.     RunService = 0;
  346.     RuntimeScriptService = 0;
  347.     ScreenGui = 752;
  348.     Script = 96;
  349.     ScriptContext = 0;
  350.     ScriptDebugger = 0;
  351.     ScriptService = 0;
  352.     ScrollingFrame = 768;
  353.     Seat = 560;
  354.     Selection = 0;
  355.     SelectionBox = 864;
  356.     SelectionLasso = 0;
  357.     SelectionPartLasso = 912;
  358.     SelectionPointLasso = 912;
  359.     SelectionSphere = 864;
  360.     ServerReplicator = 0;
  361.     ServerScriptService = 1136;
  362.     ServerStorage = 1104;
  363.     ServiceProvider = 0;
  364.     SessionService = 0;
  365.     Shirt = 688;
  366.     ShirtGraphic = 640;
  367.     SkateboardController = 0;
  368.     SkateboardPlatform = 560;
  369.     Skin = 0;
  370.     Sky = 448;
  371.     SlidingBallConstraint = 1408;
  372.     Smoke = 944;
  373.     Snap = 544;
  374.     SocialService = 0;
  375.     SolidModelContentProvider = 0;
  376.     Sound = 176;
  377.     SoundEffect = 0;
  378.     SoundGroup = 1360;
  379.     SoundService = 496;
  380.     Sparkles = 672;
  381.     SpawnerService = 0;
  382.     SpawnLocation = 400;
  383.     Speaker = 176;
  384.     SpecialMesh = 128;
  385.     SphereHandleAdornment = 1792;
  386.     SpotLight = 208;
  387.     SpringConstraint = 1456;
  388.     StandalonePluginScripts = 1248;
  389.     StandardPages = 0;
  390.     StarterCharacterScripts = 1248;
  391.     StarterGear = 320;
  392.     StarterGui = 736;
  393.     StarterPack = 320;
  394.     StarterPlayer = 1264;
  395.     StarterPlayerScripts = 1248;
  396.     Stats = 0;
  397.     StatsItem = 0;
  398.     Status = 32;
  399.     StopWatchReporter = 0;
  400.     StringValue = 64;
  401.     Studio = 0;
  402.     StudioData = 0;
  403.     StudioDeviceEmulatorService = 0;
  404.     StudioService = 0;
  405.     StudioTheme = 0;
  406.     SunRaysEffect = 1328;
  407.     SurfaceAppearance = 160;
  408.     SurfaceGui = 1024;
  409.     SurfaceLight = 208;
  410.     SurfaceSelection = 880;
  411.     TaskScheduler = 0;
  412.     Team = 384;
  413.     Teams = 368;
  414.     TeleportAsyncResult = 0;
  415.     TeleportOptions = 0;
  416.     TeleportService = 0;
  417.     Terrain = 1040;
  418.     TerrainRegion = 1040;
  419.     TestService = 1088;
  420.     TextBox = 816;
  421.     TextButton = 816;
  422.     TextFilterResult = 0;
  423.     TextLabel = 800;
  424.     TextService = 0;
  425.     Texture = 160;
  426.     ThirdPartyUserService = 0;
  427.     TimerService = 0;
  428.     ToastNotificationService = 0;
  429.     Tool = 272;
  430.     Torque = 1648;
  431.     TorsionSpringConstraint = 2000;
  432.     TotalCountTimeIntervalItem = 0;
  433.     TouchInputService = 0;
  434.     TouchTransmitter = 592;
  435.     TracerService = 0;
  436.     Trail = 1488;
  437.     Translator = 0;
  438.     TremoloSoundEffect = 1344;
  439.     TriangleMeshPart = 0;
  440.     TrussPart = 16;
  441.     Tween = 0;
  442.     TweenBase = 0;
  443.     TweenService = 0;
  444.     UGCValidationService = 0;
  445.     UIAspectRatioConstraint = 416;
  446.     UIBase = 0;
  447.     UIComponent = 0;
  448.     UIConstraint = 0;
  449.     UICorner = 416;
  450.     UIGradient = 416;
  451.     UIGridLayout = 416;
  452.     UIGridStyleLayout = 0;
  453.     UILayout = 0;
  454.     UIListLayout = 416;
  455.     UIPadding = 416;
  456.     UIPageLayout = 416;
  457.     UIScale = 416;
  458.     UISizeConstraint = 416;
  459.     UIStroke = 416;
  460.     UITableLayout = 416;
  461.     UITextSizeConstraint = 416;
  462.     UnionOperation = 1168;
  463.     UniversalConstraint = 1968;
  464.     UnvalidatedAssetService = 0;
  465.     UserGameSettings = 0;
  466.     UserInputService = 0;
  467.     UserService = 0;
  468.     UserSettings = 0;
  469.     UserStorageService = 0;
  470.     ValueBase = 64;
  471.     Vector3Value = 64;
  472.     VectorForce = 1632;
  473.     VehicleController = 0;
  474.     VehicleSeat = 560;
  475.     VelocityMotor = 0;
  476.     VersionControlService = 0;
  477.     VideoFrame = 1920;
  478.     ViewportFrame = 832;
  479.     VirtualInputManager = 0;
  480.     VirtualUser = 0;
  481.     Visit = 0;
  482.     VoiceSource = 176;
  483.     VRService = 0;
  484.     WedgePart = 16;
  485.     Weld = 544;
  486.     WeldConstraint = 1504;
  487.     Workspace = 304;
  488.     WorldModel = 304;
  489.     WorldRoot = 0;
  490.     WrapLayer = 2016;
  491.     WrapTarget = 2032;
  492. }
  493.  
  494. local V2 = Vector2.new
  495.  
  496. -- args: <str: classname> <bool: if true, errors if 1st arg is not an index of dictionary above>
  497. function GetClassIconV2(cn,IsDictionaryExclusive)
  498.     local RectOffsetX = ClassNameRectOffsetX[cn]
  499.     assert(not(IsDictionaryExclusive and not RectOffsetX),'ClassName not found in dictionary')
  500.    
  501.     RectOffsetX = RectOffsetX or 0
  502.    
  503.     local result = {
  504.         Image = "rbxasset://textures/ClassImages.png",
  505.         ImageRectOffset = V2(RectOffsetX, 0),
  506.         ImageRectSize = V2(16, 16)
  507.     }
  508.    
  509.     return result
  510. end
Add Comment
Please, Sign In to add comment