Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- -> API
- -> API.hasLoaded [Property]
- -> Checks if the API has loaded
- -> API:wait() [Method]
- -> Waits for the API to load (Async)
- -> API:GetProperties(Obj, checkAncestors, includeLocked) [Method]
- -> Returns the properties of an Instance OR ClassName
- -> Parameters
- -> Obj [Instance OR string]
- -> The Instance or ClassName for which properties will be returned (Either type can be used)
- -> checkAncestors [bool]
- -> Default
- -> true
- -> Values
- -> true
- -> Properties inherited from other classes (e.g. BasePart properties inherited by Part) will be included
- -> false
- -> Properties inherited from other classes will not be included
- -> includeLocked [bool]
- -> Default
- -> true
- -> Values
- -> true
- -> Properties with a security context tag (E.g. RobloxLocked) will be included
- -> false
- -> Properties with a security context tag will not be included
- -> Returns
- -> [Array <string>]
- -> Each property's name will be stored in the return Array as a string
- -> Example
- -> Code
- -> print(table.concat(API:GetProperties("Part"), ", "))
- -> Output
- -> Shape, FormFactor, Anchored, BackParamA, BackParamB, BackSurface, BackSurfaceInput,
- -> BottomParamA, BottomParamB, BottomSurface, BottomSurfaceInput, BrickColor, CanCollide,
- -> CustomPhysicalProperties, Elasticity, Friction, FrontParamA, FrontParamB, FrontSurface,
- -> FrontSurfaceInput, LeftParamA, LeftParamB, LeftSurface, LeftSurfaceInput, Locked,
- -> Material, ReceiveAge, Reflectance, ResizeIncrement, ResizeableFaces, RightParamA,
- -> RightParamB, RightSurface, RightSurfaceInput, RotVelocity, SpecificGravity, TopParamA,
- -> TopParamB, TopSurface, TopSurfaceInput, Archivable, ClassName, DataCost, Name, Parent,
- -> RobloxLocked
- -> API:GetPropertiesData(Obj, checkAncestors, includeLocked) [Method]
- -> Returns data about the properties of an Instance OR ClassName (Property name, value type, security context, etc.)
- -> Parameters
- -> Duplicate of parameters for API:GetProperties()
- -> Returns
- -> [Array <Dictionary>]
- -> Each property's information will be stored in the return Array as a Dictionary in the following structure:
- -> {
- Name = Property name [string],
- Type = Property value type [string],
- Class = ClassName the property is directly inherited from [string],
- Deprecated = Is the property deprecated [bool],
- ReadOnly = Is the property read only [bool],
- Security = Security context needed to access this property [string]
- }
- -> Example
- -> Code
- -> local LockedProp = API:GetPropertiesData("DataModel").RobloxLocked
- -> print("Property Name: " .. LockedProp.Name .. ", Property Class: " .. LockedProp.Class .. ",
- -> Property Security: " .. LockedProp.Security .. ", Property Value Type: " .. LockedProp.Type)
- -> Output
- -> Property Name: RobloxLocked, Property Class: Instance, Property Security: PluginSecurity, Property Value Type: bool
- -> API:GetMethods(Obj, checkAncestors, includeLocked) [Method]
- -> Duplicate of API:GetProperties() however it returns methods instead of properties
- -> API:GetMethodsData(Obj, checkAncestors, includeLocked) [Method]
- -> Duplicate of API:GetPropertiesData() however it returns method data instead of property data
- -> API:GetEvents(Obj, checkAncestors, includeLocked) [Method]
- -> Duplicate of API:GetProperties() however it returns events instead of properties
- -> API:GetEventsData(Obj, checkAncestors, includeLocked) [Method]
- -> Duplicate of API:GetPropertiesData() however it returns event data instead of property data
- -> API:GetAncestors(Obj) [Method]
- -> Returns the ancestors of an Instance OR ClassName
- -> Parameters
- -> Obj [Instance OR string]
- -> The Instance or ClassName for which ancestors will be returned (Either type can be used)
- -> Returns
- -> [Array <string>]
- -> Returns Array of ancestor ClassNames
- -> Example
- -> Code
- -> print(table.concat(API:GetAncestors("Part"), ", "))
- -> Output
- -> FormFactorPart, BasePart, PVInstance, Instance, <<<ROOT>>>
- ]]
- --EXAMPLE USAGE--
- local API = require(470628228)
- API:wait()
- print("\n\n-------------------------------------------------------------")
- print("PROPERTIES")
- print("-------------------------------------------------------------\n")
- print("[PART]", table.concat(API:GetProperties("Part"), ", ") .. "\n")
- print("[PART SPECIFIC]", table.concat(API:GetProperties(Instance.new("Part"), false), ", ") .. "\n")
- print("[DATAMODEL UNLOCKED]", table.concat(API:GetProperties("DataModel", true, false), ", ") .. "\n")
- local LockedProp = API:GetPropertiesData("DataModel").RobloxLocked
- print("[DATAMODEL] [ROBLOXLOCKED]", "Property Name: " .. LockedProp.Name .. ", Property Class: " .. LockedProp.Class .. ", Property Security: " .. LockedProp.Security .. ", Property Value Type: " .. LockedProp.Type .. "\n")
- print("-------------------------------------------------------------")
- print("METHODS")
- print("-------------------------------------------------------------" .. "\n")
- print("[WORKSPACE]", table.concat(API:GetMethods("workspace"), ", ") .. "\n")
- print("[PLAYER SPECIFIC]", table.concat(API:GetMethods("Player", false), ", ") .. "\n")
- local ObjMethod = API:GetMethodsData("DataModel").Destroy
- print("[DATAMODEL] [Destroy]", "Method Name: " .. ObjMethod.Name .. ", Method Class: " .. ObjMethod.Class .. ", Method Deprecated: " .. tostring(ObjMethod.Deprecated) .. ", Method ReadOnly: " .. tostring(ObjMethod.ReadOnly) .. "\n")
- print("-------------------------------------------------------------")
- print("EVENTS")
- print("-------------------------------------------------------------" .. "\n")
- print("[GUIOBJECT]", table.concat(API:GetEvents("GuiObject"), ", ") .. "\n")
- print("[GUISERVICE]", table.concat(API:GetEvents(game:GetService("GuiService")), ", ") .. "\n")
- print("[GUISERVICE UNLOCKED]", table.concat(API:GetEvents(game:GetService("GuiService"), true, false), ", ") .. "\n")
- print("-------------------------------------------------------------")
- print("ANCESTORS")
- print("-------------------------------------------------------------" .. "\n")
- print("[SCRIPT]", table.concat(API:GetAncestors("Script"), ", ") .. "\n")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement