UNPKG

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