1 | /// <reference no-default-lib="true"/>
|
2 | /// <reference path="lua.d.ts" />
|
3 | /// <reference path="macro_math.d.ts" />
|
4 | /// <reference path="generated/enums.d.ts" />
|
5 | /// <reference path="generated/None.d.ts" />
|
6 | /// <reference types="@rbxts/compiler-types" />
|
7 |
|
8 | // ROBLOX API
|
9 | /**
|
10 | * Intersecting a type with this allows access to Roblox's `Instance.Changed` event.
|
11 | *
|
12 | * @example
|
13 | * function f(p: Part) {
|
14 | * (p as Part & ChangedSignal).Changed.Connect(changedPropertyName => {})
|
15 | * }
|
16 | */
|
17 | type ChangedSignal = {
|
18 | /**
|
19 | * If you want to detect changes of a single property only, you should use [Instance.GetPropertyChangedSignal](https://developer.roblox.com/api-reference/function/Instance/GetPropertyChangedSignal) instead!
|
20 | *
|
21 | * The Changed event fires right after most properties change on objects. It is possible to find the present value of a changed property by using `object[property]`. To get the value of a property before it changes, you must have stored the value of the property before it changed.
|
22 | *
|
23 | * If you are only interested in listening to the change of a specific property, consider using the `GetPropertyChangedSignal` method instead to get an event that only fires when a given property changes.
|
24 | *
|
25 | * This event does not fire for physics-related changes, like when the `CFrame`, `Velocity`, `RotVelocity`, `Position`, `Orientation` and `CFrame` properties of a `BasePart` change due to gravity. To detect changes in these properties, consider using a physics-based event like `RunService.Stepped` or `BasePart.Touched`. A while-true-do loop can also work.
|
26 | *
|
27 | * For "-Value" objects, this event behaves differently: it only fires when the `Value` property changes. See individual pages for `IntValue`, `StringValue`, etc for more information. To detect other changes in these objects, you must use `GetPropertyChangedSignal` instead.
|
28 | */
|
29 | readonly Changed: RBXScriptSignal<(changedPropertyName: string) => void>;
|
30 | };
|
31 |
|
32 | type Tweenable = number | boolean | CFrame | Rect | Color3 | UDim | UDim2 | Vector2 | Vector2int16 | Vector3;
|
33 |
|
34 | type ContentId = string;
|
35 |
|
36 | interface EmoteDictionary {
|
37 | /** When these arrays have more than one emote id in them, it will randomly select one of the emotes to play from the list. */
|
38 | [emoteName: string]: Array<number>;
|
39 | }
|
40 |
|
41 | type EquippedEmotes = Array<{ Name: string; Slot: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 }>;
|
42 |
|
43 | interface UserInfo {
|
44 | Id: number;
|
45 | Username: string;
|
46 | DisplayName: string;
|
47 | }
|
48 |
|
49 | interface GroupInfo {
|
50 | Name: string;
|
51 | Id: number;
|
52 | Owner: {
|
53 | Name: string;
|
54 | Id: number;
|
55 | };
|
56 | EmblemUrl: string;
|
57 | Description: string;
|
58 | Roles: Array<{
|
59 | Name: string;
|
60 | Rank: number;
|
61 | }>;
|
62 | }
|
63 |
|
64 | interface GetGroupsAsyncResult {
|
65 | Name: string;
|
66 | Id: number;
|
67 | EmblemUrl: string;
|
68 | Description: string;
|
69 | Rank: number;
|
70 | Role: string;
|
71 | IsPrimary: boolean;
|
72 | IsInClan: boolean;
|
73 | }
|
74 |
|
75 | type HttpHeaders = Record<string, string> | Map<string, string>;
|
76 | interface RequestAsyncRequest {
|
77 | Url: string;
|
78 | Method?: "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "PATCH";
|
79 | Body?: string;
|
80 | Headers?: HttpHeaders;
|
81 | Compress?: Enum.HttpCompression;
|
82 | }
|
83 |
|
84 | interface RequestAsyncResponse {
|
85 | Success: boolean;
|
86 | StatusCode: number;
|
87 | StatusMessage: string;
|
88 | Headers: Record<string, string>;
|
89 | Body: string;
|
90 | }
|
91 |
|
92 | interface SetInfo {
|
93 | AssetSetId: string;
|
94 | CategoryId: string;
|
95 | CreatorName: string;
|
96 | Description: string;
|
97 | ImageAssetId: string;
|
98 | Name: string;
|
99 | SetType: string;
|
100 | }
|
101 |
|
102 | interface CollectionInfo {
|
103 | AssetId: string;
|
104 | AssetSetId: string;
|
105 | AssetVersionId: string;
|
106 | IsTrusted: boolean;
|
107 | Name: string;
|
108 | CreatorName: string;
|
109 | }
|
110 |
|
111 | interface BaseAccessoryInfo {
|
112 | AssetId: number;
|
113 | AccessoryType: Enum.AccessoryType;
|
114 | }
|
115 | interface RigidAccessoryInfo extends BaseAccessoryInfo {
|
116 | IsLayered: false;
|
117 | }
|
118 | interface LayeredAccessoryInfo extends BaseAccessoryInfo {
|
119 | IsLayered: true;
|
120 | Order: number;
|
121 | Puffiness?: number;
|
122 | }
|
123 | type AccessoryInfo = RigidAccessoryInfo | LayeredAccessoryInfo;
|
124 |
|
125 | interface FreeSearchResult {
|
126 | CurrentStartIndex: string;
|
127 | Results: Array<{
|
128 | AssetId: string;
|
129 | AssetVersionId: string;
|
130 | CreatorName: string;
|
131 | Name: string;
|
132 | }>;
|
133 | TotalCount: string;
|
134 | }
|
135 |
|
136 | interface LocalizationEntry {
|
137 | Key: string;
|
138 | Source: string;
|
139 | Context: string;
|
140 | Example: string;
|
141 | Values: Map<string, string>;
|
142 | }
|
143 |
|
144 | interface LogInfo {
|
145 | message: string;
|
146 | messageType: Enum.MessageType;
|
147 | timestamp: number;
|
148 | }
|
149 |
|
150 | interface ReceiptInfo {
|
151 | /** the id of the player making the purchase */
|
152 | PlayerId: number;
|
153 | /** the specific place where the purchase was made */
|
154 | PlaceIdWherePurchased: number;
|
155 | /** a unique identifier for the purchase, should be used to prevent granting an item multiple times for one purchase */
|
156 | PurchaseId: string;
|
157 | /** the id of the purchased product */
|
158 | ProductId: number;
|
159 | /** the type of currency used (Tix, Robux) */
|
160 | CurrencyType: Enum.CurrencyType;
|
161 | /** the amount of currency spent on the product for this purchase */
|
162 | CurrencySpent: number;
|
163 | }
|
164 |
|
165 | interface ProductInfo {
|
166 | /** The name shown on the asset's page */
|
167 | Name: string;
|
168 | /** The description as shown on the asset's page; May be `undefined` if the description is empty. */
|
169 | Description: string | undefined;
|
170 | /** The cost of purchasing the asset using Robux */
|
171 | PriceInRobux: number | undefined;
|
172 | /** Timestamp of when the asset was created, e.g. `2018-08-01T17:55:11.98Z` */
|
173 | Created: string;
|
174 | /** Timestamp of when the asset was last updated by its creator, e.g. `2018-08-01T17:55:11.98Z` */
|
175 | Updated: string;
|
176 | /** Describes whether the asset is purchasable */
|
177 | IsForSale: boolean;
|
178 | /** The number of items the asset has been sold */
|
179 | Sales: number | undefined;
|
180 | ProductId: number;
|
181 | /** A table of information describing the creator of the asset */
|
182 | Creator: {
|
183 | /** Either `User` or `Group` */
|
184 | CreatorType: "User" | "Group" | undefined;
|
185 | /** The ID of the creator user or group */
|
186 | CreatorTargetId: number;
|
187 | /** The name/username of the creator */
|
188 | Name: string | undefined;
|
189 | };
|
190 | TargetId: number;
|
191 | }
|
192 |
|
193 | interface AssetProductInfo extends ProductInfo {
|
194 | /** Describes whether the asset is a User Product, Developer Product, or Game Pass */
|
195 | ProductType: "User Product";
|
196 | /** If InfoType was Asset, this is the ID of the given asset. */
|
197 | AssetId: number;
|
198 | /** The [type of asset](https://developer.roblox.com/articles/Asset-types) (e.g. place, model, shirt). In TypeScript, you should compare this value to a member of the `AssetTypeId` const enum. */
|
199 | AssetTypeId: AssetTypeId;
|
200 | /** Describes whether the asset is marked as "new" in the catalog */
|
201 | IsNew: boolean;
|
202 | /** Describes whether the asset is a "limited item" that is no longer (if ever) sold */
|
203 | IsLimited: boolean;
|
204 | /** Describes whether the asset is a "limited unique" ("Limited U") item that only has a fixed number sold */
|
205 | IsLimitedUnique: boolean;
|
206 | /** Describes whether the asset can be taken for free */
|
207 | IsPublicDomain: boolean;
|
208 | /** The remaining number of items a limited unique item may be sold */
|
209 | Remaining: number | undefined;
|
210 | /** Indicates whether the item is marked as 13+ in catalog */
|
211 | ContentRatingTypeId: number;
|
212 | /** The minimum Builder's Club subscription necessary to purchase the item */
|
213 | MinimumMembershipLevel: number;
|
214 | }
|
215 |
|
216 | interface DeveloperProductInfo extends ProductInfo {
|
217 | /** Describes whether the asset is a User Product, Developer Product, or Game Pass */
|
218 | ProductType: "Developer Product";
|
219 | IconImageAssetId: number;
|
220 | }
|
221 |
|
222 | interface GamePassProductInfo extends ProductInfo {
|
223 | /** Describes whether the asset is a User Product, Developer Product, or Game Pass */
|
224 | ProductType: "Game Pass";
|
225 | IconImageAssetId: number;
|
226 | }
|
227 |
|
228 | interface SubscriptionProductInfo extends ProductInfo {
|
229 | /** Describes whether the asset is a User Product, Developer Product, or Game Pass */
|
230 | ProductType: "Subscription";
|
231 | }
|
232 |
|
233 | interface BadgeInfo {
|
234 | /** The name of the badge. */
|
235 | Name: string;
|
236 | /** The description of the badge. */
|
237 | Description: string;
|
238 | /** The asset ID of the image for this badge. */
|
239 | IconImageId: number;
|
240 | /** Indicates whether this badge is available to be awarded. */
|
241 | IsEnabled: boolean;
|
242 | }
|
243 |
|
244 | interface BundleInfo {
|
245 | /** What kind of Bundle this is */
|
246 | BundleType: "BodyParts" | "AvatarAnimations";
|
247 |
|
248 | /** The Description of the Bundle */
|
249 | Description: string;
|
250 |
|
251 | /** The Bundle Id */
|
252 | Id: number;
|
253 |
|
254 | /** An array of all assets contained within this bundle */
|
255 | Items: Array<{
|
256 | /** The Id of the individual item */
|
257 | Id: number;
|
258 | /** The name of the individual asset */
|
259 | Name: string;
|
260 | /** What type the individual asset is */
|
261 | Type: "Asset" | "UserOutfit";
|
262 | }>;
|
263 |
|
264 | /** The name of the Bundle */
|
265 | Name: string;
|
266 | }
|
267 |
|
268 | type TeleportData = string | number | boolean | Array<unknown> | Map<unknown, unknown>;
|
269 |
|
270 | interface PlayerJoinInfo {
|
271 | /** The `DataModel.GameId` of the experience the `Player` teleported from. Only present if the player teleports to the current experience and if a server calls the teleport function. */
|
272 | SourceGameId?: number;
|
273 | /** The `DataModel.PlaceId` of the place the `Player` teleported from. Only present if the player teleports to the current place and a server calls the teleport function. */
|
274 | SourcePlaceId?: number;
|
275 | /** An array containing the `UserId` numbers of the users teleported alongside the `Player`. Only present if the player teleported as part of a group. */
|
276 | Members?: Array<number>;
|
277 | /** Reflects the `teleportData` specified in the original teleport. Useful for sharing information between servers the player teleports to. Only present if `teleportData` was specified and a server calls the teleport function. */
|
278 | TeleportData?: TeleportData;
|
279 | /** A string containing launch data specified in the URL the player clicks to join the experience. Only present if the URL contains launch data. */
|
280 | LaunchData?: string;
|
281 | }
|
282 |
|
283 | interface BoundActionInfo {
|
284 | inputTypes: Array<Enum.KeyCode | Enum.PlayerActions | Enum.UserInputType | string>;
|
285 | priorityLevel: number;
|
286 | stackOrder: number;
|
287 | }
|
288 |
|
289 | declare const enum AssetTypeId {
|
290 | Image = 1,
|
291 | TShirt = 2,
|
292 | Audio = 3,
|
293 | Mesh = 4,
|
294 | Lua = 5,
|
295 | Hat = 8,
|
296 | Place = 9,
|
297 | Model = 10,
|
298 | Shirt = 11,
|
299 | Pants = 12,
|
300 | Decal = 13,
|
301 | Head = 17,
|
302 | Face = 18,
|
303 | Gear = 19,
|
304 | Badge = 21,
|
305 | Animation = 24,
|
306 | Torso = 27,
|
307 | RightArm = 28,
|
308 | LeftArm = 29,
|
309 | LeftLeg = 30,
|
310 | RightLeg = 31,
|
311 | Package = 32,
|
312 | GamePass = 34,
|
313 | Plugin = 38,
|
314 | MeshPart = 40,
|
315 | HairAccessory = 41,
|
316 | FaceAccessory = 42,
|
317 | NeckAccessory = 43,
|
318 | ShoulderAccessory = 44,
|
319 | FrontAccessory = 45,
|
320 | BackAccessory = 46,
|
321 | WaistAccessory = 47,
|
322 | ClimbAnimation = 48,
|
323 | DeathAnimation = 49,
|
324 | FallAnimation = 50,
|
325 | IdleAnimation = 51,
|
326 | JumpAnimation = 52,
|
327 | RunAnimation = 53,
|
328 | SwimAnimation = 54,
|
329 | WalkAnimation = 55,
|
330 | PoseAnimation = 56,
|
331 | EarAccessory = 57,
|
332 | EyeAccessory = 58,
|
333 | EmoteAnimation = 61,
|
334 | Video = 62,
|
335 | TShirtAccessory = 64,
|
336 | ShirtAccessory = 65,
|
337 | PantsAccessory = 66,
|
338 | JacketAccessory = 67,
|
339 | SweaterAccessory = 68,
|
340 | ShortsAccessory = 69,
|
341 | LeftShoeAccessory = 70,
|
342 | RightShoeAccessory = 71,
|
343 | DressSkirtAccessory = 72,
|
344 | FontFamily = 73,
|
345 | EyebrowAccessory = 76,
|
346 | EyelashAccessory = 77,
|
347 | MoodAnimation = 78,
|
348 | DynamicHead = 79,
|
349 | }
|
350 |
|
351 | interface AgentParameters {
|
352 | /** Humanoid radius. Used to determine the minimum separation from obstacles. */
|
353 | AgentRadius?: number;
|
354 | /** Humanoid height.
|
355 | * Empty space smaller than this value, like the space under stairs, will be marked as non-traversable.
|
356 | */
|
357 | AgentHeight?: number;
|
358 | /** Sets whether off-mesh links for jumping are allowed. */
|
359 | AgentCanJump?: boolean;
|
360 | /** Determines whether climbing `TrussParts` during pathfinding is allowed. */
|
361 | AgentCanClimb?: boolean;
|
362 | /** Determines the spacing between intermediate waypoints in path. */
|
363 | WaypointSpacing?: number;
|
364 | /** Table of materials or defined PathfindingModifiers and their "cost" for traversal. Useful for making the agent prefer certain materials/regions over others. */
|
365 | Costs?: { [K in Enum.Material["Name"]]?: number } & { [index: string]: number };
|
366 | }
|
367 |
|
368 | interface CollisionGroupInfo {
|
369 | mask: number;
|
370 | name: string;
|
371 | }
|
372 |
|
373 | declare const enum LocationType {
|
374 | MobileWebsite = 0,
|
375 | MobileInGame = 1,
|
376 | Website = 2,
|
377 | Studio = 3,
|
378 | InGame = 4,
|
379 | XBoxApp = 5,
|
380 | TeamCreate = 6,
|
381 | }
|
382 |
|
383 | interface FriendOnlineInfoBase {
|
384 | /** The UserId of the friend. */
|
385 | VisitorId: number;
|
386 | /** The user name of the friend. */
|
387 | UserName: string;
|
388 | /** The display name of the friend. */
|
389 | DisplayName: string;
|
390 | /** When the user was last online. */
|
391 | LastOnline: string;
|
392 | /** If the friend is currently online. */
|
393 | IsOnline: boolean;
|
394 | /** The name of the friends current location. */
|
395 | LastLocation: string;
|
396 | }
|
397 |
|
398 | interface FriendOnlineInfoWebsite extends FriendOnlineInfoBase {
|
399 | /** A numeric enum of the friends last location.
|
400 | * In TS, you can check this value against the `LocationType` const enum
|
401 | */
|
402 | LocationType: LocationType.MobileWebsite | LocationType.Website | LocationType.XBoxApp;
|
403 | }
|
404 |
|
405 | interface FriendOnlineInfoGame extends FriendOnlineInfoBase {
|
406 | /** A numeric enum of the friends last location.
|
407 | * In TS, you can check this value against the `LocationType` const enum
|
408 | */
|
409 | LocationType: LocationType.MobileInGame | LocationType.InGame | LocationType.TeamCreate;
|
410 | /** The placeId of the friends last location. Check the `LocationType` to determine whether this property exists. */
|
411 | PlaceId: number;
|
412 | /** The DataModel / JobId of the friends last location.
|
413 | * Check the `LocationType` to determine whether this property exists.
|
414 | */
|
415 | GameId: string;
|
416 | }
|
417 |
|
418 | interface FriendOnlineInfoStudio extends FriendOnlineInfoBase {
|
419 | /** A numeric enum of the friends last location.
|
420 | * In TS, you can check this value against the `LocationType` const enum
|
421 | */
|
422 | LocationType: LocationType.Studio;
|
423 | /** The placeId of the friends last location. Check the `LocationType` to determine whether this property exists. */
|
424 | PlaceId: number;
|
425 | }
|
426 |
|
427 | type FriendOnlineInfo = FriendOnlineInfoWebsite | FriendOnlineInfoGame | FriendOnlineInfoStudio;
|
428 |
|
429 | /** A dictionary of an id and name containing information about what type an asset is */
|
430 | type AssetType =
|
431 | | { id: AssetTypeId.Image; name: "Image" }
|
432 | | { id: AssetTypeId.TShirt; name: "TeeShirt" }
|
433 | | { id: AssetTypeId.Audio; name: "Audio" }
|
434 | | { id: AssetTypeId.Mesh; name: "Mesh" }
|
435 | | { id: AssetTypeId.Lua; name: "Lua" }
|
436 | | { id: AssetTypeId.Hat; name: "Hat" }
|
437 | | { id: AssetTypeId.Place; name: "Place" }
|
438 | | { id: AssetTypeId.Model; name: "Model" }
|
439 | | { id: AssetTypeId.Shirt; name: "Shirt" }
|
440 | | { id: AssetTypeId.Pants; name: "Pants" }
|
441 | | { id: AssetTypeId.Decal; name: "Decal" }
|
442 | | { id: AssetTypeId.Head; name: "Head" }
|
443 | | { id: AssetTypeId.Face; name: "Face" }
|
444 | | { id: AssetTypeId.Gear; name: "Gear" }
|
445 | | { id: AssetTypeId.Badge; name: "Badge" }
|
446 | | { id: AssetTypeId.Animation; name: "Animation" }
|
447 | | { id: AssetTypeId.Torso; name: "Torso" }
|
448 | | { id: AssetTypeId.RightArm; name: "RightArm" }
|
449 | | { id: AssetTypeId.LeftArm; name: "LeftArm" }
|
450 | | { id: AssetTypeId.LeftLeg; name: "LeftLeg" }
|
451 | | { id: AssetTypeId.RightLeg; name: "RightLeg" }
|
452 | | { id: AssetTypeId.Package; name: "Package" }
|
453 | | { id: AssetTypeId.GamePass; name: "GamePass" }
|
454 | | { id: AssetTypeId.Plugin; name: "Plugin" }
|
455 | | { id: AssetTypeId.MeshPart; name: "MeshPart" }
|
456 | | { id: AssetTypeId.HairAccessory; name: "HairAccessory" }
|
457 | | { id: AssetTypeId.FaceAccessory; name: "FaceAccessory" }
|
458 | | { id: AssetTypeId.NeckAccessory; name: "NeckAccessory" }
|
459 | | { id: AssetTypeId.ShoulderAccessory; name: "ShoulderAccessory" }
|
460 | | { id: AssetTypeId.FrontAccessory; name: "FrontAccessory" }
|
461 | | { id: AssetTypeId.BackAccessory; name: "BackAccessory" }
|
462 | | { id: AssetTypeId.WaistAccessory; name: "WaistAccessory" }
|
463 | | { id: AssetTypeId.ClimbAnimation; name: "ClimbAnimation" }
|
464 | | { id: AssetTypeId.DeathAnimation; name: "DeathAnimation" }
|
465 | | { id: AssetTypeId.FallAnimation; name: "FallAnimation" }
|
466 | | { id: AssetTypeId.IdleAnimation; name: "IdleAnimation" }
|
467 | | { id: AssetTypeId.JumpAnimation; name: "JumpAnimation" }
|
468 | | { id: AssetTypeId.RunAnimation; name: "RunAnimation" }
|
469 | | { id: AssetTypeId.SwimAnimation; name: "SwimAnimation" }
|
470 | | { id: AssetTypeId.WalkAnimation; name: "WalkAnimation" }
|
471 | | { id: AssetTypeId.PoseAnimation; name: "PoseAnimation" }
|
472 | | { id: AssetTypeId.EarAccessory; name: "EarAccessory" }
|
473 | | { id: AssetTypeId.EyeAccessory; name: "EyeAccessory" };
|
474 |
|
475 | /** Information about a player's avatar in dictionary form */
|
476 | interface CharacterAppearanceInfo {
|
477 | /** Describes the BrickColor values for each limb */
|
478 | bodyColors: {
|
479 | /** The BrickColor value of the leftArm */
|
480 | leftArmColorId: keyof BrickColorsByNumber;
|
481 | /** The BrickColor value of the torso */
|
482 | torsoColorId: keyof BrickColorsByNumber;
|
483 | /** The BrickColor value of the rightArm */
|
484 | rightArmColorId: keyof BrickColorsByNumber;
|
485 | /** The BrickColor value of the head */
|
486 | headColorId: keyof BrickColorsByNumber;
|
487 | /** The BrickColor value of the leftLeg */
|
488 | leftLegColorId: keyof BrickColorsByNumber;
|
489 | /** The BrickColor value of the rightLeg */
|
490 | rightLegColorId: keyof BrickColorsByNumber;
|
491 | };
|
492 |
|
493 | /** The assets currently equipped by the Player (hats, body parts, etc, excluding gear) */
|
494 | assets: Array<{
|
495 | /** The asset ID of the equipped asset */
|
496 | id: number;
|
497 |
|
498 | /** A table with `name` and `id` fields, each describing the kind of asset equipped ("Hat", "Face", etc.). In TypeScript, the `id` can be compared to a member of the `AssetTypeId` const enum. */
|
499 | assetType: AssetType;
|
500 |
|
501 | /** The name of the equipped asset */
|
502 | name: string;
|
503 | }>;
|
504 |
|
505 | /** Describes whether default pants are applied */
|
506 | defaultPantsApplied: boolean;
|
507 |
|
508 | /** Describes whether default shirt are applied */
|
509 | defaultShirtApplied: boolean;
|
510 |
|
511 | /** What kind of avatar it is */
|
512 | playerAvatarType: "R6" | "R15";
|
513 |
|
514 | /** A dictionary of scaling properties */
|
515 | scales: {
|
516 | bodyType: number;
|
517 | head: number;
|
518 | height: number;
|
519 | proportion: number;
|
520 | depth: number;
|
521 | width: number;
|
522 | };
|
523 | }
|
524 |
|
525 | interface MakeSystemMessageConfig {
|
526 | Text: string;
|
527 | Color?: Color3;
|
528 | Font?: Enum.Font;
|
529 | TextSize?: number;
|
530 | }
|
531 |
|
532 | interface SendNotificationConfig {
|
533 | Title: string;
|
534 | Text: string;
|
535 | Icon?: string;
|
536 | Duration?: number;
|
537 | Callback?: BindableFunction;
|
538 | Button1?: string;
|
539 | Button2?: string;
|
540 | }
|
541 |
|
542 | interface PolicyInfo {
|
543 | /** When true, the player might see immersive ads within an experience. */
|
544 | AreAdsAllowed: boolean;
|
545 | /** When true, the player cannot interact with paid (via in-experience currency or Robux) random item generators. */
|
546 | ArePaidRandomItemsRestricted: boolean;
|
547 | /** A list of external link references (for example, social media links, handles, or iconography) a player is permitted to see. Possible values include: “Discord”, “Facebook”, “Twitch”, and “YouTube”. */
|
548 | AllowedExternalLinkReferences: Array<string>;
|
549 | /** When true, the player is eligible to purchase subscriptions within an experience. */
|
550 | IsEligibleToPurchaseSubscription: boolean;
|
551 | /** When true, the player can trade virtual items that they purchased with in-experience currency or Robux. */
|
552 | IsPaidItemTradingAllowed: boolean;
|
553 | /** When true, an experience should enforce compliance changes. See [here](https://devforum.roblox.com/t/about-our-upcoming-global-compliance-system/461447) for details. */
|
554 | IsSubjectToChinaPolicies: boolean;
|
555 | }
|
556 |
|
557 | interface AvatarRulesBodyColorsPalette {
|
558 | HexColor: string;
|
559 | Name: string;
|
560 | BrickColorId: number;
|
561 | }
|
562 |
|
563 | interface AvatarRules {
|
564 | BodyColorsPalette: ReadonlyArray<AvatarRulesBodyColorsPalette>;
|
565 | BundlesEnabledForUser: boolean;
|
566 | MinimumDeltaEBodyColorDifference: number;
|
567 | WearableAssetTypes: ReadonlyArray<{
|
568 | Id: number;
|
569 | MaxNumber: number;
|
570 | Name: string;
|
571 | }>;
|
572 | ProportionsAndBodyTypeEnabledForUser: boolean;
|
573 | PlayerAvatarTypes: ReadonlyArray<string>;
|
574 | Scales: {
|
575 | BodyType: {
|
576 | Max: number;
|
577 | Increment: number;
|
578 | Min: number;
|
579 | };
|
580 | Head: {
|
581 | Max: number;
|
582 | Increment: number;
|
583 | Min: number;
|
584 | };
|
585 | Height: {
|
586 | Max: number;
|
587 | Increment: number;
|
588 | Min: number;
|
589 | };
|
590 | Proportion: {
|
591 | Max: number;
|
592 | Increment: number;
|
593 | Min: number;
|
594 | };
|
595 | Width: {
|
596 | Max: number;
|
597 | Increment: number;
|
598 | Min: number;
|
599 | };
|
600 | };
|
601 | DefaultClothingAssetLists: {
|
602 | DefaultPantAssetIds: ReadonlyArray<number>;
|
603 | DefaultShirtAssetIds: ReadonlyArray<number>;
|
604 | };
|
605 | EmotesEnabledForUser: boolean;
|
606 | BasicBodyColorsPalette: ReadonlyArray<AvatarRulesBodyColorsPalette>;
|
607 | }
|
608 |
|
609 | interface ItemDetailsBase {
|
610 | CreatorHasVerifiedBadge: boolean;
|
611 | Genres: ReadonlyArray<Enum.Genre["Name"]>;
|
612 | Price: number;
|
613 | Owned: boolean;
|
614 | ProductId: number;
|
615 | ItemRestrictions: ReadonlyArray<string>;
|
616 | ItemStatus: ReadonlyArray<string>;
|
617 | SaleLocationType: string;
|
618 | FavoriteCount: number;
|
619 | Id: number;
|
620 | Name: string;
|
621 | Description: string;
|
622 | IsPurchasable: boolean;
|
623 | LowestPrice?: number;
|
624 | LowestResalePrice?: number;
|
625 | CreatorTargetId: number;
|
626 | CreatorName: string;
|
627 | CreatorType: string;
|
628 | ExpectedSellerId: number;
|
629 | }
|
630 |
|
631 | interface AssetItemDetails extends ItemDetailsBase {
|
632 | ItemType: "Asset";
|
633 | AssetType: Enum.AssetType["Name"];
|
634 | }
|
635 |
|
636 | interface BundleItemDetails extends ItemDetailsBase {
|
637 | ItemType: "Bundle";
|
638 | BundleType: Enum.BundleType["Name"];
|
639 | BundledItems: ReadonlyArray<{
|
640 | Owned: boolean;
|
641 | Id: number;
|
642 | Name: string;
|
643 | Type: "Asset" | "UserOutfit";
|
644 | }>;
|
645 | }
|
646 |
|
647 | type ItemDetails = AssetItemDetails | BundleItemDetails;
|
648 |
|
649 | interface RecommendedAsset {
|
650 | Item: {
|
651 | AssetId: number;
|
652 | Name: string;
|
653 | Price: number;
|
654 | PremiumPrice: number;
|
655 | AbsoluteUrl: string;
|
656 | AudioUrl: string;
|
657 | };
|
658 | Creator: {
|
659 | CreatorId: number;
|
660 | CreatorType: string;
|
661 | Name: string;
|
662 | CreatorProfileLink: string;
|
663 | };
|
664 | Product: {
|
665 | Id: number;
|
666 | PriceInRobux: number;
|
667 | IsForSale: boolean;
|
668 | IsPublicDomain: boolean;
|
669 | IsResellable: boolean;
|
670 | IsLimited: boolean;
|
671 | IsLimitedUnique: boolean;
|
672 | SerialNumber: number;
|
673 | IsRental: boolean;
|
674 | RentalDurationInHours: number;
|
675 | BcRequirement: number;
|
676 | TotalPrivateSales: number;
|
677 | SellerId: number;
|
678 | SellerName: string;
|
679 | LowestPrivateSaleUserAssetId: number;
|
680 | IsXboxExclusiveItem: boolean;
|
681 | OffsaleDeadline: string;
|
682 | NoPriceText: string;
|
683 | IsFree: boolean;
|
684 | };
|
685 | }
|
686 |
|
687 | interface RecommendedBundle {
|
688 | Id: number;
|
689 | Name: string;
|
690 | Description: string;
|
691 | BundleType: string;
|
692 | Items: ReadonlyArray<{
|
693 | Owned: boolean;
|
694 | Id: number;
|
695 | Name: string;
|
696 | Type: string;
|
697 | }>;
|
698 | Creator: {
|
699 | Id: number;
|
700 | Name: string;
|
701 | Type: string;
|
702 | };
|
703 | Product: {
|
704 | Id: number;
|
705 | Type: string;
|
706 | IsPublicDomain: boolean;
|
707 | IsForSale: boolean;
|
708 | PriceInRobux: number;
|
709 | PremiumPricing: {
|
710 | PremiumDiscountPercentage: number;
|
711 | PremiumPriceInRobux: number;
|
712 | };
|
713 | };
|
714 | }
|
715 |
|
716 | interface SearchCatalogResultBase {
|
717 | Id: number;
|
718 | Name: string;
|
719 | Description: string;
|
720 | ProductId: number;
|
721 | Genres: ReadonlyArray<Enum.Genre["Name"]>;
|
722 | ItemStatus: ReadonlyArray<string>;
|
723 | ItemRestrictions: ReadonlyArray<string>;
|
724 | CreatorType: "User" | "Group";
|
725 | CreatorTargetId: number;
|
726 | CreatorName: string;
|
727 | Price: number;
|
728 | PremiumPricing: {
|
729 | PremiumDiscountPercentage: number;
|
730 | PremiumPriceInRobux: number;
|
731 | };
|
732 | LowestPrice: number;
|
733 | PriceStatus?: string;
|
734 | UnitsAvailableForConsumption: number;
|
735 | PurchaseCount: number;
|
736 | FavoriteCount: number;
|
737 | SaleLocationType: string;
|
738 | CreatorHasVerifiedBadge: boolean;
|
739 | }
|
740 |
|
741 | interface SearchCatalogAssetResult extends SearchCatalogResultBase {
|
742 | ItemType: "Asset";
|
743 | AssetType: Enum.AssetType["Name"];
|
744 | }
|
745 |
|
746 | interface SearchCatalogBundleResult extends SearchCatalogResultBase {
|
747 | ItemType: "Bundle";
|
748 | BundleType: Enum.BundleType["Name"];
|
749 | BundledItems: ReadonlyArray<{
|
750 | Owned: boolean;
|
751 | Id: number;
|
752 | Name: string;
|
753 | Type: "Asset" | "UserOutfit";
|
754 | }>;
|
755 | }
|
756 |
|
757 | type SearchCatalogResult = SearchCatalogAssetResult | SearchCatalogBundleResult;
|
758 |
|
759 | /**
|
760 | * RBXScriptConnection, also known as a Connection,
|
761 | * is a special object returned by the Connect method of an Event (RBXScriptSignal).
|
762 | * This is used primarily to disconnect a listener from an Event.
|
763 | */
|
764 | interface RBXScriptConnection {
|
765 | /**
|
766 | * Describes whether or not the connection is still alive.
|
767 | * This will become false if connection:Disconnect() is called.
|
768 | */
|
769 | Connected: boolean;
|
770 | /** Disconnects the connection from the event. */
|
771 | Disconnect(this: RBXScriptConnection): void;
|
772 | }
|
773 |
|
774 | /**
|
775 | * RBXScriptSignal, more commonly known as an Event, is a special kind of Roblox object.
|
776 | * It provides a way for user-defined functions, called listeners, to be called when something happens in the game.
|
777 | * When a certain event happens, the Event is fired, calling any listeners that are connected to the Event.
|
778 | * An Event may also pass arguments to each listener, to provide extra information about the event that occurred.
|
779 | */
|
780 | interface RBXScriptSignal<T extends Callback = Callback> {
|
781 | /**
|
782 | * Establishes a function to be called whenever the event is raised.
|
783 | * Returns a RBXScriptConnection object associated with the connection.
|
784 | * @param callback The function to be called whenever the event is fired.
|
785 | */
|
786 | Connect(this: RBXScriptSignal, callback: T): RBXScriptConnection;
|
787 |
|
788 | ConnectParallel(this: RBXScriptSignal, callback: T): RBXScriptConnection;
|
789 |
|
790 | Once(this: RBXScriptSignal, callback: T): RBXScriptConnection;
|
791 |
|
792 | /**
|
793 | * Yields the current thread until this signal is fired. Returns what was fired to the signal.
|
794 | */
|
795 | Wait(this: RBXScriptSignal): LuaTuple<Parameters<T>>;
|
796 | }
|
797 |
|
798 | // generated in generated/None.d.ts
|
799 | interface Instances {}
|
800 | interface CreatableInstances {}
|
801 |
|
802 | // InstanceConstructor
|
803 | interface InstanceConstructor {
|
804 | /**
|
805 | * Creates an new object of type val. The parent argument is optional;
|
806 | * If it is supplied, the object will be parented to that object.
|
807 | * Performance note: When the Parent of an object is set,
|
808 | * Roblox begins listening to a variety of different property changes for replication,
|
809 | * rendering and physics.
|
810 | * Therefore, it is recommended to set the Parent property last when creating new objects.
|
811 | * As such, you should avoid using the second argument (parent) of this function.
|
812 | * You can read [this thread on the developer forum](https://devforum.roblox.com/t/psa-dont-use-instance-new-with-parent-argument/30296) for more information.
|
813 | */
|
814 | new <T extends keyof CreatableInstances>(className: T, parent?: Instance): CreatableInstances[T];
|
815 | /**
|
816 | * Creates a new object with the same type and property values as an existing object. In most cases using `Instance:Clone()` is more appropriate, but this constructor is useful when implementing low‑level libraries or systems.
|
817 | *
|
818 | * There are two behavioral differences between this constructor and the `Instance:Clone()` method:
|
819 | * - This constructor will not copy any of the descendant `Instances` parented to the existing object.
|
820 | * - This constructor will return a new object even if the existing object had `Instance.Archivable` set to `false`.
|
821 | */
|
822 | fromExisting: <T extends Instance>(existingInstance: T) => T;
|
823 | }
|
824 |
|
825 | declare const Instance: InstanceConstructor;
|
826 |
|
827 | /**
|
828 | * Axes is a datatype used for the ArcHandles class to control what rotation axes are currently enabled.
|
829 | */
|
830 | interface Axes {
|
831 | /**
|
832 | * **DO NOT USE!**
|
833 | *
|
834 | * This field exists to force TypeScript to recognize this as a nominal type
|
835 | * @hidden
|
836 | * @deprecated
|
837 | */
|
838 | readonly _nominal_Axes: unique symbol;
|
839 | /** Whether the X axis is enabled */
|
840 | readonly X: boolean;
|
841 | /** Whether the Y axis is enabled */
|
842 | readonly Y: boolean;
|
843 | /** Whether the Z axis is enabled */
|
844 | readonly Z: boolean;
|
845 | /** Whether the top face is included */
|
846 | readonly Top: boolean;
|
847 | /** Whether the bottom face is included */
|
848 | readonly Bottom: boolean;
|
849 | /** Whether the left face is included */
|
850 | readonly Left: boolean;
|
851 | /** Whether the right face is included */
|
852 | readonly Right: boolean;
|
853 | /** Whether the back face is included */
|
854 | readonly Back: boolean;
|
855 | /** Whether the front face is included */
|
856 | readonly Front: boolean;
|
857 | }
|
858 |
|
859 | type AxesConstructor = new (...axes: Array<Enum.Axis | Enum.NormalId>) => Axes;
|
860 | declare const Axes: AxesConstructor;
|
861 |
|
862 | interface BrickColor<T extends keyof BrickColorsByNumber = keyof BrickColorsByNumber> {
|
863 | /**
|
864 | * **DO NOT USE!**
|
865 | *
|
866 | * This field exists to force TypeScript to recognize this as a nominal type
|
867 | * @hidden
|
868 | * @deprecated
|
869 | */
|
870 | readonly _nominal_BrickColor: unique symbol;
|
871 | /** The unique number that identifies the BrickColor */
|
872 | readonly Number: T;
|
873 | /** The name associated with the BrickColor */
|
874 | readonly Name: BrickColorsByNumber[T];
|
875 | /** The Color3 associated with the BrickColor */
|
876 | readonly Color: Color3;
|
877 | /** The red component (between 0 and 1) */
|
878 | readonly r: number;
|
879 | /** The green component (between 0 and 1) */
|
880 | readonly g: number;
|
881 | /** The blue component (between 0 and 1) */
|
882 | readonly b: number;
|
883 | }
|
884 |
|
885 | interface BrickColorsByNumber {
|
886 | 1: "White";
|
887 | 2: "Grey";
|
888 | 3: "Light yellow";
|
889 | 5: "Brick yellow";
|
890 | 6: "Light green (Mint)";
|
891 | 9: "Light reddish violet";
|
892 | 11: "Pastel Blue";
|
893 | 12: "Light orange brown";
|
894 | 18: "Nougat";
|
895 | 21: "Bright red";
|
896 | 22: "Med. reddish violet";
|
897 | 23: "Bright blue";
|
898 | 24: "Bright yellow";
|
899 | 25: "Earth orange";
|
900 | 26: "Black";
|
901 | 27: "Dark grey";
|
902 | 28: "Dark green";
|
903 | 29: "Medium green";
|
904 | 36: "Lig. Yellowich orange";
|
905 | 37: "Bright green";
|
906 | 38: "Dark orange";
|
907 | 39: "Light bluish violet";
|
908 | 40: "Transparent";
|
909 | 41: "Tr. Red";
|
910 | 42: "Tr. Lg blue";
|
911 | 43: "Tr. Blue";
|
912 | 44: "Tr. Yellow";
|
913 | 45: "Light blue";
|
914 | 47: "Tr. Flu. Reddish orange";
|
915 | 48: "Tr. Green";
|
916 | 49: "Tr. Flu. Green";
|
917 | 50: "Phosph. White";
|
918 | 100: "Light red";
|
919 | 101: "Medium red";
|
920 | 102: "Medium blue";
|
921 | 103: "Light grey";
|
922 | 104: "Bright violet";
|
923 | 105: "Br. yellowish orange";
|
924 | 106: "Bright orange";
|
925 | 107: "Bright bluish green";
|
926 | 108: "Earth yellow";
|
927 | 110: "Bright bluish violet";
|
928 | 111: "Tr. Brown";
|
929 | 112: "Medium bluish violet";
|
930 | 113: "Tr. Medi. reddish violet";
|
931 | 115: "Med. yellowish green";
|
932 | 116: "Med. bluish green";
|
933 | 118: "Light bluish green";
|
934 | 119: "Br. yellowish green";
|
935 | 120: "Lig. yellowish green";
|
936 | 121: "Med. yellowish orange";
|
937 | 123: "Br. reddish orange";
|
938 | 124: "Bright reddish violet";
|
939 | 125: "Light orange";
|
940 | 126: "Tr. Bright bluish violet";
|
941 | 127: "Gold";
|
942 | 128: "Dark nougat";
|
943 | 131: "Silver";
|
944 | 133: "Neon orange";
|
945 | 134: "Neon green";
|
946 | 135: "Sand blue";
|
947 | 136: "Sand violet";
|
948 | 137: "Medium orange";
|
949 | 138: "Sand yellow";
|
950 | 140: "Earth blue";
|
951 | 141: "Earth green";
|
952 | 143: "Tr. Flu. Blue";
|
953 | 145: "Sand blue metallic";
|
954 | 146: "Sand violet metallic";
|
955 | 147: "Sand yellow metallic";
|
956 | 148: "Dark grey metallic";
|
957 | 149: "Black metallic";
|
958 | 150: "Light grey metallic";
|
959 | 151: "Sand green";
|
960 | 153: "Sand red";
|
961 | 154: "Dark red";
|
962 | 157: "Tr. Flu. Yellow";
|
963 | 158: "Tr. Flu. Red";
|
964 | 168: "Gun metallic";
|
965 | 176: "Red flip/flop";
|
966 | 178: "Yellow flip/flop";
|
967 | 179: "Silver flip/flop";
|
968 | 180: "Curry";
|
969 | 190: "Fire Yellow";
|
970 | 191: "Flame yellowish orange";
|
971 | 192: "Reddish brown";
|
972 | 193: "Flame reddish orange";
|
973 | 194: "Medium stone grey";
|
974 | 195: "Royal blue";
|
975 | 196: "Dark Royal blue";
|
976 | 198: "Bright reddish lilac";
|
977 | 199: "Dark stone grey";
|
978 | 200: "Lemon metalic";
|
979 | 208: "Light stone grey";
|
980 | 209: "Dark Curry";
|
981 | 210: "Faded green";
|
982 | 211: "Turquoise";
|
983 | 212: "Light Royal blue";
|
984 | 213: "Medium Royal blue";
|
985 | 216: "Rust";
|
986 | 217: "Brown";
|
987 | 218: "Reddish lilac";
|
988 | 219: "Lilac";
|
989 | 220: "Light lilac";
|
990 | 221: "Bright purple";
|
991 | 222: "Light purple";
|
992 | 223: "Light pink";
|
993 | 224: "Light brick yellow";
|
994 | 225: "Warm yellowish orange";
|
995 | 226: "Cool yellow";
|
996 | 232: "Dove blue";
|
997 | 268: "Medium lilac";
|
998 | 301: "Slime green";
|
999 | 302: "Smoky grey";
|
1000 | 303: "Dark blue";
|
1001 | 304: "Parsley green";
|
1002 | 305: "Steel blue";
|
1003 | 306: "Storm blue";
|
1004 | 307: "Lapis";
|
1005 | 308: "Dark indigo";
|
1006 | 309: "Sea green";
|
1007 | 310: "Shamrock";
|
1008 | 311: "Fossil";
|
1009 | 312: "Mulberry";
|
1010 | 313: "Forest green";
|
1011 | 314: "Cadet blue";
|
1012 | 315: "Electric blue";
|
1013 | 316: "Eggplant";
|
1014 | 317: "Moss";
|
1015 | 318: "Artichoke";
|
1016 | 319: "Sage green";
|
1017 | 320: "Ghost grey";
|
1018 | 321: "Lilac";
|
1019 | 322: "Plum";
|
1020 | 323: "Olivine";
|
1021 | 324: "Laurel green";
|
1022 | 325: "Quill grey";
|
1023 | 327: "Crimson";
|
1024 | 328: "Mint";
|
1025 | 329: "Baby blue";
|
1026 | 330: "Carnation pink";
|
1027 | 331: "Persimmon";
|
1028 | 332: "Maroon";
|
1029 | 333: "Gold";
|
1030 | 334: "Daisy orange";
|
1031 | 335: "Pearl";
|
1032 | 336: "Fog";
|
1033 | 337: "Salmon";
|
1034 | 338: "Terra Cotta";
|
1035 | 339: "Cocoa";
|
1036 | 340: "Wheat";
|
1037 | 341: "Buttermilk";
|
1038 | 342: "Mauve";
|
1039 | 343: "Sunrise";
|
1040 | 344: "Tawny";
|
1041 | 345: "Rust";
|
1042 | 346: "Cashmere";
|
1043 | 347: "Khaki";
|
1044 | 348: "Lily white";
|
1045 | 349: "Seashell";
|
1046 | 350: "Burgundy";
|
1047 | 351: "Cork";
|
1048 | 352: "Burlap";
|
1049 | 353: "Beige";
|
1050 | 354: "Oyster";
|
1051 | 355: "Pine Cone";
|
1052 | 356: "Fawn brown";
|
1053 | 357: "Hurricane grey";
|
1054 | 358: "Cloudy grey";
|
1055 | 359: "Linen";
|
1056 | 360: "Copper";
|
1057 | 361: "Dirt brown";
|
1058 | 362: "Bronze";
|
1059 | 363: "Flint";
|
1060 | 364: "Dark taupe";
|
1061 | 365: "Burnt Sienna";
|
1062 | 1001: "Institutional white";
|
1063 | 1002: "Mid gray";
|
1064 | 1003: "Really black";
|
1065 | 1004: "Really red";
|
1066 | 1005: "Deep orange";
|
1067 | 1006: "Alder";
|
1068 | 1007: "Dusty Rose";
|
1069 | 1008: "Olive";
|
1070 | 1009: "New Yeller";
|
1071 | 1010: "Really blue";
|
1072 | 1011: "Navy blue";
|
1073 | 1012: "Deep blue";
|
1074 | 1013: "Cyan";
|
1075 | 1014: "CGA brown";
|
1076 | 1015: "Magenta";
|
1077 | 1016: "Pink";
|
1078 | 1017: "Deep orange";
|
1079 | 1018: "Teal";
|
1080 | 1019: "Toothpaste";
|
1081 | 1020: "Lime green";
|
1082 | 1021: "Camo";
|
1083 | 1022: "Grime";
|
1084 | 1023: "Lavender";
|
1085 | 1024: "Pastel light blue";
|
1086 | 1025: "Pastel orange";
|
1087 | 1026: "Pastel violet";
|
1088 | 1027: "Pastel blue-green";
|
1089 | 1028: "Pastel green";
|
1090 | 1029: "Pastel yellow";
|
1091 | 1030: "Pastel brown";
|
1092 | 1031: "Royal purple";
|
1093 | 1032: "Hot pink";
|
1094 | }
|
1095 |
|
1096 | interface BrickColorsByPalette {
|
1097 | 0: 141;
|
1098 | 1: 301;
|
1099 | 2: 107;
|
1100 | 3: 26;
|
1101 | 4: 1012;
|
1102 | 5: 303;
|
1103 | 6: 1011;
|
1104 | 7: 304;
|
1105 | 8: 28;
|
1106 | 9: 1018;
|
1107 | 10: 302;
|
1108 | 11: 305;
|
1109 | 12: 306;
|
1110 | 13: 307;
|
1111 | 14: 308;
|
1112 | 15: 1021;
|
1113 | 16: 309;
|
1114 | 17: 310;
|
1115 | 18: 1019;
|
1116 | 19: 135;
|
1117 | 20: 102;
|
1118 | 21: 23;
|
1119 | 22: 1010;
|
1120 | 23: 312;
|
1121 | 24: 313;
|
1122 | 25: 37;
|
1123 | 26: 1022;
|
1124 | 27: 1020;
|
1125 | 28: 1027;
|
1126 | 29: 311;
|
1127 | 30: 315;
|
1128 | 31: 1023;
|
1129 | 32: 1031;
|
1130 | 33: 316;
|
1131 | 34: 151;
|
1132 | 35: 317;
|
1133 | 36: 318;
|
1134 | 37: 319;
|
1135 | 38: 1024;
|
1136 | 39: 314;
|
1137 | 40: 1013;
|
1138 | 41: 1006;
|
1139 | 42: 321;
|
1140 | 43: 322;
|
1141 | 44: 104;
|
1142 | 45: 1008;
|
1143 | 46: 119;
|
1144 | 47: 323;
|
1145 | 48: 324;
|
1146 | 49: 325;
|
1147 | 50: 320;
|
1148 | 51: 11;
|
1149 | 52: 1026;
|
1150 | 53: 1016;
|
1151 | 54: 1032;
|
1152 | 55: 1015;
|
1153 | 56: 327;
|
1154 | 57: 1005;
|
1155 | 58: 1009;
|
1156 | 59: 29;
|
1157 | 60: 328;
|
1158 | 61: 1028;
|
1159 | 62: 208;
|
1160 | 63: 45;
|
1161 | 64: 329;
|
1162 | 65: 330;
|
1163 | 66: 331;
|
1164 | 67: 1004;
|
1165 | 68: 21;
|
1166 | 69: 332;
|
1167 | 70: 333;
|
1168 | 71: 24;
|
1169 | 72: 334;
|
1170 | 73: 226;
|
1171 | 74: 1029;
|
1172 | 75: 335;
|
1173 | 76: 336;
|
1174 | 77: 342;
|
1175 | 78: 343;
|
1176 | 79: 338;
|
1177 | 80: 1007;
|
1178 | 81: 339;
|
1179 | 82: 133;
|
1180 | 83: 106;
|
1181 | 84: 340;
|
1182 | 85: 341;
|
1183 | 86: 1001;
|
1184 | 87: 1;
|
1185 | 88: 9;
|
1186 | 89: 1025;
|
1187 | 90: 337;
|
1188 | 91: 344;
|
1189 | 92: 345;
|
1190 | 93: 1014;
|
1191 | 94: 105;
|
1192 | 95: 346;
|
1193 | 96: 347;
|
1194 | 97: 348;
|
1195 | 98: 349;
|
1196 | 99: 1030;
|
1197 | 100: 125;
|
1198 | 101: 101;
|
1199 | 102: 350;
|
1200 | 103: 192;
|
1201 | 104: 351;
|
1202 | 105: 352;
|
1203 | 106: 353;
|
1204 | 107: 354;
|
1205 | 108: 1002;
|
1206 | 109: 5;
|
1207 | 110: 18;
|
1208 | 111: 217;
|
1209 | 112: 355;
|
1210 | 113: 356;
|
1211 | 114: 153;
|
1212 | 115: 357;
|
1213 | 116: 358;
|
1214 | 117: 359;
|
1215 | 118: 360;
|
1216 | 119: 38;
|
1217 | 120: 361;
|
1218 | 121: 362;
|
1219 | 122: 199;
|
1220 | 123: 194;
|
1221 | 124: 363;
|
1222 | 125: 364;
|
1223 | 126: 365;
|
1224 | 127: 1003;
|
1225 | }
|
1226 |
|
1227 | interface BrickColorConstructor {
|
1228 | /** Returns a random BrickColor. */
|
1229 | random: () => BrickColor;
|
1230 |
|
1231 | /** Returns a White BrickColor */
|
1232 | White: () => BrickColor<1>;
|
1233 | /** Returns a Gray BrickColor */
|
1234 | Gray: () => BrickColor<194>;
|
1235 | /** Returns a DarkGray BrickColor */
|
1236 | DarkGray: () => BrickColor<199>;
|
1237 | /** Returns a Black BrickColor */
|
1238 | Black: () => BrickColor<26>;
|
1239 | /** Returns a Red BrickColor */
|
1240 | Red: () => BrickColor<21>;
|
1241 | /** Returns a Yellow BrickColor */
|
1242 | Yellow: () => BrickColor<24>;
|
1243 | /** Returns a Green BrickColor */
|
1244 | Green: () => BrickColor<28>;
|
1245 | /** Returns a Blue BrickColor */
|
1246 | Blue: () => BrickColor<23>;
|
1247 |
|
1248 | /** Constructs a BrickColor from its name. */
|
1249 | new <T extends BrickColorsByNumber[keyof BrickColorsByNumber]>(
|
1250 | val: T,
|
1251 | ): BrickColor<
|
1252 | { [K in keyof BrickColorsByNumber]: T extends BrickColorsByNumber[K] ? K : never }[keyof BrickColorsByNumber]
|
1253 | >;
|
1254 |
|
1255 | /** Constructs a BrickColor from its numerical index. */
|
1256 | new <T extends keyof BrickColorsByNumber>(val: T): BrickColor<T>;
|
1257 |
|
1258 | /** Constructs a BrickColor from its numerical index. */
|
1259 | new (val: number): BrickColor;
|
1260 |
|
1261 | /** Constructs the closest BrickColor that can be matched to the specified RGB components. */
|
1262 | new (r: number, g: number, b: number): BrickColor;
|
1263 |
|
1264 | /** Constructs the closest BrickColor that can be matched to the specified Color3. */
|
1265 | new (color: Color3): BrickColor;
|
1266 |
|
1267 | /** Constructs a BrickColor from its palette index. */
|
1268 | palette<T extends keyof BrickColorsByPalette>(this: void, paletteValue: T): BrickColor<BrickColorsByPalette[T]>;
|
1269 | palette(this: void, paletteValue: number): BrickColor;
|
1270 | }
|
1271 |
|
1272 | declare const BrickColor: BrickColorConstructor;
|
1273 |
|
1274 | // CatalogSearchParams
|
1275 | interface CatalogSearchParams {
|
1276 | /**
|
1277 | * **DO NOT USE!**
|
1278 | *
|
1279 | * This field exists to force TypeScript to recognize this as a nominal type
|
1280 | * @hidden
|
1281 | * @deprecated
|
1282 | */
|
1283 | readonly _nominal_CatalogSearchParams: unique symbol;
|
1284 | /** The keyword to search for catalog results with. */
|
1285 | SearchKeyword: string;
|
1286 | /** The minimum item price to search for. */
|
1287 | MinPrice: number;
|
1288 | /** The maximum item price to search for. */
|
1289 | MaxPrice: number;
|
1290 | /** The order in which to sort the results. */
|
1291 | SortType: Enum.CatalogSortType;
|
1292 | /** The time period to use to aggregate the sort results. */
|
1293 | SortAggregation: Enum.CatalogSortAggregation;
|
1294 | /** The category to filter the search by. */
|
1295 | CategoryFilter: Enum.CatalogCategoryFilter;
|
1296 | /** The sales type filter the search by. */
|
1297 | SalesTypeFilter: Enum.SalesTypeFilter;
|
1298 | /** An array containing BundleType values to filter the search by. */
|
1299 | BundleTypes: ReadonlyArray<Enum.BundleType>;
|
1300 | /** An array containing AvatarAssetType values to filter the search by. */
|
1301 | AssetTypes: ReadonlyArray<Enum.AvatarAssetType>;
|
1302 | /** Whether off sale items should be included in the results. */
|
1303 | IncludeOffSale: boolean;
|
1304 | /** Search for items with the given creator. */
|
1305 | CreatorName: string;
|
1306 | }
|
1307 |
|
1308 | interface CatalogSearchParamsConstructor {
|
1309 | new (): CatalogSearchParams;
|
1310 | }
|
1311 |
|
1312 | declare const CatalogSearchParams: CatalogSearchParamsConstructor;
|
1313 |
|
1314 | // CFrame
|
1315 | interface CFrame {
|
1316 | /**
|
1317 | * **DO NOT USE!**
|
1318 | *
|
1319 | * This field exists to force TypeScript to recognize this as a nominal type
|
1320 | * @hidden
|
1321 | * @deprecated
|
1322 | */
|
1323 | readonly _nominal_CFrame: unique symbol;
|
1324 | /** The 3D position of the CFrame */
|
1325 | readonly Position: Vector3;
|
1326 | /** A copy of the CFrame with no translation. */
|
1327 | readonly Rotation: CFrame;
|
1328 | /** The x-coordinate of the position */
|
1329 | readonly X: number;
|
1330 | /** The y-coordinate of the position */
|
1331 | readonly Y: number;
|
1332 | /** The z-coordinate of the position */
|
1333 | readonly Z: number;
|
1334 | /** The forward-direction component of the CFrame’s orientation. */
|
1335 | readonly LookVector: Vector3;
|
1336 | /** The right-direction component of the CFrame’s orientation. */
|
1337 | readonly RightVector: Vector3;
|
1338 | /** The up-direction component of the CFrame’s orientation. */
|
1339 | readonly UpVector: Vector3;
|
1340 | /** Equivalent to the first/top row of the rotation matrix, or `Vector3.new(r00, r10, r20)` */
|
1341 | readonly XVector: Vector3;
|
1342 | /** Equivalent to the second/middle row of the rotation matrix, or `Vector3.new(r01, r11, r21)` */
|
1343 | readonly YVector: Vector3;
|
1344 | /** Equivalent to the third/bottom row of the rotation matrix, or `Vector3.new(r02, r12, r22)` */
|
1345 | readonly ZVector: Vector3;
|
1346 | /** Returns the inverse of this CFrame */
|
1347 | Inverse(this: CFrame): CFrame;
|
1348 | /** Returns a CFrame interpolated between this CFrame and the goal by the fraction alpha */
|
1349 | Lerp(this: CFrame, goal: CFrame, alpha: number): CFrame;
|
1350 | /**
|
1351 | * Returns an orthonormalized copy of the CFrame. The BasePart.CFrame property automatically applies orthonormalization,
|
1352 | * but other APIs which take CFrames do not, so this method is occasionally necessary when incrementally updating a CFrame and using it with them.
|
1353 | */
|
1354 | Orthonormalize(this: CFrame): CFrame;
|
1355 | /** Returns a CFrame transformed from Object to World space. Equivalent to `[CFrame * cf]` */
|
1356 | ToWorldSpace(this: CFrame, cf: CFrame): CFrame;
|
1357 | /** Returns a CFrame transformed from World to Object space. Equivalent to `[CFrame:inverse() * cf]` */
|
1358 | ToObjectSpace(this: CFrame, cf: CFrame): CFrame;
|
1359 | /** Returns a Vector3 transformed from Object to World space. Equivalent to `[CFrame * v3]` */
|
1360 | PointToWorldSpace(this: CFrame, v3: Vector3): Vector3;
|
1361 | /** Returns a Vector3 transformed from World to Object space. Equivalent to `[CFrame:inverse() * v3]` */
|
1362 | PointToObjectSpace(this: CFrame, v3: Vector3): Vector3;
|
1363 | /** Returns a Vector3 rotated from Object to World space. Equivalent to `[(CFrame - CFrame.p) *v3]` */
|
1364 | VectorToWorldSpace(this: CFrame, v3: Vector3): Vector3;
|
1365 | /** Returns a Vector3 rotated from World to Object space. Equivalent to `[(CFrame:inverse() - CFrame:inverse().p) * v3]` */
|
1366 | VectorToObjectSpace(this: CFrame, v3: Vector3): Vector3;
|
1367 | /** Returns the values: x, y, z, R00, R01, R02, R10, R11, R12, R20, R21, R22, where R00-R22 represent the 3x3 rotation matrix of the CFrame, and xyz represent the position of the CFrame. */
|
1368 | GetComponents(
|
1369 | this: CFrame,
|
1370 | ): LuaTuple<[number, number, number, number, number, number, number, number, number, number, number, number]>;
|
1371 | /** Returns approximate angles that could be used to generate CFrame, if angles were applied in Z, Y, X order */
|
1372 | ToEulerAnglesXYZ(this: CFrame): LuaTuple<[number, number, number]>;
|
1373 | /** Returns approximate angles that could be used to generate CFrame, if angles were applied in Z, X, Y order */
|
1374 | ToEulerAnglesYXZ(this: CFrame): LuaTuple<[number, number, number]>;
|
1375 | /** Returns approximate angles that could be used to generate CFrame, if angles were applied in Z, X, Y order (Equivalent to toEulerAnglesYXZ) */
|
1376 | ToOrientation(this: CFrame): LuaTuple<[number, number, number]>;
|
1377 | /** Returns a tuple of a Vector3 and a number which represent the rotation of the CFrame in the axis-angle representation */
|
1378 | ToAxisAngle(this: CFrame): LuaTuple<[Vector3, number]>;
|
1379 | }
|
1380 |
|
1381 | interface CFrameConstructor {
|
1382 | /**
|
1383 | * An identity CFrame, one with no translation or rotation.
|
1384 | *
|
1385 | * This API member is a **constant**, and must be accessed through the `CFrame` global as opposed to an individual
|
1386 | * `CFrame` object.
|
1387 | *
|
1388 | * ```lua
|
1389 | * print(CFrame.identity) --> 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1
|
1390 | * ```
|
1391 | */
|
1392 | readonly identity: CFrame;
|
1393 | /** Equivalent to fromEulerAnglesXYZ */
|
1394 | Angles: (rX: number, rY: number, rZ: number) => CFrame;
|
1395 | /** Creates a rotated CFrame from a Unit Vector3 and a rotation in radians */
|
1396 | fromAxisAngle: (unit: Vector3, rotation: number) => CFrame;
|
1397 | /** Creates a rotated CFrame using angles (rx, ry, rz) in radians. Rotations are applied in the optional Enum.RotationOrder with a default of `XYZ`. */
|
1398 | fromEulerAngles: (rX: number, rY: number, rZ: number, order?: Enum.RotationOrder) => CFrame;
|
1399 | /** Creates a rotated CFrame using angles (rx, ry, rz) in radians. Rotations are applied in Z, Y, X order. */
|
1400 | fromEulerAnglesXYZ: (rX: number, rY: number, rZ: number) => CFrame;
|
1401 | /** Creates a rotated CFrame using angles (rx, ry, rz) in radians. Rotations are applied in Z, X, Y order. */
|
1402 | fromEulerAnglesYXZ: (rX: number, rY: number, rZ: number) => CFrame;
|
1403 | /** Creates a CFrame from a translation and the columns of a rotation matrix. If vz is excluded,
|
1404 | * the third column is calculated as `[vx:Cross(vy).Unit]`.
|
1405 | */
|
1406 | fromMatrix: (pos: Vector3, vX: Vector3, vY: Vector3, vZ?: Vector3) => CFrame;
|
1407 | /** Equivalent to fromEulerAnglesYXZ */
|
1408 | fromOrientation: (rX: number, rY: number, rZ: number) => CFrame;
|
1409 | /**
|
1410 | * Creates a new CFrame located at `at` and facing towards `lookAt`, optionally specifying the upward direction (by default, (0, 1, 0)).
|
1411 | *
|
1412 | * This function replaces the `CFrame.new(Vector3, Vector3)` constructor which accomplished a similar task. This function allows you to specify the `up` Vector, using the same default as the old constructor.
|
1413 | */
|
1414 | lookAt: (at: Vector3, lookAt: Vector3, up?: Vector3) => CFrame;
|
1415 | /**
|
1416 | * Returns a new CFrame with the position of `at` and facing along `direction`, optionally specifying the upward direction (`up`) with a default of `(0, 1, 0)`.
|
1417 | *
|
1418 | * This constructor is equivalent to `CFrame.lookAt(at, at + direction)`.
|
1419 | */
|
1420 | lookAlong: (at: Vector3, direction: Vector3, up?: Vector3) => CFrame;
|
1421 | /** Creates a CFrame from a Vector3 */
|
1422 | new (pos: Vector3): CFrame;
|
1423 | /** Creates a CFrame from position (x, y, z). */
|
1424 | new (x: number, y: number, z: number): CFrame;
|
1425 | /** Creates a blank identity CFrame. */
|
1426 | new (): CFrame;
|
1427 | /** Creates a CFrame from position (x, y, z) and quaternion (qX, qY, qZ, qW) */
|
1428 | new (x: number, y: number, z: number, qX: number, qY: number, qZ: number, qW: number): CFrame;
|
1429 | /** Creates a CFrame from position (x, y, z) with an orientation specified by the rotation matrix `[[R00 R01 R02] [R10 R11 R12] [R20 R21 R22]]` */
|
1430 | new (
|
1431 | x: number,
|
1432 | y: number,
|
1433 | z: number,
|
1434 | R00: number,
|
1435 | R01: number,
|
1436 | R02: number,
|
1437 | R10: number,
|
1438 | R11: number,
|
1439 | R12: number,
|
1440 | R20: number,
|
1441 | R21: number,
|
1442 | R22: number,
|
1443 | ): CFrame;
|
1444 | /** Creates a CFrame located at pos with it’s lookVector pointing towards the lookAt position. */
|
1445 | new (pos: Vector3, lookAt: Vector3): CFrame;
|
1446 | }
|
1447 |
|
1448 | declare const CFrame: CFrameConstructor;
|
1449 |
|
1450 | interface ClipEvaluator {
|
1451 | /**
|
1452 | * **DO NOT USE!**
|
1453 | *
|
1454 | * This field exists to force TypeScript to recognize this as a nominal type
|
1455 | * @hidden
|
1456 | * @deprecated
|
1457 | */
|
1458 | readonly _nominal_ClipEvaluator: unique symbol;
|
1459 | }
|
1460 |
|
1461 | interface Color3 {
|
1462 | /**
|
1463 | * **DO NOT USE!**
|
1464 | *
|
1465 | * This field exists to force TypeScript to recognize this as a nominal type
|
1466 | * @hidden
|
1467 | * @deprecated
|
1468 | */
|
1469 | readonly _nominal_Color3: unique symbol;
|
1470 | /** The red value of the color (between 0 and 1) */
|
1471 | readonly R: number;
|
1472 | /** The green value of the color (between 0 and 1) */
|
1473 | readonly G: number;
|
1474 | /** The blue value of the color (between 0 and 1) */
|
1475 | readonly B: number;
|
1476 | /** Returns a Color3 interpolated between two Color3 objects. Alpha is a number from 0 to 1. */
|
1477 | Lerp(this: Color3, goal: Color3, alpha: number): Color3;
|
1478 | /** Returns the [hue, saturation, and value](https://en.wikipedia.org/wiki/HSL_and_HSV) of a Color3. This function is the inverse operation of the `Color3.fromHSV` constructor. */
|
1479 | ToHSV(this: Color3): LuaTuple<[number, number, number]>;
|
1480 | /**
|
1481 | * Converts the color to a six-character hexadecimal string representing the color in the format RRGGBB. It is not
|
1482 | * prefixed with an octothorpe (#), although this can be concatenated easily.
|
1483 | *
|
1484 | * The returned string can be provided to `Color3.fromHex` to produce the original color.
|
1485 | * ```lua
|
1486 | * print(Color3.new(0, 1, 0):ToHex()) --> "00FF00"
|
1487 | * print(BrickColor.new("Really red").Color:ToHex()) --> "FF0000"
|
1488 | * ```
|
1489 | */
|
1490 | ToHex(this: Color3): string;
|
1491 | }
|
1492 |
|
1493 | interface Color3Constructor {
|
1494 | /** Creates a Color3 with the given red, green, and blue. The numbers can range from 0 to 255. */
|
1495 | fromRGB: (r?: number, g?: number, b?: number) => Color3;
|
1496 | /** Creates a Color3 with the given hue, saturation, and value. The numbers can range from 0 to 1. */
|
1497 | fromHSV: (hue: number, sat: number, val: number) => Color3;
|
1498 | /** Returns the hue, saturation, and value of a Color3. */
|
1499 | toHSV: (color: Color3) => LuaTuple<[number, number, number]>;
|
1500 | /**
|
1501 | * Returns a new Color3 from a six- or three-character [hexadecimal](https://en.wikipedia.org/wiki/Hexadecimal)
|
1502 | * format. A preceding octothorpe (#) is ignored, if present. This function interprets the given string as a typical
|
1503 | * web hex color in the format RRGGBB or RGB (shorthand for RRGGBB). For example, #FFAA00 produces an orange color,
|
1504 | * and is the same as #FA0.
|
1505 | *
|
1506 | * The color returned can be converted back into hex using `Color3:toHex`, although it is not guaranteed to return
|
1507 | * the exact same string as passed to this function.
|
1508 | * ```lua
|
1509 | * print(Color3.fromHex("#FF0000")) --> 1, 0, 0
|
1510 | * ```
|
1511 | */
|
1512 | fromHex: (hex: string) => Color3;
|
1513 | /** Returns a Color3 with the given red, green, and blue values. The numbers can range from 0 to 1, defaulting to 0 */
|
1514 | new (red?: number, green?: number, blue?: number): Color3;
|
1515 | }
|
1516 |
|
1517 | declare const Color3: Color3Constructor;
|
1518 |
|
1519 | // ColorSequence
|
1520 | interface ColorSequence {
|
1521 | /**
|
1522 | * **DO NOT USE!**
|
1523 | *
|
1524 | * This field exists to force TypeScript to recognize this as a nominal type
|
1525 | * @hidden
|
1526 | * @deprecated
|
1527 | */
|
1528 | readonly _nominal_ColorSequence: unique symbol;
|
1529 | readonly Keypoints: ReadonlyArray<ColorSequenceKeypoint>;
|
1530 | }
|
1531 | interface ColorSequenceConstructor {
|
1532 | new (color: Color3): ColorSequence;
|
1533 | new (c0: Color3, c1: Color3): ColorSequence;
|
1534 | new (colors: ReadonlyArray<ColorSequenceKeypoint>): ColorSequence;
|
1535 | }
|
1536 | declare const ColorSequence: ColorSequenceConstructor;
|
1537 |
|
1538 | // ColorSequenceKeypoint
|
1539 | interface ColorSequenceKeypoint {
|
1540 | /**
|
1541 | * **DO NOT USE!**
|
1542 | *
|
1543 | * This field exists to force TypeScript to recognize this as a nominal type
|
1544 | * @hidden
|
1545 | * @deprecated
|
1546 | */
|
1547 | readonly _nominal_ColorSequenceKeypoint: unique symbol;
|
1548 | readonly Time: number;
|
1549 | readonly Value: Color3;
|
1550 | }
|
1551 | type ColorSequenceKeypointConstructor = new (time: number, color: Color3) => ColorSequenceKeypoint;
|
1552 | declare const ColorSequenceKeypoint: ColorSequenceKeypointConstructor;
|
1553 |
|
1554 | /**
|
1555 | * Describes a time value, returned from many of DateTime's methods and used for some of DateTime's constructors
|
1556 | */
|
1557 | interface TimeValueTable {
|
1558 | /** Range: 1400-9999 */
|
1559 | Year: number;
|
1560 |
|
1561 | /** Range: 1-12 */
|
1562 | Month: number;
|
1563 |
|
1564 | /** Range: 1-31 */
|
1565 | Day: number;
|
1566 |
|
1567 | /** Range: 0-23 */
|
1568 | Hour: number;
|
1569 |
|
1570 | /** Range: 0-59 */
|
1571 | Minute: number;
|
1572 |
|
1573 | /**
|
1574 | * Range: 0-60
|
1575 | * Usually 0–59, sometimes 60 to accommodate leap seconds in certain systems.
|
1576 | */
|
1577 | Second: number;
|
1578 |
|
1579 | /** Range: 0-999 */
|
1580 | Millisecond: number;
|
1581 | }
|
1582 |
|
1583 | /**
|
1584 | * A DateTime represents a moment in time using a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time).
|
1585 | * It can be used to easily format dates and times in specific locales.
|
1586 | * When converted to a string, a string conversion of the stored timestamp integer is returned.
|
1587 | * They do not store timezone values; rather, timezones are considered when constructing and using DateTime objects.
|
1588 | * DateTime objects are equal if and only if their `UnixTimestampMillis` properties are equal.
|
1589 | */
|
1590 | interface DateTime {
|
1591 | /**
|
1592 | * **DO NOT USE!**
|
1593 | *
|
1594 | * This field exists to force TypeScript to recognize this as a nominal type
|
1595 | * @hidden
|
1596 | * @deprecated
|
1597 | */
|
1598 | readonly _nominal_DateTime: unique symbol;
|
1599 |
|
1600 | /**
|
1601 | * The number of seconds since January 1st, 1970 at 00:00 UTC (the Unix epoch).
|
1602 | * For more information, see [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time).
|
1603 | * Range is -17,987,443,200–253,402,300,799, approximately years 1400–9999.
|
1604 | */
|
1605 | readonly UnixTimestamp: number;
|
1606 |
|
1607 | /**
|
1608 | * The number of milliseconds since January 1st, 1970 at 00:00 UTC (the Unix epoch).
|
1609 | * For more information, see [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time).
|
1610 | * Range is -17,987,443,200,000 to 253,402,300,799,999, approximately years 1400–9999.
|
1611 | */
|
1612 | readonly UnixTimestampMillis: number;
|
1613 |
|
1614 | /** Converts the value of this DateTime object to Universal Coordinated Time (UTC) */
|
1615 | ToUniversalTime(this: DateTime): TimeValueTable;
|
1616 |
|
1617 | /** Converts the value of this DateTime object to local time */
|
1618 | ToLocalTime(this: DateTime): TimeValueTable;
|
1619 |
|
1620 | /**
|
1621 | * Formats a date as a [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time string.
|
1622 | * An example ISO 8601 date-time string would be `2020-01-02T10:30:45Z`, which represents January 2nd 2020 at 10:30 AM, 45 seconds.
|
1623 | */
|
1624 | ToIsoDate(this: DateTime): string;
|
1625 |
|
1626 | /**
|
1627 | * Generates a string from the DateTime value interpreted as Universal Coordinated Time (UTC) and a format string.
|
1628 | * The format string should contain tokens, which will replace to certain date/time values described by the DateTime object.
|
1629 | * For details on all the available tokens, see [DateTime Format Strings](https://developer.roblox.com/articles/datetime-format-strings).
|
1630 | * @param format
|
1631 | * @param locale
|
1632 | */
|
1633 | FormatUniversalTime(this: DateTime, format: string, locale: string): string;
|
1634 |
|
1635 | /**
|
1636 | * Generates a string from the DateTime value interpreted as local time and a format string.
|
1637 | * The format string should contain tokens, which will replace to certain date/time values described by the DateTime object.
|
1638 | * For details on all the available tokens, see [DateTime Format Strings](https://developer.roblox.com/articles/datetime-format-strings).
|
1639 | * @param format
|
1640 | * @param locale
|
1641 | */
|
1642 | FormatLocalTime(this: DateTime, format: string, locale: string): string;
|
1643 | }
|
1644 |
|
1645 | interface DateTimeConstructor {
|
1646 | /** Creates a new DateTime representing the current moment in time */
|
1647 | now: () => DateTime;
|
1648 |
|
1649 | /**
|
1650 | * Creates a new DateTime object from the given [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time), or the number of seconds since January 1st, 1970 at 00:00 (UTC).
|
1651 | * @param unixTimestamp
|
1652 | */
|
1653 | fromUnixTimestamp: (unixTimestamp: number) => DateTime;
|
1654 |
|
1655 | /**
|
1656 | * Creates a new DateTime object from the given [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time), or the number of milliseconds since January 1st, 1970 at 00:00 (UTC).
|
1657 | * @param unixTimestampMillis
|
1658 | */
|
1659 | fromUnixTimestampMillis: (unixTimestampMillis: number) => DateTime;
|
1660 |
|
1661 | /**
|
1662 | * Creates a new DateTime using the given units from a UTC time
|
1663 | * - Date units (year, month, day) that produce an invalid date will raise an error. For example, January 32nd or February 29th on a non-leap year.
|
1664 | * - Time units (hour, minute, second, millisecond) that are outside their normal range are valid. For example, 90 minutes will cause the hour to roll over by 1; -10 seconds will cause the minute value to roll back by 1.
|
1665 | * - Non-integer values are rounded down. For example, providing 2.5 hours will be equivalent to providing 2 hours, not 2 hours 30 minutes.
|
1666 | * - Omitted values are assumed to be their lowest value in their normal range, except for year which defaults to 1970.
|
1667 | * @param year Defaults to 1970
|
1668 | * @param month Defaults to 1
|
1669 | * @param day Defaults to 1
|
1670 | * @param hour Defaults to 0
|
1671 | * @param minute Defaults to 0
|
1672 | * @param second Defaults to 0
|
1673 | * @param millisecond Defaults to 0
|
1674 | */
|
1675 | fromUniversalTime: (
|
1676 | year?: number,
|
1677 | month?: number,
|
1678 | day?: number,
|
1679 | hour?: number,
|
1680 | minute?: number,
|
1681 | second?: number,
|
1682 | millisecond?: number,
|
1683 | ) => DateTime;
|
1684 |
|
1685 | /**
|
1686 | * Creates a new DateTime using the given units from a local time
|
1687 | * - Date units (year, month, day) that produce an invalid date will raise an error. For example, January 32nd or February 29th on a non-leap year.
|
1688 | * - Time units (hour, minute, second, millisecond) that are outside their normal range are valid. For example, 90 minutes will cause the hour to roll over by 1; -10 seconds will cause the minute value to roll back by 1.
|
1689 | * - Non-integer values are rounded down. For example, providing 2.5 hours will be equivalent to providing 2 hours, not 2 hours 30 minutes.
|
1690 | * - Omitted values are assumed to be their lowest value in their normal range, except for year which defaults to 1970.
|
1691 | * @param year Defaults to 1970
|
1692 | * @param month Defaults to 1
|
1693 | * @param day Defaults to 1
|
1694 | * @param hour Defaults to 0
|
1695 | * @param minute Defaults to 0
|
1696 | * @param second Defaults to 0
|
1697 | * @param millisecond Defaults to 0
|
1698 | */
|
1699 | fromLocalTime: (
|
1700 | year?: number,
|
1701 | month?: number,
|
1702 | day?: number,
|
1703 | hour?: number,
|
1704 | minute?: number,
|
1705 | second?: number,
|
1706 | millisecond?: number,
|
1707 | ) => DateTime;
|
1708 |
|
1709 | /**
|
1710 | * Creates a DateTime from an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time string in UTC time.
|
1711 | * If the string parsing fails, returns nil.
|
1712 | * An example ISO 8601 date-time string would be `2020-01-02T10:30:45Z`, which represents January nd 2020 at 10:30 AM, 45 seconds.
|
1713 | * @param isoDate
|
1714 | */
|
1715 | fromIsoDate: (isoDate: string) => DateTime | undefined;
|
1716 | }
|
1717 |
|
1718 | declare const DateTime: DateTimeConstructor;
|
1719 |
|
1720 | // DockWidgetPluginGuiInfo
|
1721 | interface DockWidgetPluginGuiInfo {
|
1722 | /**
|
1723 | * **DO NOT USE!**
|
1724 | *
|
1725 | * This field exists to force TypeScript to recognize this as a nominal type
|
1726 | * @hidden
|
1727 | * @deprecated
|
1728 | */
|
1729 | readonly _nominal_DockWidgetPluginGuiInfo: unique symbol;
|
1730 | readonly InitialDockState: Enum.InitialDockState;
|
1731 | readonly InitialEnabled: boolean;
|
1732 | readonly InitialEnabledShouldOverrideRestore: boolean;
|
1733 | readonly FloatingXSize: number;
|
1734 | readonly FloatingYSize: number;
|
1735 | readonly MinWidth: number;
|
1736 | readonly MinHeight: number;
|
1737 | }
|
1738 | type DockWidgetPluginGuiInfoConstructor = new (
|
1739 | initDockState?: Enum.InitialDockState,
|
1740 | initEnabled?: boolean,
|
1741 | overrideEnabledRestore?: boolean,
|
1742 | floatXSize?: number,
|
1743 | floatYSize?: number,
|
1744 | minWidth?: number,
|
1745 | minHeight?: number,
|
1746 | ) => DockWidgetPluginGuiInfo;
|
1747 | declare const DockWidgetPluginGuiInfo: DockWidgetPluginGuiInfoConstructor;
|
1748 |
|
1749 | // Faces
|
1750 | interface Faces {
|
1751 | /**
|
1752 | * **DO NOT USE!**
|
1753 | *
|
1754 | * This field exists to force TypeScript to recognize this as a nominal type
|
1755 | * @hidden
|
1756 | * @deprecated
|
1757 | */
|
1758 | readonly _nominal_Faces: unique symbol;
|
1759 | readonly Top: boolean;
|
1760 | readonly Bottom: boolean;
|
1761 | readonly Back: boolean;
|
1762 | readonly Front: boolean;
|
1763 | readonly Right: boolean;
|
1764 | readonly Left: boolean;
|
1765 | }
|
1766 | type FacesConstructor = new (...ids: Array<Enum.NormalId>) => Faces;
|
1767 | declare const Faces: FacesConstructor;
|
1768 |
|
1769 | // FloatCurveKey
|
1770 | interface FloatCurveKey {
|
1771 | /**
|
1772 | * **DO NOT USE!**
|
1773 | *
|
1774 | * This field exists to force TypeScript to recognize this as a nominal type
|
1775 | * @hidden
|
1776 | * @deprecated
|
1777 | */
|
1778 | readonly _nominal_FloatCurveKey: unique symbol;
|
1779 | readonly Time: number;
|
1780 | readonly Value: number;
|
1781 | readonly RightTangent: number;
|
1782 | readonly LeftTangent: number;
|
1783 | }
|
1784 | type FloatCurveKeyConstructor = new (
|
1785 | time: number,
|
1786 | value: number,
|
1787 | interpolation: CastsToEnum<Enum.KeyInterpolationMode>,
|
1788 | ) => FloatCurveKey;
|
1789 | declare const FloatCurveKey: FloatCurveKeyConstructor;
|
1790 |
|
1791 | // Font
|
1792 | interface Font {
|
1793 | Bold: boolean;
|
1794 | Style: Enum.FontStyle;
|
1795 | Family: string;
|
1796 | Weight: Enum.FontWeight;
|
1797 | }
|
1798 | interface FontConstructor {
|
1799 | new (family: string, weight?: Enum.FontWeight, style?: Enum.FontStyle): Font;
|
1800 | fromEnum: (value: Enum.Font) => Font;
|
1801 | fromName: (name: string, weight?: Enum.FontWeight, style?: Enum.FontStyle) => Font;
|
1802 | fromId: (id: number, weight?: Enum.FontWeight, style?: Enum.FontStyle) => Font;
|
1803 | }
|
1804 | declare const Font: FontConstructor;
|
1805 |
|
1806 | // NumberRange
|
1807 | interface NumberRange {
|
1808 | /**
|
1809 | * **DO NOT USE!**
|
1810 | *
|
1811 | * This field exists to force TypeScript to recognize this as a nominal type
|
1812 | * @hidden
|
1813 | * @deprecated
|
1814 | */
|
1815 | readonly _nominal_NumberRange: unique symbol;
|
1816 | readonly Min: number;
|
1817 | readonly Max: number;
|
1818 | }
|
1819 | interface NumberRangeConstructor {
|
1820 | new (value: number): NumberRange;
|
1821 | new (minimum: number, maximum: number): NumberRange;
|
1822 | }
|
1823 | declare const NumberRange: NumberRangeConstructor;
|
1824 |
|
1825 | // NumberSequence
|
1826 | interface NumberSequence {
|
1827 | /**
|
1828 | * **DO NOT USE!**
|
1829 | *
|
1830 | * This field exists to force TypeScript to recognize this as a nominal type
|
1831 | * @hidden
|
1832 | * @deprecated
|
1833 | */
|
1834 | readonly _nominal_NumberSequence: unique symbol;
|
1835 | /** An array containing keypoint values for the NumberSequence. */
|
1836 | readonly Keypoints: ReadonlyArray<NumberSequenceKeypoint>;
|
1837 | }
|
1838 | interface NumberSequenceConstructor {
|
1839 | /** Creates a sequence of two keypoints with n for each value */
|
1840 | new (n: number): NumberSequence;
|
1841 | /** Creates a sequence of two keypoints with n0 and n1 as the value */
|
1842 | new (n0: number, n1: number): NumberSequence;
|
1843 | /** Creates a sequence with a given array containing keypoint values for the NumberSequence. */
|
1844 | new (keypoints: ReadonlyArray<NumberSequenceKeypoint>): NumberSequence;
|
1845 | }
|
1846 | declare const NumberSequence: NumberSequenceConstructor;
|
1847 |
|
1848 | // NumberSequenceKeypoint
|
1849 | interface NumberSequenceKeypoint {
|
1850 | /**
|
1851 | * **DO NOT USE!**
|
1852 | *
|
1853 | * This field exists to force TypeScript to recognize this as a nominal type
|
1854 | * @hidden
|
1855 | * @deprecated
|
1856 | */
|
1857 | readonly _nominal_NumberSequenceKeypoint: unique symbol;
|
1858 | readonly Envelope: number;
|
1859 | readonly Time: number;
|
1860 | readonly Value: number;
|
1861 | }
|
1862 | interface NumberSequenceKeypointConstructor {
|
1863 | /** Creates a keypoint with a specified time, value, and envelope if specified. */
|
1864 | new (time: number, value: number, envelope?: number): NumberSequenceKeypoint;
|
1865 | }
|
1866 | declare const NumberSequenceKeypoint: NumberSequenceKeypointConstructor;
|
1867 |
|
1868 | interface OpenCloudModel {
|
1869 | /**
|
1870 | * **DO NOT USE!**
|
1871 | *
|
1872 | * This field exists to force TypeScript to recognize this as a nominal type
|
1873 | * @hidden
|
1874 | * @deprecated
|
1875 | */
|
1876 | readonly _nominal_OpenCloudModel: unique symbol;
|
1877 | }
|
1878 |
|
1879 | // OverlapParams
|
1880 | interface OverlapParams {
|
1881 | /**
|
1882 | * **DO NOT USE!**
|
1883 | *
|
1884 | * This field exists to force TypeScript to recognize this as a nominal type
|
1885 | * @hidden
|
1886 | * @deprecated
|
1887 | */
|
1888 | readonly _nominal_OverlapParams: unique symbol;
|
1889 | /**
|
1890 | * An array of objects whose descendants will be used in filtering.
|
1891 | */
|
1892 | FilterDescendantsInstances: Array<Instance>;
|
1893 | /**
|
1894 | * `RaycastFilterType.Include` or `RaycastFilterType.Exclude`. Determines how the `FilterDescendantInstances` is
|
1895 | * used. `Exclude` will skip the `FilterDescendantInstances`, and `Include` will exclusively include them.
|
1896 | */
|
1897 | FilterType: Enum.RaycastFilterType;
|
1898 | /**
|
1899 | * The maximum amount of parts to be returned by the query. The process simply early outs once this is met.
|
1900 | * (0 is infinite)
|
1901 | */
|
1902 | MaxParts: number;
|
1903 | /**
|
1904 | * The collision group the region check is performed on. Parts set to not collide with this group will be ignored.
|
1905 | */
|
1906 | CollisionGroup: string;
|
1907 | /**
|
1908 | * This property, if true, makes the boundary-querying operation use an intersected part's BasePart.CanCollide value in favor of its BasePart.CanQuery value when determining whether that part is included in the array of spatial query results.
|
1909 | */
|
1910 | RespectCanCollide: boolean;
|
1911 | /**
|
1912 | * This property, if true, finds all parts that inserect the region even if they have CanQuery set to false.
|
1913 | */
|
1914 | BruteForceAllSlow: boolean;
|
1915 | /**
|
1916 | * For efficiency and simplicity, this method is the preferred way to add instances to the filter.
|
1917 | * It has the additional advantage that it allows FilterDescendantsInstances to be updated from a parallel context.
|
1918 | */
|
1919 | AddToFilter(this: OverlapParams, instances: Instance | Array<Instance>): void;
|
1920 | }
|
1921 | type OverlapParamsConstructor = new () => OverlapParams;
|
1922 | declare const OverlapParams: OverlapParamsConstructor;
|
1923 |
|
1924 | // PathWaypoint
|
1925 | interface PathWaypoint {
|
1926 | /**
|
1927 | * **DO NOT USE!**
|
1928 | *
|
1929 | * This field exists to force TypeScript to recognize this as a nominal type
|
1930 | * @hidden
|
1931 | * @deprecated
|
1932 | */
|
1933 | readonly _nominal_PathWaypoint: unique symbol;
|
1934 | /**
|
1935 | * The action to perform at this waypoint.
|
1936 | */
|
1937 | readonly Action: Enum.PathWaypointAction;
|
1938 | /**
|
1939 | * The 3D position of this waypoint.
|
1940 | */
|
1941 | readonly Position: Vector3;
|
1942 | /**
|
1943 | * The name of the navigation area that generates this waypoint. You can use PathwayPoint.Label to decide the custom
|
1944 | * action to take to reach the waypoint. PathfindingModifier and Material each have a Label. Automatic jump links
|
1945 | * have "Jump" as their Label.
|
1946 | */
|
1947 | readonly Label: string;
|
1948 | }
|
1949 | interface PathWaypointConstructor {
|
1950 | new (): PathWaypoint;
|
1951 | new (position: Vector3, action?: Enum.PathWaypointAction, label?: string): PathWaypoint;
|
1952 | }
|
1953 |
|
1954 | declare const PathWaypoint: PathWaypointConstructor;
|
1955 |
|
1956 | interface Path2DControlPoint {
|
1957 | /**
|
1958 | * **DO NOT USE!**
|
1959 | *
|
1960 | * This field exists to force TypeScript to recognize this as a nominal type
|
1961 | * @hidden
|
1962 | * @deprecated
|
1963 | */
|
1964 | readonly _nominal_Path2DControlPoint: unique symbol;
|
1965 | /** The position of the `Path2DControlPoint`. */
|
1966 | Position: UDim2;
|
1967 | /** The left tangent of the `Path2DControlPoint`. */
|
1968 | LeftTangent: UDim2;
|
1969 | /** The right tangent of the `Path2DControlPoint`. */
|
1970 | RightTangent: UDim2;
|
1971 | }
|
1972 |
|
1973 | interface Path2DControlPointConstructor {
|
1974 | /** Returns an empty `Path2DControlPoint`. */
|
1975 | new (): Path2DControlPoint;
|
1976 | /** Returns a `Path2DControlPoint` with only the position set. */
|
1977 | new (position: UDim2): Path2DControlPoint;
|
1978 | /** Returns a `Path2DControlPoint` with the position, left tangent, and right tangent set. */
|
1979 | new (position: UDim2, leftTangent: UDim2, rightTangent: UDim2): Path2DControlPoint;
|
1980 | }
|
1981 |
|
1982 | declare const Path2DControlPoint: Path2DControlPointConstructor;
|
1983 |
|
1984 | // PhysicalProperties
|
1985 | interface PhysicalProperties {
|
1986 | /**
|
1987 | * **DO NOT USE!**
|
1988 | *
|
1989 | * This field exists to force TypeScript to recognize this as a nominal type
|
1990 | * @hidden
|
1991 | * @deprecated
|
1992 | */
|
1993 | readonly _nominal_PhysicalProperties: unique symbol;
|
1994 | readonly Density: number;
|
1995 | readonly Friction: number;
|
1996 | readonly Elasticity: number;
|
1997 | readonly FrictionWeight: number;
|
1998 | readonly ElasticityWeight: number;
|
1999 | }
|
2000 | interface PhysicalPropertiesConstructor {
|
2001 | new (density: number, friction: number, elasticity: number): PhysicalProperties;
|
2002 | new (
|
2003 | density: number,
|
2004 | friction: number,
|
2005 | elasticity: number,
|
2006 | frictionWeight: number,
|
2007 | elasticityWeight: number,
|
2008 | ): PhysicalProperties;
|
2009 | new (material: Enum.Material): PhysicalProperties;
|
2010 | }
|
2011 | declare const PhysicalProperties: PhysicalPropertiesConstructor;
|
2012 |
|
2013 | // Random
|
2014 | interface Random {
|
2015 | /**
|
2016 | * **DO NOT USE!**
|
2017 | *
|
2018 | * This field exists to force TypeScript to recognize this as a nominal type
|
2019 | * @hidden
|
2020 | * @deprecated
|
2021 | */
|
2022 | readonly _nominal_Random: unique symbol;
|
2023 | /**
|
2024 | * Returns a pseudorandom integer uniformly distributed over [min, max].
|
2025 | */
|
2026 | NextInteger(this: Random, min: number, max: number): number;
|
2027 | /**
|
2028 | * Returns a pseudorandom number uniformly distributed over [0, 1).
|
2029 | */
|
2030 | NextNumber(this: Random): number;
|
2031 | /**
|
2032 | * Returns a pseudorandom number uniformly distributed over [min, max).
|
2033 | */
|
2034 | NextNumber(this: Random, min: number, max: number): number;
|
2035 | /**
|
2036 | * Uniformly shuffles the array part of `tb` in-place using `NextInteger` to pick indices. If there are any `nil` "holes" in the array part of the table, `Shuffle` throws an error, since shuffling could change the length.
|
2037 | *
|
2038 | * The hash part of `tb` is ignored. No metamethods are of `tb` are invoked.
|
2039 | *
|
2040 | * The shuffle is defined to be a Fisher-Yates shuffle so the number of `NextInteger` calls is guaranteed to be consistent between engine versions for a given size of table.
|
2041 | */
|
2042 | Shuffle(this: Random, tb: Array<unknown>): void;
|
2043 | /**
|
2044 | * Returns a unit vector with a pseudorandom direction.
|
2045 | *
|
2046 | * Vectors returned from this function are uniformly distributed over the unit sphere.
|
2047 | */
|
2048 | NextUnitVector(this: Random): Vector3;
|
2049 | /**
|
2050 | * Returns a new Random object with the same state as the original.
|
2051 | */
|
2052 | Clone(this: Random): Random;
|
2053 | }
|
2054 |
|
2055 | interface RandomConstructor {
|
2056 | new (seed: number): Random;
|
2057 | new (): Random;
|
2058 | }
|
2059 |
|
2060 | declare const Random: RandomConstructor;
|
2061 |
|
2062 | // Ray
|
2063 | interface Ray {
|
2064 | /**
|
2065 | * **DO NOT USE!**
|
2066 | *
|
2067 | * This field exists to force TypeScript to recognize this as a nominal type
|
2068 | * @hidden
|
2069 | * @deprecated
|
2070 | */
|
2071 | readonly _nominal_Ray: unique symbol;
|
2072 | readonly Origin: Vector3;
|
2073 | readonly Direction: Vector3;
|
2074 | readonly Unit: Ray;
|
2075 | ClosestPoint(this: Ray, point: Vector3): Vector3;
|
2076 | Distance(this: Ray, point: Vector3): number;
|
2077 | }
|
2078 |
|
2079 | type RayConstructor = new (origin?: Vector3, direction?: Vector3) => Ray;
|
2080 |
|
2081 | declare const Ray: RayConstructor;
|
2082 |
|
2083 | // RaycastParams
|
2084 | interface RaycastParams {
|
2085 | /**
|
2086 | * **DO NOT USE!**
|
2087 | *
|
2088 | * This field exists to force TypeScript to recognize this as a nominal type
|
2089 | * @hidden
|
2090 | * @deprecated
|
2091 | */
|
2092 | readonly _nominal_RaycastParams: unique symbol;
|
2093 | /** An array of objects whose descendants will be used in filtering raycasting candidates. */
|
2094 | FilterDescendantsInstances: Array<Instance>;
|
2095 | /**
|
2096 | * Determines how the `FilterDescendantsInstances` list will be used, depending on the
|
2097 | * [RaycastFilterType](https://developer.roblox.com/api-reference/enum/RaycastFilterType) provided.
|
2098 | *
|
2099 | * - `Enum.RaycastFilterType.Include` — Only [BaseParts](https://developer.roblox.com/api-reference/class/BasePart)
|
2100 | * which are descendants of objects in the filter list will be considered in the raycast operation.
|
2101 | * - `Enum.RaycastFilterType.Exclude` — Every [BasePart](https://developer.roblox.com/api-reference/class/BasePart)
|
2102 | * in the game will be considered except those that are descendants of objects in the filter list.
|
2103 | */
|
2104 | FilterType: Enum.RaycastFilterType;
|
2105 | /**
|
2106 | * Determines whether the water material is considered when raycasting against
|
2107 | * [Terrain](https://developer.roblox.com/api-reference/class/Terrain).
|
2108 | */
|
2109 | IgnoreWater: boolean;
|
2110 | /**
|
2111 | * Specifies a [collision group](https://developer.roblox.com/articles/Collision-Filtering) for the raycasting
|
2112 | * operation. Parts in collision groups that are set to **not** collide with this group will be ignored. If this
|
2113 | * property is omitted, the raycast will assume the **Default** collision group.
|
2114 | */
|
2115 | CollisionGroup: string;
|
2116 | /**
|
2117 | * This property, if `true`, makes the raycast operation use an intersected part's `CanCollide` value in favor of
|
2118 | * its `CanQuery` value when determining whether that part is included in the `RaycastResult`
|
2119 | */
|
2120 | RespectCanCollide: boolean;
|
2121 | /**
|
2122 | * When enabled, the query will ignore all part collision properties and perform a brute-force check on every part.
|
2123 | * This will negatively impact performance and should not be used in live experiences.
|
2124 | */
|
2125 | BruteForceAllSlow: boolean;
|
2126 | /**
|
2127 | * For efficiency and simplicity, this method is the preferred way to add instances to the filter.
|
2128 | * It has the additional advantage that it allows FilterDescendantsInstances to be updated from a parallel context.
|
2129 | */
|
2130 | AddToFilter(this: RaycastParams, instances: Instance | Array<Instance>): void;
|
2131 | }
|
2132 |
|
2133 | type RaycastParamsConstructor = new () => RaycastParams;
|
2134 |
|
2135 | declare const RaycastParams: RaycastParamsConstructor;
|
2136 |
|
2137 | // RaycastResult
|
2138 | interface RaycastResult {
|
2139 | readonly Distance: number;
|
2140 | readonly Instance: BasePart;
|
2141 | readonly Material: Enum.Material;
|
2142 | readonly Normal: Vector3;
|
2143 | readonly Position: Vector3;
|
2144 | }
|
2145 |
|
2146 | // Rect
|
2147 | interface Rect {
|
2148 | /**
|
2149 | * **DO NOT USE!**
|
2150 | *
|
2151 | * This field exists to force TypeScript to recognize this as a nominal type
|
2152 | * @hidden
|
2153 | * @deprecated
|
2154 | */
|
2155 | readonly _nominal_Rect: unique symbol;
|
2156 | readonly Min: Vector2;
|
2157 | readonly Max: Vector2;
|
2158 | readonly Width: number;
|
2159 | readonly Height: number;
|
2160 | }
|
2161 | interface RectConstructor {
|
2162 | new (min?: Vector2, max?: Vector2): Rect;
|
2163 | new (minX: number, minY: number, maxX: number, maxY: number): Rect;
|
2164 | }
|
2165 |
|
2166 | declare const Rect: RectConstructor;
|
2167 |
|
2168 | // Region3
|
2169 | interface Region3 {
|
2170 | /**
|
2171 | * **DO NOT USE!**
|
2172 | *
|
2173 | * This field exists to force TypeScript to recognize this as a nominal type
|
2174 | * @hidden
|
2175 | * @deprecated
|
2176 | */
|
2177 | readonly _nominal_Region3: unique symbol;
|
2178 | readonly CFrame: CFrame;
|
2179 | readonly Size: Vector3;
|
2180 | ExpandToGrid(this: Region3, resolution: number): Region3;
|
2181 | }
|
2182 |
|
2183 | type Region3Constructor = new (min?: Vector3, max?: Vector3) => Region3;
|
2184 |
|
2185 | declare const Region3: Region3Constructor;
|
2186 |
|
2187 | // Region3int16
|
2188 | interface Region3int16 {
|
2189 | /**
|
2190 | * **DO NOT USE!**
|
2191 | *
|
2192 | * This field exists to force TypeScript to recognize this as a nominal type
|
2193 | * @hidden
|
2194 | * @deprecated
|
2195 | */
|
2196 | readonly _nominal_Region3int16: unique symbol;
|
2197 | readonly Min: Vector3int16;
|
2198 | readonly Max: Vector3int16;
|
2199 | }
|
2200 |
|
2201 | type Region3int16Constructor = new (min?: Vector3int16, max?: Vector3int16) => Region3int16;
|
2202 |
|
2203 | declare const Region3int16: Region3int16Constructor;
|
2204 |
|
2205 | // RotationCurveKey
|
2206 | interface RotationCurveKey {
|
2207 | /**
|
2208 | * **DO NOT USE!**
|
2209 | *
|
2210 | * This field exists to force TypeScript to recognize this as a nominal type
|
2211 | * @hidden
|
2212 | * @deprecated
|
2213 | */
|
2214 | readonly _nominal_RotationCurveKey: unique symbol;
|
2215 | readonly Time: number;
|
2216 | readonly Value: CFrame;
|
2217 | }
|
2218 | type RotationCurveKeyConstructor = new (
|
2219 | time: number,
|
2220 | value: CFrame,
|
2221 | interpolation: CastsToEnum<Enum.KeyInterpolationMode>,
|
2222 | ) => RotationCurveKey;
|
2223 | declare const RotationCurveKey: RotationCurveKeyConstructor;
|
2224 |
|
2225 | interface Secret {
|
2226 | /**
|
2227 | * **DO NOT USE!**
|
2228 | *
|
2229 | * This field exists to force TypeScript to recognize this as a nominal type
|
2230 | * @hidden
|
2231 | * @deprecated
|
2232 | */
|
2233 | readonly _nominal_Secret: unique symbol;
|
2234 |
|
2235 | /** Prepends a string to the secret content. */
|
2236 | AddPrefix(this: Secret, prefix: string): Secret;
|
2237 |
|
2238 | /** Appends a string to the secret content. */
|
2239 | AddSuffix(this: Secret, suffix: string): Secret;
|
2240 | }
|
2241 |
|
2242 | declare const SharedTableNominal: unique symbol;
|
2243 | type SharedTableValue = boolean | number | Vector3 | string | SharedTable | Instance | typeof SharedTableNominal;
|
2244 | // SharedTable
|
2245 | interface SharedTable {
|
2246 | /**
|
2247 | * **DO NOT USE!**
|
2248 | *
|
2249 | * This field exists to force TypeScript to recognize this as a nominal type
|
2250 | * @hidden
|
2251 | * @deprecated
|
2252 | */
|
2253 | readonly _nominal_SharedTable: typeof SharedTableNominal;
|
2254 | [K: string | number]: SharedTableValue;
|
2255 | }
|
2256 |
|
2257 | interface SharedTableConstructor {
|
2258 | /** Returns a new, empty SharedTable. */
|
2259 | new (): SharedTable;
|
2260 | /** Returns a new SharedTable containing elements equivalent to those in the provided object. */
|
2261 | new (t: object): SharedTable;
|
2262 | /** Removes all of the elements from the SharedTable. */
|
2263 | clear: (st: SharedTable) => void;
|
2264 | /**
|
2265 | * Creates a clone of a SharedTable and returns the clone.
|
2266 | *
|
2267 | * If the optional deep argument is not present, or if it is present and its value is false, then a shallow clone is created.
|
2268 | * A shallow clone copies only the top-level SharedTable object. If any value in the SharedTable itself is a SharedTable, then both the original SharedTable and the clone SharedTable will refer to the same SharedTable.
|
2269 | *
|
2270 | * The shallow clone operation is atomic, so the clone SharedTable will contain a consistent snapshot of the state in the original SharedTable, even if it is being modified concurrently from other scripts.
|
2271 | *
|
2272 | * If the optional deep argument is present and its value is true, then a deep clone is created.
|
2273 | * A deep clone recursively copies a structure of SharedTable objects, such that there is no state shared between the original SharedTable and the clone.
|
2274 | *
|
2275 | * The clone of each SharedTable within the graph of SharedTable objects is atomic, but the deep clone as a whole is not atomic.
|
2276 | * Thus, the clone of each SharedTable within the graph will contain a consistent snapshot of the state of the original SharedTable object from which it was cloned, but the states of different SharedTable objects may be inconsistent if the graph is being modified concurrently from other scripts.
|
2277 | *
|
2278 | * The SharedTable object(s) being cloned may be frozen (read-only) or not.
|
2279 | * Regardless, the newly created clones are not frozen (and are thus modifiable).
|
2280 | * To create frozen clones, use the SharedTable.cloneAndFreeze function.
|
2281 | */
|
2282 | clone: (st: SharedTable, deep?: boolean) => SharedTable;
|
2283 | /**
|
2284 | * Creates a frozen (read-only) clone of a SharedTable and returns the clone.
|
2285 | * The behavior of this function is the same as the behavior of clone, except that the clone is frozen.
|
2286 | *
|
2287 | * If a deep clone is requested, then all of the cloned SharedTable objects are frozen.
|
2288 | */
|
2289 | cloneAndFreeze: (st: SharedTable, deep?: boolean) => SharedTable;
|
2290 | /**
|
2291 | * Atomically increments the value of an element.
|
2292 | * An element with the specified key must exist in the SharedTable, and it must be of type number.
|
2293 | * The specified delta is added to the value, and the original value is returned.
|
2294 | *
|
2295 | * The SharedTable.update function can also be used for this purpose; this increment function exists for convenience and performance.
|
2296 | * In general, increment is much faster than update, so it should be preferred where possible.
|
2297 | */
|
2298 | increment: (st: SharedTable, k: string | number, delta: number) => number;
|
2299 | /** Returns true if the SharedTable is frozen (read-only). */
|
2300 | isFrozen: (st: SharedTable) => boolean;
|
2301 | /**
|
2302 | * Returns the number of elements stored in the SharedTable.
|
2303 | * Note that if other scripts are concurrently modifying the SharedTable, the returned size may no longer be correct after it is returned, since other scripts may have added or removed elements from the SharedTable.
|
2304 | */
|
2305 | size: (st: SharedTable) => number;
|
2306 | /**
|
2307 | * Atomically updates the value of an element.
|
2308 | *
|
2309 | * When a SharedTable is accessed concurrently from scripts running in different execution contexts, it is possible for their accesses to interleave unpredictably.
|
2310 | * Because of this, code like the following is generally incorrect, because the value may have changed between the read on the first line and the update on the second line:
|
2311 | * ```ts
|
2312 | * const oldValue = st["x"];
|
2313 | * st["x"] = oldValue + ",x";
|
2314 | * ```
|
2315 | * The update function makes it possible to perform an atomic update to an element.
|
2316 | * It takes a function that it will call with the current value of the element.
|
2317 | * The function can then compute and return the new value.
|
2318 | * Note that the function may be called multiple times if the SharedTable is being concurrently modified from other scripts.
|
2319 | *
|
2320 | * If the SharedTable is frozen, the operation fails and an error will be raised.
|
2321 | */
|
2322 | update: (st: SharedTable, k: string | number, f: (v: SharedTableValue) => SharedTableValue) => void;
|
2323 | }
|
2324 |
|
2325 | declare const SharedTable: SharedTableConstructor;
|
2326 |
|
2327 | // TextChatMessage
|
2328 | interface TextChatMessage {
|
2329 | /**
|
2330 | * **DO NOT USE!**
|
2331 | *
|
2332 | * This field exists to force TypeScript to recognize this as a nominal type
|
2333 | * @hidden
|
2334 | * @deprecated
|
2335 | */
|
2336 | readonly _nominal_TextChatMessage: unique symbol;
|
2337 | }
|
2338 |
|
2339 | // TweenInfo
|
2340 | interface TweenInfo {
|
2341 | /**
|
2342 | * **DO NOT USE!**
|
2343 | *
|
2344 | * This field exists to force TypeScript to recognize this as a nominal type
|
2345 | * @hidden
|
2346 | * @deprecated
|
2347 | */
|
2348 | readonly _nominal_TweenInfo: unique symbol;
|
2349 | readonly Time: number;
|
2350 | readonly EasingStyle: Enum.EasingStyle;
|
2351 | readonly EasingDirection: Enum.EasingDirection;
|
2352 | readonly RepeatCount: number;
|
2353 | readonly Reverses: boolean;
|
2354 | readonly DelayTime: number;
|
2355 | }
|
2356 |
|
2357 | type TweenInfoConstructor = new (
|
2358 | time?: number,
|
2359 | easingStyle?: Enum.EasingStyle,
|
2360 | easingDirection?: Enum.EasingDirection,
|
2361 | repeatCount?: number,
|
2362 | reverses?: boolean,
|
2363 | delayTime?: number,
|
2364 | ) => TweenInfo;
|
2365 |
|
2366 | declare const TweenInfo: TweenInfoConstructor;
|
2367 |
|
2368 | // UDim
|
2369 | interface UDim {
|
2370 | /**
|
2371 | * **DO NOT USE!**
|
2372 | *
|
2373 | * This field exists to force TypeScript to recognize this as a nominal type
|
2374 | * @hidden
|
2375 | * @deprecated
|
2376 | */
|
2377 | readonly _nominal_UDim: unique symbol;
|
2378 | readonly Scale: number;
|
2379 | readonly Offset: number;
|
2380 | }
|
2381 |
|
2382 | type UDimConstructor = new (scale?: number, offset?: number) => UDim;
|
2383 |
|
2384 | declare const UDim: UDimConstructor;
|
2385 |
|
2386 | // UDim2
|
2387 | interface UDim2 {
|
2388 | /**
|
2389 | * **DO NOT USE!**
|
2390 | *
|
2391 | * This field exists to force TypeScript to recognize this as a nominal type
|
2392 | * @hidden
|
2393 | * @deprecated
|
2394 | */
|
2395 | readonly _nominal_UDim2: unique symbol;
|
2396 | readonly X: UDim;
|
2397 | readonly Y: UDim;
|
2398 | readonly Width: UDim;
|
2399 | readonly Height: UDim;
|
2400 | Lerp(this: UDim2, goal: UDim2, alpha: number): UDim2;
|
2401 | }
|
2402 |
|
2403 | interface UDim2Constructor {
|
2404 | new (xScale: number, xOffset: number, yScale: number, yOffset: number): UDim2;
|
2405 | new (xDim: UDim, yDim: UDim): UDim2;
|
2406 | new (): UDim2;
|
2407 | fromOffset: (x?: number, y?: number) => UDim2;
|
2408 | fromScale: (x?: number, y?: number) => UDim2;
|
2409 | }
|
2410 |
|
2411 | declare const UDim2: UDim2Constructor;
|
2412 |
|
2413 | // Vector2
|
2414 | interface Vector2 {
|
2415 | /**
|
2416 | * **DO NOT USE!**
|
2417 | *
|
2418 | * This field exists to force TypeScript to recognize this as a nominal type
|
2419 | * @hidden
|
2420 | * @deprecated
|
2421 | */
|
2422 | readonly _nominal_Vector2: unique symbol;
|
2423 | /** The x-coordinate of the Vector2. */
|
2424 | readonly X: number;
|
2425 | /** The y-coordinate of the Vector2. */
|
2426 | readonly Y: number;
|
2427 | /** A normalized copy of the vector - has a magnitude of 1. */
|
2428 | readonly Unit: Vector2;
|
2429 | /** The length of the vector */
|
2430 | readonly Magnitude: number;
|
2431 | /** Returns a new vector from the absolute values of the original's components. For example, a vector of `(-2, 4)` returns a vector of `(2, 4)`. */
|
2432 | Abs(this: Vector2): Vector2;
|
2433 | /** Returns a new vector from the ceiling of the original's components. For example, a vector of `(-2.6, 5.1)` returns a vector of `(-2, 6)`. */
|
2434 | Ceil(this: Vector2): Vector2;
|
2435 | /** Returns a new vector from the floor of the original's components. For example, a vector of `(-2.6, 5.1)` returns a vector of `(-3, 5)`. */
|
2436 | Floor(this: Vector2): Vector2;
|
2437 | /** Returns a new vector from the sign (-1, 0, or 1) of the original's components. For example, a vector of `(-2.6, 5.1)` returns a vector of `(-1, 1)`. */
|
2438 | Sign(this: Vector2): Vector2;
|
2439 | /** Returns the angle in radians between the two vectors. Specify `true` for the optional `isSigned` boolean if you want a signed angle. By default, the method returns the absolute value. */
|
2440 | Angle(this: Vector2, other: Vector2, isSigned?: boolean): number;
|
2441 | /** Returns a scalar dot product of the two vectors */
|
2442 | Dot(this: Vector2, other: Vector2): number;
|
2443 | /** Returns a Vector2 linearly interpolated between this Vector2 and the goal by the fraction alpha */
|
2444 | Lerp(this: Vector2, goal: Vector2, alpha: number): Vector2;
|
2445 | /** Returns the cross product of the two vectors */
|
2446 | Cross(this: Vector2, other: Vector2): number;
|
2447 | /** Returns a new Vector2 with the minimum of each component. */
|
2448 | Min(this: Vector2, ...vectors: Array<Vector2>): Vector2;
|
2449 | /** Returns a new Vector2 with the maximum of each component. */
|
2450 | Max(this: Vector2, ...vectors: Array<Vector2>): Vector2;
|
2451 | }
|
2452 |
|
2453 | interface Vector2Constructor {
|
2454 | /**
|
2455 | * A Vector2 with a magnitude of zero.
|
2456 | *
|
2457 | * This API member is a **constant**, and must be accessed through the `Vector2` global as opposed to an individual
|
2458 | * `Vector2` object.
|
2459 | *
|
2460 | * ```lua
|
2461 | * print(Vector2.zero) --> 0, 0
|
2462 | * ```
|
2463 | */
|
2464 | readonly zero: Vector2;
|
2465 | /**
|
2466 | * A Vector2 with a value of 1 on every axis.
|
2467 | *
|
2468 | * This API member is a **constant**, and must be accessed through the `Vector2` global as opposed to an individual
|
2469 | * `Vector2` object.
|
2470 | *
|
2471 | * ```lua
|
2472 | * print(Vector2.one) --> 1, 1
|
2473 | * ```
|
2474 | */
|
2475 | readonly one: Vector2;
|
2476 | /**
|
2477 | * A Vector2 with a value of 1 on the X axis.
|
2478 | *
|
2479 | * This API member is a **constant**, and must be accessed through the `Vector2` global as opposed to an individual
|
2480 | * `Vector2` object.
|
2481 | *
|
2482 | * ```lua
|
2483 | * print(Vector2.xAxis) --> 1, 0
|
2484 | * ```
|
2485 | */
|
2486 | readonly xAxis: Vector2;
|
2487 | /**
|
2488 | * A Vector2 with a value of 1 on the Y axis.
|
2489 | *
|
2490 | * This API member is a **constant**, and must be accessed through the `Vector2` global as opposed to an individual
|
2491 | * `Vector2` object.
|
2492 | *
|
2493 | * ```lua
|
2494 | * print(Vector2.yAxis) --> 0, 1
|
2495 | * ```
|
2496 | */
|
2497 | readonly yAxis: Vector2;
|
2498 | /** Returns a Vector2 from the given x and y components. */
|
2499 | new (x?: number, y?: number): Vector2;
|
2500 | }
|
2501 |
|
2502 | declare const Vector2: Vector2Constructor;
|
2503 |
|
2504 | // Vector2int16
|
2505 | interface Vector2int16 {
|
2506 | /**
|
2507 | * **DO NOT USE!**
|
2508 | *
|
2509 | * This field exists to force TypeScript to recognize this as a nominal type
|
2510 | * @hidden
|
2511 | * @deprecated
|
2512 | */
|
2513 | readonly _nominal_Vector2int16: unique symbol;
|
2514 | readonly X: number;
|
2515 | readonly Y: number;
|
2516 | }
|
2517 |
|
2518 | type Vector2int16Constructor = new (x?: number, y?: number) => Vector2int16;
|
2519 |
|
2520 | declare const Vector2int16: Vector2int16Constructor;
|
2521 |
|
2522 | // Vector3
|
2523 | interface Vector3 {
|
2524 | /**
|
2525 | * **DO NOT USE!**
|
2526 | *
|
2527 | * This field exists to force TypeScript to recognize this as a nominal type
|
2528 | * @hidden
|
2529 | * @deprecated
|
2530 | */
|
2531 | readonly _nominal_Vector3: unique symbol;
|
2532 | readonly X: number;
|
2533 | readonly Y: number;
|
2534 | readonly Z: number;
|
2535 | /** A normalized copy of the vector - one which has the same direction as the original but a magnitude of 1. */
|
2536 | readonly Unit: Vector3;
|
2537 | /** The length of the vector */
|
2538 | readonly Magnitude: number;
|
2539 | /** Returns a new vector from the absolute values of the original's components. For example, a vector of `(-2, 4, -6)` returns a vector of `(2, 4, 6)`. */
|
2540 | Abs(this: Vector3): Vector3;
|
2541 | /** Returns a new vector from the ceiling of the original's components. For example, a vector of `(-2.6, 5.1, 8.8)` returns a vector of `(-2, 6, 9)`. */
|
2542 | Ceil(this: Vector3): Vector3;
|
2543 | /** Returns a new vector from the floor of the original's components. For example, a vector of `(-2.6, 5.1, 8.8)` returns a vector of `(-3, 5, 8)`. */
|
2544 | Floor(this: Vector3): Vector3;
|
2545 | /** Returns a new vector from the sign (-1, 0, or 1) of the original's components. For example, a vector of `(-2.6, 5.1, 0)` returns a vector of `(-1, 1, 0)`. */
|
2546 | Sign(this: Vector3): Vector3;
|
2547 | /** Returns a Vector3 linearly interpolated between this Vector3 and the goal by the fraction alpha. */
|
2548 | Lerp(this: Vector3, goal: Vector3, alpha: number): Vector3;
|
2549 | /** Returns a scalar dot product of the two vectors. */
|
2550 | Dot(this: Vector3, other: Vector3): number;
|
2551 | /** Returns the cross product of the two vectors. */
|
2552 | Cross(this: Vector3, other: Vector3): Vector3;
|
2553 | /** Returns true if the other Vector3 falls within the epsilon radius of this Vector3. */
|
2554 | FuzzyEq(this: Vector3, other: Vector3, epsilon?: number): boolean;
|
2555 | /** Returns a new Vector3 with the minimum of each component. */
|
2556 | Min(this: Vector3, ...vectors: Array<Vector3>): Vector3;
|
2557 | /** Returns a new Vector3 with the maximum of each component. */
|
2558 | Max(this: Vector3, ...vectors: Array<Vector3>): Vector3;
|
2559 | /** Returns the angle in radians between the two vectors. If an axis is provided, it determines the sign of the angle. */
|
2560 | Angle(this: Vector3, other: Vector3, axis?: Vector3): number;
|
2561 | }
|
2562 |
|
2563 | interface Vector3Constructor {
|
2564 | /**
|
2565 | * A Vector3 with a magnitude of zero.
|
2566 | *
|
2567 | * This API member is a **constant**, and must be accessed through the `Vector3` global as opposed to an individual
|
2568 | * `Vector3` object.
|
2569 | *
|
2570 | * ```lua
|
2571 | * print(Vector3.zero) --> 0, 0, 0
|
2572 | * ```
|
2573 | */
|
2574 | readonly zero: Vector3;
|
2575 | /**
|
2576 | * A Vector3 with a value of 1 on every axis.
|
2577 | *
|
2578 | * This API member is a **constant**, and must be accessed through the `Vector3` global as opposed to an individual
|
2579 | * `Vector3` object.
|
2580 | *
|
2581 | * ```lua
|
2582 | * print(Vector3.one) --> 1, 1, 1
|
2583 | * ```
|
2584 | */
|
2585 | readonly one: Vector3;
|
2586 | /**
|
2587 | * A Vector3 with a value of 1 on the X axis.
|
2588 | *
|
2589 | * This API member is a **constant**, and must be accessed through the `Vector3` global as opposed to an individual
|
2590 | * `Vector3` object.
|
2591 | *
|
2592 | * ```lua
|
2593 | * print(Vector3.xAxis) --> 1, 0, 0
|
2594 | * ```
|
2595 | */
|
2596 | readonly xAxis: Vector3;
|
2597 | /**
|
2598 | * A Vector3 with a value of 1 on the Y axis.
|
2599 | *
|
2600 | * This API member is a **constant**, and must be accessed through the `Vector3` global as opposed to an individual
|
2601 | * `Vector3` object.
|
2602 | *
|
2603 | * ```lua
|
2604 | * print(Vector3.yAxis) --> 0, 1, 0
|
2605 | * ```
|
2606 | */
|
2607 | readonly yAxis: Vector3;
|
2608 | /**
|
2609 | * A Vector3 with a value of 1 on the Z axis.
|
2610 | *
|
2611 | * This API member is a **constant**, and must be accessed through the `Vector3` global as opposed to an individual
|
2612 | * `Vector3` object.
|
2613 | *
|
2614 | * ```lua
|
2615 | * print(Vector3.zAxis) --> 0, 0, 1
|
2616 | * ```
|
2617 | */
|
2618 | readonly zAxis: Vector3;
|
2619 | /** Constructs a new Vector3 in a particular direction. */
|
2620 | FromNormalId: (norm: Enum.NormalId) => Vector3;
|
2621 | /** Constructs a new Vector3 for a particular axis. */
|
2622 | FromAxis: (axis: Enum.Axis) => Vector3;
|
2623 | /** Constructs a new Vector3 using the given x, y, and z components. */
|
2624 | new (x?: number, y?: number, z?: number): Vector3;
|
2625 | }
|
2626 |
|
2627 | declare const Vector3: Vector3Constructor;
|
2628 |
|
2629 | // Vector3int16
|
2630 | interface Vector3int16 {
|
2631 | /**
|
2632 | * **DO NOT USE!**
|
2633 | *
|
2634 | * This field exists to force TypeScript to recognize this as a nominal type
|
2635 | * @hidden
|
2636 | * @deprecated
|
2637 | */
|
2638 | readonly _nominal_Vector3int16: unique symbol;
|
2639 | readonly X: number;
|
2640 | readonly Y: number;
|
2641 | readonly Z: number;
|
2642 | }
|
2643 |
|
2644 | type Vector3int16Constructor = new (x?: number, y?: number, z?: number) => Vector3int16;
|
2645 |
|
2646 | declare const Vector3int16: Vector3int16Constructor;
|
2647 |
|
2648 | // unusable internal studio classes
|
2649 | interface QFont {}
|
2650 | interface QDir {}
|
2651 |
|
2652 | // built-in globals
|
2653 | declare const game: DataModel;
|
2654 | declare const script: LuaSourceContainer;
|
2655 | declare const shared: object;
|
2656 |
|
2657 | type DelayedCallback =
|
2658 | /**
|
2659 | * @param delayedTime The amount of time in seconds which elapsed since the function invoking this callback was called
|
2660 | * @param gameTime The total time Roblox Lua has been running
|
2661 | */
|
2662 | (delayedTime: number, gameTime: number) => void;
|
2663 |
|
2664 | // built-in functions
|
2665 |
|
2666 | /** Schedules a function to be executed after delayTime seconds have passed, without yielding the current thread. This function allows multiple Lua threads to be executed in parallel from the same stack. The delay will have a minimum duration of 29 milliseconds, but this minimum may be higher depending on the target framerate and various throttling conditions. If the delayTime parameter is not specified, the minimum duration will be used. */
|
2667 | declare function delay(delayTime: number, callback: DelayedCallback): void;
|
2668 | /**
|
2669 | * Returns how much time has elapsed since the current instance of Roblox was started.
|
2670 | * In Roblox Studio, this begins counting up from the moment Roblox Studio starts running, not just when opening a place.
|
2671 | * @deprecated use os.clock() instead.
|
2672 | */
|
2673 | declare function elapsedTime(): number;
|
2674 | /**
|
2675 | * Returns the total memory heap size in kilobytes.
|
2676 | * The number reflects the current heap consumption from the operating system perspective, which fluctuates over time as garbage collector frees objects.
|
2677 | */
|
2678 | declare function gcinfo(): number;
|
2679 | /** Runs the supplied ModuleScript if it has not been run already, and returns what the ModuleScript returned (in both cases).
|
2680 |
|
2681 | If the ModuleScript the user wants to use has been uploaded to Roblox (with the instance’s name being ‘MainModule’), it can be loaded by using the require function on the asset ID of the ModuleScript, though only on the server. */
|
2682 | declare function require(moduleScript: ModuleScript | number): unknown;
|
2683 | /** Runs the specified callback function in a separate thread, without yielding the current thread.
|
2684 | The function will be executed the next time Roblox’s Task Scheduler runs an update cycle. This delay will take at least 29 milliseconds but can arbitrarily take longer, depending on the target framerate and various throttling conditions. */
|
2685 | declare function spawn(callback: DelayedCallback): void;
|
2686 | declare function tick(): number;
|
2687 | /** Time since the game started running. Will be 0 in Studio when not running the game. */
|
2688 | declare function time(): number;
|
2689 | declare function UserSettings(): UserSettings;
|
2690 | /** Returns the current version of Roblox as a string. The integers in the version string are separated by periods, and each integers represent the following, in order:
|
2691 |
|
2692 | Generation - The current generation of the application shell that is hosting the client.
|
2693 | Version - The current release version of Roblox.
|
2694 | Patch - The current patch number for this version of Roblox.
|
2695 | Commit - The ID of the last internal commit that was accepted into this version of the client. */
|
2696 | declare function version(): string;
|
2697 | /** Yields the current thread until the specified amount of seconds have elapsed.
|
2698 | The delay will have a minimum duration of 29 milliseconds, but this minimum may be higher depending on the target framerate and various throttling conditions. If the seconds parameter is not specified, the minimum duration will be used.
|
2699 | This function returns:
|
2700 |
|
2701 | Actual time yielded (in seconds)
|
2702 | Total time since the software was initialized (in seconds) */
|
2703 | declare function wait(seconds?: number): LuaTuple<[number, number]>;
|
2704 | /** Behaves identically to Lua’s print function, except the output is styled as a warning, with yellow text and a timestamp.
|
2705 | This function accepts any number of arguments, and will attempt to convert them into strings which will then be joined together with spaces between them. */
|
2706 | declare function warn(...params: Array<unknown>): void;
|
2707 |
|
2708 | // math functions
|
2709 | declare namespace math {
|
2710 | /**
|
2711 | * Returns a perlin noise value. The returned value is most often between the range [-1, 1].
|
2712 | *
|
2713 | * The returned value is sometimes will be outside of the range [-1,1], so if the interval is critical to you,
|
2714 | * you should use `math.clamp(noise, -1, 1)` on the output.
|
2715 | *
|
2716 | * The function uses a perlin noise algorithm to assign fixed values to coordinates.
|
2717 | * For example, `math.noise(1.158, 5.723)` will always return `0.48397532105446` and `math.noise(1.158, 6)` will always return `0.15315161645412`.
|
2718 | *
|
2719 | * If x, y and z are all integers, the return value will be 0. For fractional values of x, y and z, the return value will gradually fluctuate between -0.5 and 0.5.
|
2720 | * For coordinates that are close to each other, the return values will also be close to each other.
|
2721 | */
|
2722 | function noise(x: number, y?: number, z?: number): number;
|
2723 | /** Returns a number between min and max, inclusive. */
|
2724 | function clamp(n: number, min: number, max: number): number;
|
2725 | }
|
2726 |
|
2727 | declare namespace utf8 {
|
2728 | /** Receives zero or more codepoints as integers, converts each one to its corresponding UTF-8 byte sequence and returns a string with the concatenation of all these sequences. */
|
2729 | function char(...codepoints: Array<number>): string;
|
2730 | /** Returns an iterator function that will iterate over all codepoints in string str. It raises an error if it meets any invalid byte sequence. */
|
2731 | function codes(str: string): IterableFunction<LuaTuple<[number, number]>>;
|
2732 | /** Returns the codepoints (as integers) from all codepoints in the provided string (str) that start between byte positions i and j (both included). The default for i is 0 and for j is i. It raises an error if it meets any invalid byte sequence. Similar to `string.byte`.*/
|
2733 | function codepoint(str: string, i?: number, j?: number): LuaTuple<Array<number>>;
|
2734 | /** Returns the number of UTF-8 codepoints in the string str that start between positions i and j (both inclusive). The default for i is 0 and for j is -1. If it finds any invalid byte sequence, returns a false value plus the position of the first invalid byte. */
|
2735 | function len(s: string, i?: number, j?: number): LuaTuple<[number, undefined] | [false, number]>;
|
2736 | /** Returns the position (in bytes) where the encoding of the n-th codepoint of s (counting from byte position i) starts. A negative n gets characters before position i. The default for i is 0 when n is non-negative and #s + 1 otherwise, so that utf8.offset(s, -n) gets the offset of the n-th character from the end of the string. If the specified character is neither in the subject nor right after its end, the function returns nil. */
|
2737 | function offset(s: string, n: number, i?: number): number | undefined;
|
2738 | /** Returns an iterator function that will iterate the grapheme clusters of the string. */
|
2739 | function graphemes(s: string, i?: number, j?: number): IterableFunction<LuaTuple<[number, number]>>;
|
2740 | /** Converts the input string to Normal Form C, which tries to convert decomposed characters into composed characters. */
|
2741 | function nfcnormalize(str: string): string;
|
2742 | /** Converts the input string to Normal Form D, which tries to break up composed characters into decomposed characters. */
|
2743 | function nfdnormalize(str: string): string;
|
2744 | /** The pattern which matches exactly one UTF-8 byte sequence, assuming that the subject is a valid UTF-8 string. */
|
2745 | const charpattern: "[%z\x01-\x7F\xC2-\xF4][\x80-\xBF]*";
|
2746 | }
|
2747 |
|
2748 | declare namespace task {
|
2749 | /** Queues the calling script to be run during the parallel execution phase of the frame. */
|
2750 | function desynchronize(): void;
|
2751 | /** Yields the calling script and queues it for serial execution following the completion of the parallel execution phase of the frame. */
|
2752 | function synchronize(): void;
|
2753 | /** Defers the passed thread or function to be resumed at the end of the current resumption cycle. */
|
2754 | function defer<T extends Array<any>>(callback: (...args: T) => void, ...args: T): thread;
|
2755 | function defer(thread: thread, ...args: Array<unknown>): thread;
|
2756 | /** Delays the passed thread or function until the given duration has elapsed. Resumes on engine Heartbeat. */
|
2757 | function delay<T extends Array<any>>(duration: number, callback: (...args: T) => void, ...args: T): thread;
|
2758 | function delay(duration: number, thread: thread, ...args: Array<unknown>): thread;
|
2759 | /** Resumes the passed thread or function instantly using the engine's scheduler. */
|
2760 | function spawn<T extends Array<any>>(callback: (...args: T) => void, ...args: T): thread;
|
2761 | function spawn(thread: thread, ...args: Array<unknown>): thread;
|
2762 | /** Delay the current thread until the given duration has elasped. Resumes on engine Heartbeat. */
|
2763 | function wait(duration?: number): number;
|
2764 | /** Cancels a thread, preventing it from being resumed. */
|
2765 | function cancel(thread: thread): void;
|
2766 | }
|
2767 |
|
2768 | interface buffer {
|
2769 | /**
|
2770 | * **DO NOT USE!**
|
2771 | *
|
2772 | * This field exists to force TypeScript to recognize this as a nominal type
|
2773 | * @hidden
|
2774 | * @deprecated
|
2775 | */
|
2776 | readonly _nominal_buffer: unique symbol;
|
2777 | }
|
2778 |
|
2779 | declare namespace buffer {
|
2780 | /** Creates a buffer. */
|
2781 | function create(size: number): buffer;
|
2782 |
|
2783 | /** Creates a buffer from a string. */
|
2784 | function fromstring(str: string): buffer;
|
2785 |
|
2786 | /** Converts a buffer to a string. */
|
2787 | function tostring(b: buffer): string;
|
2788 |
|
2789 | /** Returns the size of the buffer in bytes. */
|
2790 | function len(b: buffer): number;
|
2791 |
|
2792 | /** Reads an 8-bit signed integer from the buffer. */
|
2793 | function readi8(b: buffer, offset: number): number;
|
2794 |
|
2795 | /** Reads an 8-bit unsigned integer from the buffer. */
|
2796 | function readu8(b: buffer, offset: number): number;
|
2797 |
|
2798 | /** Reads a 16-bit signed integer from the buffer. */
|
2799 | function readi16(b: buffer, offset: number): number;
|
2800 |
|
2801 | /** Reads a 16-bit unsigned integer from the buffer. */
|
2802 | function readu16(b: buffer, offset: number): number;
|
2803 |
|
2804 | /** Reads a 32-bit signed integer from the buffer. */
|
2805 | function readi32(b: buffer, offset: number): number;
|
2806 |
|
2807 | /** Reads a 32-bit unsigned integer from the buffer. */
|
2808 | function readu32(b: buffer, offset: number): number;
|
2809 |
|
2810 | /** Reads a 32-bit floating-point value from the buffer. */
|
2811 | function readf32(b: buffer, offset: number): number;
|
2812 |
|
2813 | /** Reads a 64-bit floating-point value from the buffer. */
|
2814 | function readf64(b: buffer, offset: number): number;
|
2815 |
|
2816 | /** Writes an 8-bit signed integer to the buffer. */
|
2817 | function writei8(b: buffer, offset: number, value: number): void;
|
2818 |
|
2819 | /** Writes an 8-bit unsigned integer to the buffer. */
|
2820 | function writeu8(b: buffer, offset: number, value: number): void;
|
2821 |
|
2822 | /** Writes a 16-bit signed integer to the buffer. */
|
2823 | function writei16(b: buffer, offset: number, value: number): void;
|
2824 |
|
2825 | /** Writes a 16-bit unsigned integer to the buffer. */
|
2826 | function writeu16(b: buffer, offset: number, value: number): void;
|
2827 |
|
2828 | /** Writes a 32-bit signed integer to the buffer. */
|
2829 | function writei32(b: buffer, offset: number, value: number): void;
|
2830 |
|
2831 | /** Writes a 32-bit unsigned integer to the buffer. */
|
2832 | function writeu32(b: buffer, offset: number, value: number): void;
|
2833 |
|
2834 | /** Writes a 32-bit floating-point value to the buffer. */
|
2835 | function writef32(b: buffer, offset: number, value: number): void;
|
2836 |
|
2837 | /** Writes a 64-bit floating-point value to the buffer. */
|
2838 | function writef64(b: buffer, offset: number, value: number): void;
|
2839 |
|
2840 | /** Reads a string from the buffer. */
|
2841 | function readstring(b: buffer, offset: number, count: number): string;
|
2842 |
|
2843 | /** Writes a string to the buffer. */
|
2844 | function writestring(b: buffer, offset: number, value: string, count?: number): void;
|
2845 |
|
2846 | /** Copies bytes between buffers. */
|
2847 | function copy(target: buffer, targetOffset: number, source: buffer, sourceOffset?: number, count?: number): void;
|
2848 |
|
2849 | /** Sets a region of the buffer memory to some 8-bit unsigned integer value. */
|
2850 | function fill(b: buffer, offset: number, value: number, count?: number): void;
|
2851 | }
|
2852 |
|
2853 | interface GettableCores {
|
2854 | AvatarContextMenuEnabled: boolean;
|
2855 | PointsNotificationsActive: boolean;
|
2856 | BadgesNotificationsActive: boolean;
|
2857 | ChatActive: boolean;
|
2858 | ChatWindowSize: UDim2;
|
2859 | ChatWindowPosition: UDim2;
|
2860 | ChatBarDisabled: boolean;
|
2861 | GetBlockedUserIds: Array<number>;
|
2862 | PlayerBlockedEvent: BindableEvent;
|
2863 | PlayerUnblockedEvent: BindableEvent;
|
2864 | PlayerMutedEvent: BindableEvent;
|
2865 | PlayerUnmutedEvent: BindableEvent;
|
2866 | PlayerFriendedEvent: BindableEvent;
|
2867 | PlayerUnfriendedEvent: BindableEvent;
|
2868 | DevConsoleVisible: boolean;
|
2869 | VRRotationIntensity: "Low" | "High" | "Smooth";
|
2870 | }
|
2871 |
|
2872 | interface SettableCores {
|
2873 | ChatActive: boolean;
|
2874 | PointsNotificationsActive: boolean;
|
2875 | BadgesNotificationsActive: boolean;
|
2876 | ResetButtonCallback: boolean | BindableEvent;
|
2877 | ChatMakeSystemMessage: MakeSystemMessageConfig;
|
2878 | ChatWindowSize: UDim2;
|
2879 | ChatWindowPosition: UDim2;
|
2880 | ChatBarDisabled: boolean;
|
2881 | SendNotification: SendNotificationConfig;
|
2882 | TopbarEnabled: boolean;
|
2883 | DevConsoleVisible: boolean;
|
2884 | PromptSendFriendRequest: Player;
|
2885 | PromptUnfriend: Player;
|
2886 | PromptBlockPlayer: Player;
|
2887 | PromptUnblockPlayer: Player;
|
2888 | AvatarContextMenuEnabled: boolean;
|
2889 | AddAvatarContextMenuOption: Enum.AvatarContextMenuOption | [string, BindableFunction];
|
2890 | RemoveAvatarContextMenuOption: Enum.AvatarContextMenuOption | [string, BindableFunction];
|
2891 | CoreGuiChatConnections:
|
2892 | | { [name: string]: BindableEvent | BindableFunction }
|
2893 | | Map<string, BindableEvent | BindableFunction>;
|
2894 | VREnableControllerModels: boolean;
|
2895 | VRLaserPointerMode: "Disabled" | "Pointer" | "Navigation" | "Hidden";
|
2896 | }
|
2897 |
|
2898 | // type
|
2899 | interface CheckablePrimitives {
|
2900 | nil: undefined;
|
2901 | boolean: boolean;
|
2902 | string: string;
|
2903 | number: number;
|
2904 | table: object;
|
2905 | userdata: unknown;
|
2906 | function: Callback;
|
2907 | thread: thread;
|
2908 | vector: Vector3;
|
2909 | buffer: buffer;
|
2910 | }
|
2911 |
|
2912 | /**
|
2913 | * Returns the type of its only argument, coded as a string.
|
2914 | * Roblox datatypes will return "userdata" when passed to this function. You should use Roblox's `typeOf()` function if you want to differentiate between Roblox datatypes.
|
2915 | */
|
2916 | declare function type(value: unknown): keyof CheckablePrimitives;
|
2917 |
|
2918 | /** The strings which can be returned by typeOf and their corresponding types */
|
2919 | interface CheckableTypes extends CheckablePrimitives {
|
2920 | Axes: Axes;
|
2921 | BrickColor: BrickColor;
|
2922 | CFrame: CFrame;
|
2923 | Color3: Color3;
|
2924 | ColorSequence: ColorSequence;
|
2925 | ColorSequenceKeypoint: ColorSequenceKeypoint;
|
2926 | DateTime: DateTime;
|
2927 | DockWidgetPluginGuiInfo: DockWidgetPluginGuiInfo;
|
2928 | Enum: Enum;
|
2929 | EnumItem: EnumItem;
|
2930 | Enums: Enums;
|
2931 | Faces: Faces;
|
2932 | FloatCurveKey: FloatCurveKey;
|
2933 | Font: Font;
|
2934 | Instance: Instance;
|
2935 | NumberRange: NumberRange;
|
2936 | NumberSequence: NumberSequence;
|
2937 | NumberSequenceKeypoint: NumberSequenceKeypoint;
|
2938 | OverlapParams: OverlapParams;
|
2939 | PathWaypoint: PathWaypoint;
|
2940 | PhysicalProperties: PhysicalProperties;
|
2941 | Random: Random;
|
2942 | Ray: Ray;
|
2943 | RaycastParams: RaycastParams;
|
2944 | RaycastResult: RaycastResult;
|
2945 | RBXScriptConnection: RBXScriptConnection;
|
2946 | RBXScriptSignal: RBXScriptSignal;
|
2947 | Rect: Rect;
|
2948 | Region3: Region3;
|
2949 | Region3int16: Region3int16;
|
2950 | TweenInfo: TweenInfo;
|
2951 | UDim: UDim;
|
2952 | UDim2: UDim2;
|
2953 | Vector2: Vector2;
|
2954 | Vector2int16: Vector2int16;
|
2955 | Vector3: Vector3;
|
2956 | Vector3int16: Vector3int16;
|
2957 | }
|
2958 |
|
2959 | type AttributeValue =
|
2960 | | string
|
2961 | | boolean
|
2962 | | number
|
2963 | | UDim
|
2964 | | UDim2
|
2965 | | BrickColor
|
2966 | | Color3
|
2967 | | Vector2
|
2968 | | Vector3
|
2969 | | CFrame
|
2970 | | NumberSequence
|
2971 | | ColorSequence
|
2972 | | NumberRange
|
2973 | | Rect
|
2974 | | Font;
|
2975 |
|
2976 | declare const enum RobloxEmoji {
|
2977 | Robux = "",
|
2978 | Premium = "",
|
2979 | Verified = "",
|
2980 | }
|
2981 |
|
2982 | interface BanAsyncConfig {
|
2983 | /**
|
2984 | * (Required) UserID of the players to be banned.
|
2985 | *
|
2986 | * Max size is `50`. */
|
2987 | UserIds: Array<number>;
|
2988 | /**
|
2989 | * (Required) Duration of the ban in seconds. Permanent bans should have a value of `-1`.
|
2990 | *
|
2991 | * Zero and all other negative values are invalid.
|
2992 | */
|
2993 | Duration: number;
|
2994 | /**
|
2995 | * (Required) The message that will be displayed to users when they attempt to and fail to join an experience. Max size is 400.
|
2996 | */
|
2997 | DisplayReason: string;
|
2998 | /**
|
2999 | * (Required) Any internal messaging that will be returned when querying the user's ban history. Max size is 1000.
|
3000 | */
|
3001 | PrivateReason: string;
|
3002 | /**
|
3003 | * (Optional, default is `true`) Propagates the ban to all places within this universe.
|
3004 | */
|
3005 | ApplyToUniverse?: boolean;
|
3006 | /**
|
3007 | * (Optional, default is `false`) When `true`, Roblox does not attempt to ban alt accounts.
|
3008 | */
|
3009 | ExcludeAltAccounts?: boolean;
|
3010 | }
|
3011 |
|
3012 | interface UnbanAsyncConfig {
|
3013 | /**
|
3014 | * (Required) UserIDs to be force allowed into the experience(s).
|
3015 | *
|
3016 | * Max size is `50`.
|
3017 | */
|
3018 | UserIds: Array<number>;
|
3019 | /**
|
3020 | * (Optional, default is `true`) Propagates the unban to all places within this universe.
|
3021 | */
|
3022 | ApplyToUniverse?: boolean;
|
3023 | }
|
3024 |
|
3025 | /**
|
3026 | * Keys are expected to be unique numbers greater than or equal to 0, while values are expected to be numbers between 0 and 1 (inclusive). Tables containing up to 400 key-value pairs are supported.
|
3027 | */
|
3028 | type DistanceAttenuationCurve = { [key: number]: number } | Map<number, number>;
|
3029 |
|
3030 | interface CalculateConstraintsToPreserveConfig {
|
3031 | /**
|
3032 | * The distance tolerance, in regards to `Attachment` preservation, between the attachment and the closest point on the original part's surface versus the closest point on the resulting part's surface. If the resulting distance following the solid modeling operation is greater than this value, the `Parent` of attachments and their associated constraints will be `nil` in the returned recommendation table.
|
3033 | */
|
3034 | tolerance?: number;
|
3035 | /**
|
3036 | * A `Enum.WeldConstraintPreserve` enum value describing how `WeldConstraints` are preserved in the resulting recommendation table.
|
3037 | */
|
3038 | weldConstraintPreserve?: Enum.WeldConstraintPreserve;
|
3039 | }
|
3040 |
|
3041 | interface GeometryServiceAsyncMethodConfig {
|
3042 | /**
|
3043 | * The value of `CollisionFidelity` in the resulting parts.
|
3044 | */
|
3045 | CollisionFidelity?: Enum.CollisionFidelity;
|
3046 | /**
|
3047 | * The value of `FluidFidelity` in the resulting parts.
|
3048 | */
|
3049 | RenderFidelity?: Enum.RenderFidelity;
|
3050 | /**
|
3051 | * The value of FluidFidelity in the resulting parts.
|
3052 | */
|
3053 | FluidFidelity?: Enum.FluidFidelity;
|
3054 | /**
|
3055 | * Boolean controlling whether the objects should all be kept together or properly split apart. Default is `true` (split).
|
3056 | */
|
3057 | SplitApart?: boolean;
|
3058 | }
|
3059 |
|
3060 | interface VoxelChannels {
|
3061 | /**
|
3062 | * The `Enum.Material` material of the voxel. Note that `Water` is not supported anymore; instead, a voxel that contains only water should be entered as `SolidMaterial = Enum.Material.Air, LiquidOccupancy = x`, where `x` is a number between 0 (exclusive) and 1 (inclusive).
|
3063 | */
|
3064 | SolidMaterial: Enum.Material;
|
3065 | /**
|
3066 | * The occupancy of the voxel's material as specified in the `SolidMaterial` channel. This should be a value between 0 (empty) and 1 (full).
|
3067 | */
|
3068 | SolidOccupancy: number;
|
3069 | /**
|
3070 | * Specifies the occupancy of the `Water` material in a voxel as a value between 0 (no water) and 1 (full of water). If the `SolidOccupancy` is 1 and the `SolidMaterial` is not `Air`, this will be 0.
|
3071 | */
|
3072 | LiquidOccupancy: number;
|
3073 | }
|
3074 |
|
3075 | interface SubscriptionInfo {
|
3076 | /**
|
3077 | * The name of the subscription product.
|
3078 | */
|
3079 | Name: string;
|
3080 | /**
|
3081 | * The description of the subscription product.
|
3082 | */
|
3083 | Description: string;
|
3084 | /**
|
3085 | * The asset ID of the subscription product icon.
|
3086 | */
|
3087 | IconImageAssetID: number;
|
3088 | /**
|
3089 | * The duration of the subscription (for example, `Month`, `Year`, etc.).
|
3090 | */
|
3091 | SubscriptionPeriod: Enum.SubscriptionPeriod;
|
3092 | /**
|
3093 | * Localized price with the appropriate currency symbol for display (for example, `$4.99`). For users in unsupported countries, `DisplayPrice` returns a string without specific price information.
|
3094 | */
|
3095 | DisplayPrice: string;
|
3096 | /**
|
3097 | * Localized subscription period text for display (for example, `/month`). Can be used together with `DisplayPrice`.
|
3098 | */
|
3099 | DisplaySubscriptionPeriod: number;
|
3100 | /**
|
3101 | * Name of the subscription benefit provider (for example, the name of the associated experience).
|
3102 | */
|
3103 | SubscriptionProviderName: string;
|
3104 | /**
|
3105 | * True if the subscription product is available for sale.
|
3106 | */
|
3107 | IsForSale: boolean;
|
3108 | /**
|
3109 | * A number that can be used to compare the price of different subscription products. This is not the actual price of the subscription (for example, 499).
|
3110 | */
|
3111 | PriceTier: number;
|
3112 | }
|
3113 |
|
3114 | interface UserSubscriptionDetails {
|
3115 | /**
|
3116 | * Current state of this particular subscription.
|
3117 | */
|
3118 | SubscriptionState: Enum.SubscriptionState;
|
3119 | /**
|
3120 | * Renewal time for this current subscription. May be in the past if the subscription is in [SubscribedRenewalPaymentPending](https://create.roblox.com/docs/reference/engine/enums/SubscriptionState#SubscribedRenewalPaymentPending) state. This field is will be `nil` if the subscription will not renew, is [Expired](https://create.roblox.com/docs/reference/engine/enums/SubscriptionState#Expired), or the user never subscribed.
|
3121 | */
|
3122 | NextRenewTime: DateTime | undefined;
|
3123 | /**
|
3124 | * When this subscription expires. This field will be nil if the subscription is not cancelled or the user never subscribed.
|
3125 | */
|
3126 | ExpireTime: DateTime | undefined;
|
3127 | /**
|
3128 | * Table containing the details of the subscription expiration. This field will be `nil` if the subscription is not in the [Expired](https://create.roblox.com/docs/reference/engine/enums/SubscriptionState#Expired) state. If populated, the table contains a ExpirationReason key of type [Enum.SubscriptionExpirationReason](https://create.roblox.com/docs/reference/engine/enums/SubscriptionExpirationReason) describing why the subscription is expired.
|
3129 | */
|
3130 | ExpirationDetails: ExpirationDetails | undefined;
|
3131 | }
|
3132 |
|
3133 | interface UserSubscriptionPaymentHistory {
|
3134 | /**
|
3135 | * [DateTime](https://create.roblox.com/docs/reference/engine/datatypes/DateTime) at the start of this particular subscription period.
|
3136 | */
|
3137 | CycleStartTime: DateTime;
|
3138 | /**
|
3139 | * [DateTime](https://create.roblox.com/docs/reference/engine/datatypes/DateTime) at the end of this particular subscription period.
|
3140 | */
|
3141 | CycleEndTime: DateTime;
|
3142 | /**
|
3143 | * [Enum.SubscriptionPaymentStatus.Paid](https://create.roblox.com/docs/reference/engine/enums/SubscriptionPaymentStatus#Paid) if the user paid for this particular subscription period. [Enum.SubscriptionPaymentStatus.Refunded](https://create.roblox.com/docs/reference/engine/enums/SubscriptionPaymentStatus#Refunded) if the user refunded this particular subscription period.
|
3144 | */
|
3145 | PaymentStatus: Enum.SubscriptionPaymentStatus;
|
3146 | }
|
3147 |
|
3148 | interface UserSubscriptionStatus {
|
3149 | /**
|
3150 | * True if the user's subscription is active.
|
3151 | */
|
3152 | IsSubscribed: boolean;
|
3153 | /**
|
3154 | * True if the user is set to renew this subscription after the current subscription period ends.
|
3155 | */
|
3156 | IsRenewing: boolean;
|
3157 | }
|
3158 |
|
3159 | interface ExpirationDetails {
|
3160 | ExpirationReason: Enum.SubscriptionExpirationReason;
|
3161 | }
|