messages
listlengths
1
1
[ { "role": "assistant", "content": "--!strict\n--[=[\n @function every\n @within Dictionary\n\n @param dictionary {[K]: V} -- The dictionary to check.\n @param predicate (value: V, key: K, dictionary: {[K]: V}) -> any -- The predicate to use to check the dictionary.\n @return boolean -- Whether every it...
[ { "role": "assistant", "content": "--!strict\nlocal Sift = script.Parent.Parent\n\nlocal Util = require(Sift.Util)\n\n--[=[\n @function filter\n @within Dictionary\n\n @param dictionary {[K]: V} -- The dictionary to filter.\n @param predicate? (value: V, key: K, dictionary: {[K]: V}) -> any -- The predi...
[ { "role": "assistant", "content": "--!strict\nlocal _T = require(script.Parent.Parent.Types)\n\n--[=[\n @function flatten\n @within Dictionary\n\n @param dictionary T -- The dictionary to flatten.\n @param depth? number -- The depth to flatten the dictionary to.\n @return T -- The flattened dictionary....
[ { "role": "assistant", "content": "--!strict\n--[=[\n @function flip\n @within Dictionary\n\n @param dictionary { [K]: V } -- The dictionary to flip.\n @return { [V]: K } -- The flipped dictionary.\n\n Flips a dictionary. Keys become values and values become keys.\n\n ```lua\n local dictionary = { he...
[ { "role": "assistant", "content": "--!strict\nlocal _T = require(script.Parent.Parent.Types)\nlocal Copy = require(script.Parent.copy)\n\n--[=[\n @function freeze\n @within Dictionary\n\n @param dictionary T -- The dictionary to freeze.\n @return T -- The frozen dictionary.\n\n Freezes the given dictio...
[ { "role": "assistant", "content": "--!strict\nlocal _T = require(script.Parent.Parent.Types)\n\n--[=[\n @function freezeDeep\n @within Dictionary\n\n @param dictionary T -- The dictionary to freeze.\n @return T -- The frozen dictionary.\n\n Freezes the entire dictionary, making it read-only, including ...
[ { "role": "assistant", "content": "--!strict\n--[=[\n @function fromArrays\n @within Dictionary\n\n @param keys {K} -- An array containing values to be used as keys.\n @param values {V} -- An array containing values to be used as values.\n @return {[K]: V} -- A dictionary composed of the given keys and...
[ { "role": "assistant", "content": "--!strict\n--[=[\n @function fromEntries\n @within Dictionary\n\n @param entries {{ K, V }} -- An array of key-value pairs.\n @return {[K]: V} -- A dictionary composed of the given key-value pairs.\n\n Creates a dictionary from the given key-value pairs.\n\n ```lua\n...
[ { "role": "assistant", "content": "--!strict\nlocal _T = require(script.Parent.Parent.Types)\n\n--[=[\n @function has\n @within Dictionary\n\n @param dictionary {[K]: V} -- The dictionary to check.\n @param key any -- The key to check for.\n @return boolean -- Whether or not the dictionary has the give...
[ { "role": "assistant", "content": "--!strict\n--[=[\n @function includes\n @within Dictionary\n\n @param dictionary {[K]: V} -- The dictionary to check.\n @param value V -- The value to check for.\n @return boolean -- Whether or not the dictionary includes the given value.\n\n Checks whether or not th...
[ { "role": "assistant", "content": "--!strict\n--[=[\n\t@class Dictionary\n\n\tDictionaries are a type of data structure that can be used to store key-value pairs.\n\n\t```lua\n\tlocal dictionary = {\n\t\tcats = 2,\n\t\tdogs = 1\n\t}\n\n\tprint(dictionary.cats) -- 2\n\t```\n]=]\nlocal Dictionary = {\n\tcopy ...
[ { "role": "assistant", "content": "--!strict\n--[=[\n @function keys\n @within Dictionary\n\n @param dictionary {[K]: V} -- The dictionary to get the keys of.\n @return {K} -- An array containing the keys of the given dictionary.\n\n Gets the keys of the given dictionary as an array.\n\n ```lua\n loc...
[ { "role": "assistant", "content": "--!strict\n--[=[\n @function map\n @within Dictionary\n\n @param dictionary {[K]: V} -- The dictionary to map.\n @param mapper (value: V, key: K, dictionary: {[K]: V}) -> (Y?, X?) -- The mapper function.\n @return {[X]: Y} -- The mapped dictionary.\n\n Maps the dicti...
[ { "role": "assistant", "content": "--!strict\nlocal Sift = script.Parent.Parent\n\nlocal None = require(Sift.None)\n\n--[=[\n @function merge\n @within Dictionary\n\n @param dictionaries? ...any -- The dictionaries to merge.\n @return T -- The merged dictionary.\n\n Merges the given dictionaries into a...
[ { "role": "assistant", "content": "--!strict\nlocal Sift = script.Parent.Parent\n\nlocal None = require(Sift.None)\nlocal copyDeep = require(script.Parent.copyDeep)\n\n--[=[\n\t@function mergeDeep\n\t@within Dictionary\n\n\t@param dictionaries? ...any -- The dictionaries to merge.\n\t@return T -- The merged...
[ { "role": "assistant", "content": "--!strict\nlocal copy = require(script.Parent.copy)\n\n--[=[\n @function removeKey\n @within Dictionary\n\n @param dictionary {[K]: V} -- The dictionary to remove the key from.\n @param key K -- The key to remove.\n @return {[K]: V} -- The dictionary without the given...
[ { "role": "assistant", "content": "--!strict\nlocal copy = require(script.Parent.copy)\n\n--[=[\n @function removeKeys\n @within Dictionary\n\n @param dictionary {[K]: V} -- The dictionary to remove the keys from.\n @param keys ...K -- The keys to remove.\n @return {[K]: V} -- The dictionary without th...
[ { "role": "assistant", "content": "--!strict\n--[=[\n @function removeValue\n @within Dictionary\n\n @param dictionary {[K]: V} -- The dictionary to remove the value from.\n @param value V -- The value to remove.\n @return {[K]: V} -- The dictionary without the given value.\n\n Removes the given value...
[ { "role": "assistant", "content": "--!strict\nlocal Sift = script.Parent.Parent\n\nlocal ToSet = require(Sift.Array.toSet)\n\n--[=[\n @function removeValues\n @within Dictionary\n\n @param dictionary {[K]: V} -- The dictionary to remove the values from.\n @param values ...V -- The values to remove.\n @...
[ { "role": "assistant", "content": "--!strict\nlocal copy = require(script.Parent.copy)\n\n--[=[\n @function set\n @within Dictionary\n\n @param dictionary {[K]: V} -- The dictionary to set the value in.\n @param key K -- The key to set the value in.\n @param value V -- The value to set.\n @return {[K]...
[ { "role": "assistant", "content": "--!strict\n--[=[\n @function some\n @within Dictionary\n\n @param dictionary {[K]: V} -- The dictionary to check.\n @param predicate (value: V, key: K, dictionary: { [K]: V }) -> any -- The predicate to check against.\n @return boolean -- Whether or not the predicate ...
[ { "role": "assistant", "content": "--!strict\nlocal copy = require(script.Parent.copy)\n\ntype Callback<K, V> = (key: K) -> V\ntype Updater<K, V> = (value: V, key: K) -> V\n\nlocal function call<K, V>(callback: Callback<K, V>, key: K)\n\tif type(callback) == \"function\" then\n\t\treturn callback(key)\n\ten...
[ { "role": "assistant", "content": "--!strict\n--[=[\n @function values\n @within Dictionary\n\n @param dictionary {[K]: V} -- The dictionary to get the values from.\n @return {V} -- The values in the dictionary.\n\n Gets the values in the given dictionary.\n\n ```lua\n local dictionary = { hello = \"...
[ { "role": "assistant", "content": "--!strict\n--[=[\n\t@prop None None\n\t@within Sift\n\n\tLuau can't distinguish between a nil value and a non-existent value. This\n\tconstant is used to represent a non-existent value. It can be used in methods\n\tlike `Array.Concat` or `Dictionary.Merge` to remove the va...
[ { "role": "assistant", "content": "--!strict\n--[=[\n @function add\n @within Set\n\n @param set { [T]: boolean } -- The set to add the value to.\n @param ... ...T -- The values to add.\n @return { [T]: boolean } -- The set with the values added.\n\n Adds values to a set.\n\n ```lua\n local set = { ...
[ { "role": "assistant", "content": "--!strict\nlocal Sift = script.Parent.Parent\n\nlocal copy = require(Sift.Dictionary.copy)\n\n--[=[\n @function copy\n @within Set\n\n @param set { [T]: boolean } -- The set to copy.\n @return { [T]: boolean } -- A copy of the set.\n\n Creates a copy of a set.\n\n ``...
[ { "role": "assistant", "content": "--!strict\nlocal Sift = script.Parent.Parent\n\nlocal Util = require(Sift.Util)\n\n--[=[\n @function count\n @within Set\n\n @param set { [T]: boolean } -- The set to count.\n @param predicate? (item: T, set: { [T]: boolean }) -> boolean? -- The predicate to use to cou...
[ { "role": "assistant", "content": "--!strict\n--[=[\n @function delete\n @within Set\n\n @param set { [T]: boolean } -- The set to delete from.\n @param ... ...T -- The values to delete.\n @return { [T]: boolean } -- The set with the values deleted.\n\n Deletes values from a set.\n\n Aliases: `subtra...
[ { "role": "assistant", "content": "--!strict\nlocal Sift = script.Parent.Parent\n\nlocal Util = require(Sift.Util)\n\n--[=[\n @function filter\n @within Set\n\n @param set { [T]: boolean } -- The set to filter.\n @param predicate? (item: T, set: { [T]: boolean }) -> any -- The function to filter the set...
[ { "role": "assistant", "content": "--!strict\n--[=[\n @function fromArray\n @within Set\n\n @param array {T} -- The array to convert to a set.\n @return {[T]: boolean} -- The set.\n\n Converts an array to a set, where each item is mapped to true.\n Duplicate items are discarded.\n\n Aliases: `fromLis...
[ { "role": "assistant", "content": "--!strict\n--[=[\n @function has\n @within Set\n\n @param set { [T]: boolean } -- The set to check.\n @param value any -- The value to check for.\n @return boolean -- Whether the value is in the set.\n\n Checks whether a value is in a set.\n\n ```lua\n local set = ...
[ { "role": "assistant", "content": "--!strict\n--[=[\n\t@class Set\n\n\tSets are a collection of values. They are used to store unique values.\n\tThey are essentially a dictionary, but each value is stored as a boolean.\n\tThis means that a value can only be in a set once.\n\n\t```lua\n\tlocal set = { hello ...
[ { "role": "assistant", "content": "--!strict\n--[=[\n @function intersection\n @within Set\n\n @param ... ...{ [any]: boolean } -- The sets to intersect.\n @return { [T]: boolean } -- The intersection of the sets.\n\n Creates the intersection of multiple sets. The intersection\n is when both sets have...
[ { "role": "assistant", "content": "--!strict\n--[=[\n @function isSubset\n @within Set\n\n @param subset { [any]: boolean } -- The subset to check.\n @param superset { [any]: boolean } -- The superset to check against.\n @return boolean -- Whether the subset is a subset of the superset.\n\n Checks whe...
[ { "role": "assistant", "content": "--!strict\nlocal isSubset = require(script.Parent.isSubset)\n\n--[=[\n @function isSuperset\n @within Set\n\n @param superset { [any]: boolean } -- The superset to check.\n @param subset { [any]: boolean } -- The subset to check against.\n @return boolean -- Whether t...
[ { "role": "assistant", "content": "--!strict\n--[=[\n @function map\n @within Set\n\n @param set { [T]: boolean } -- The set to map.\n @param mapper (T, {[T]: boolean}) -> U -- The mapper function.\n @return {[U]: boolean} -- The mapped set.\n\n Iterates over a set, calling a mapper function for each ...
[ { "role": "assistant", "content": "--!strict\n--[=[\n @function merge\n @within Set\n\n @param ... ...any -- The sets to merge.\n @return { [T]: boolean } -- The merged set.\n\n Combines one or more sets into a single set.\n\n Aliases: `join`, `union`\n\n ```lua\n local set1 = { hello = true, world ...
[ { "role": "assistant", "content": "--!strict\n--[=[\n @function toArray\n @within Set\n\n @param set { [T]: boolean } -- The set to convert to an array.\n @return {T} -- The array.\n\n Converts a set to an array.\n\n ```lua\n local set = { hello = true, world = true }\n\n local array = ToArray(set) ...
[ { "role": "assistant", "content": "local None = require(script.Parent.None)\n\n--[=[\n @type None None\n @within Sift\n]=]\nexport type None = typeof(None)\nexport type Dictionary<K, V> = { [K]: V }\nexport type Array<T> = Dictionary<number, T>\nexport type Set<T> = Dictionary<T, boolean>\nexport type Tab...
[ { "role": "assistant", "content": "--!strict\nlocal _T = require(script.Parent.Parent.Types)\n\n--[=[\n\t@function equalObjects\n\t@within Sift\n\n\t@param ... ...table -- The tables to compare.\n\t@return boolean -- Whether or not the tables are equal.\n\n\tCompares two or more tables to see if they are eq...
[ { "role": "assistant", "content": "local function truthy()\n\treturn true\nend\n\nlocal function noop() end\n\nlocal function returned(...)\n\treturn ...\nend\n\nreturn {\n\ttruthy = truthy,\n\tnoop = noop,\n\treturned = returned,\n}\n" } ]
[ { "role": "assistant", "content": "return {\n\tequalObjects = require(script.equalObjects),\n\tfunc = require(script.func),\n\tisEmpty = require(script.isEmpty),\n}\n" } ]
[ { "role": "assistant", "content": "--!strict\nlocal _T = require(script.Parent.Parent.Types)\n\n--[=[\n @function isEmpty\n @within Sift\n @since v0.0.1\n\n @param table table -- The table to check.\n @return boolean -- Whether or not the table is empty.\n\n Checks whether or not a table is empty.\n\n...
[ { "role": "assistant", "content": "local RunService = game:GetService(\"RunService\")\n\nlocal Signal = require(script.Parent.Signal)\n\nlocal noop = function() end\n\nlocal BaseMotor = {}\nBaseMotor.__index = BaseMotor\n\nfunction BaseMotor.new()\n\treturn setmetatable({\n\t\t_onStep = Signal.new(),\n\t\t_...
[ { "role": "assistant", "content": "local BaseMotor = require(script.Parent.BaseMotor)\nlocal SingleMotor = require(script.Parent.SingleMotor)\n\nlocal isMotor = require(script.Parent.isMotor)\n\nlocal GroupMotor = setmetatable({}, BaseMotor)\nGroupMotor.__index = GroupMotor\n\nlocal function toMotor(value)\...
[ { "role": "assistant", "content": "local Instant = {}\nInstant.__index = Instant\n\nfunction Instant.new(targetValue)\n\treturn setmetatable({\n\t\t_targetValue = targetValue,\n\t}, Instant)\nend\n\nfunction Instant:step()\n\treturn {\n\t\tcomplete = true,\n\t\tvalue = self._targetValue,\n\t}\nend\n\nreturn...
[ { "role": "assistant", "content": "local Linear = {}\nLinear.__index = Linear\n\nfunction Linear.new(targetValue, options)\n\tassert(targetValue, \"Missing argument #1: targetValue\")\n\t\n\toptions = options or {}\n\n\treturn setmetatable({\n\t\t_targetValue = targetValue,\n\t\t_velocity = options.velocity...
[ { "role": "assistant", "content": "local Connection = {}\nConnection.__index = Connection\n\nfunction Connection.new(signal, handler)\n\treturn setmetatable({\n\t\tsignal = signal,\n\t\tconnected = true,\n\t\t_handler = handler,\n\t}, Connection)\nend\n\nfunction Connection:disconnect()\n\tif self.connected...
[ { "role": "assistant", "content": "local BaseMotor = require(script.Parent.BaseMotor)\n\nlocal SingleMotor = setmetatable({}, BaseMotor)\nSingleMotor.__index = SingleMotor\n\nfunction SingleMotor.new(initialValue, useImplicitConnections)\n\tassert(initialValue, \"Missing argument #1: initialValue\")\n\tasse...
[ { "role": "assistant", "content": "local Flipper = {\n\tSingleMotor = require(script.SingleMotor),\n\tGroupMotor = require(script.GroupMotor),\n\n\tInstant = require(script.Instant),\n\tLinear = require(script.Linear),\n\tSpring = require(script.Spring),\n\t\n\tisMotor = require(script.isMotor),\n}\n\nretur...
[ { "role": "assistant", "content": "local function isMotor(value)\n\tlocal motorType = tostring(value):match(\"^Motor%((.+)%)$\")\n\n\tif motorType then\n\t\treturn true, motorType\n\telse\n\t\treturn false\n\tend\nend\n\nreturn isMotor\n" } ]
[ { "role": "assistant", "content": "local createSignal = require(script.Parent.createSignal)\nlocal Symbol = require(script.Parent.Symbol)\nlocal Type = require(script.Parent.Type)\n\nlocal config = require(script.Parent.GlobalConfig).get()\n\nlocal BindingImpl = Symbol.named(\"BindingImpl\")\n\nlocal Bindin...
[ { "role": "assistant", "content": "local Symbol = require(script.Parent.Symbol)\nlocal strict = require(script.Parent.strict)\n\nlocal ComponentLifecyclePhase = strict({\n\t-- Component methods\n\tInit = Symbol.named(\"init\"),\n\tRender = Symbol.named(\"render\"),\n\tShouldUpdate = Symbol.named(\"shouldUpd...
[ { "role": "assistant", "content": "--[[\n\tExposes an interface to set global configuration values for Roact.\n\n\tConfiguration can only occur once, and should only be done by an application\n\tusing Roact, not a library.\n\n\tAny keys that aren't recognized will cause errors. Configuration is only\n\tinte...
[ { "role": "assistant", "content": "--[[\n\tContains markers for annotating the type of an element.\n\n\tUse `ElementKind` as a key, and values from it as the value.\n\n\t\tlocal element = {\n\t\t\t[ElementKind] = ElementKind.Host,\n\t\t}\n]]\n\nlocal Symbol = require(script.Parent.Symbol)\nlocal strict = re...
[ { "role": "assistant", "content": "--[[\n\tExposes a single instance of a configuration as Roact's GlobalConfig.\n]]\n\nlocal Config = require(script.Parent.Config)\n\nreturn Config.new()\n" } ]
[ { "role": "assistant", "content": "--[[\n\tCentralized place to handle logging. Lets us:\n\t- Unit test log output via `Logging.capture`\n\t- Disable verbose log messages when not debugging Roact\n\n\tThis should be broken out into a separate library with the addition of\n\tscoping and logging configuration...
[ { "role": "assistant", "content": "local Symbol = require(script.Parent.Symbol)\n\n-- Marker used to specify that the value is nothing, because nil cannot be\n-- stored in tables.\nlocal None = Symbol.named(\"None\")\n\nreturn None\n" } ]
[ { "role": "assistant", "content": "--[[\n\tReference renderer intended for use in tests as well as for documenting the\n\tminimum required interface for a Roact renderer.\n]]\n\nlocal NoopRenderer = {}\n\nfunction NoopRenderer.isHostObject(target)\n\t-- Attempting to use NoopRenderer to target a Roblox inst...
[ { "role": "assistant", "content": "--[[\n\tChange is used to generate special prop keys that can be used to connect to\n\tGetPropertyChangedSignal.\n\n\tGenerally, Change is indexed by a Roblox property name:\n\n\t\tRoact.createElement(\"TextBox\", {\n\t\t\t[Roact.Change.Text] = function(rbx)\n\t\t\t\tprint...
[ { "role": "assistant", "content": "local Symbol = require(script.Parent.Parent.Symbol)\n\nlocal Children = Symbol.named(\"Children\")\n\nreturn Children\n" } ]
[ { "role": "assistant", "content": "--[[\n\tIndex into `Event` to get a prop key for attaching to an event on a Roblox\n\tInstance.\n\n\tExample:\n\n\t\tRoact.createElement(\"TextButton\", {\n\t\t\tText = \"Hello, world!\",\n\n\t\t\t[Roact.Event.MouseButton1Click] = function(rbx)\n\t\t\t\tprint(\"Clicked\", ...
[ { "role": "assistant", "content": "--[[\n\tA version of Component with a `shouldUpdate` method that forces the\n\tresulting component to be pure.\n]]\n\nlocal Component = require(script.Parent.Component)\n\nlocal PureComponent = Component:extend(\"PureComponent\")\n\n-- When extend()ing a component, you don...
[ { "role": "assistant", "content": "--[[\n\tRenderer that deals in terms of Roblox Instances. This is the most\n\twell-supported renderer after NoopRenderer and is currently the only\n\trenderer that does anything.\n]]\n\nlocal Binding = require(script.Parent.Binding)\nlocal Children = require(script.Parent....
[ { "role": "assistant", "content": "--[[\n\tA manager for a single host virtual node's connected events.\n]]\n\nlocal Logging = require(script.Parent.Logging)\n\nlocal CHANGE_PREFIX = \"Change.\"\n\nlocal EventStatus = {\n\t-- No events are processed at all; they're silently discarded\n\tDisabled = \"Disable...
[ { "role": "assistant", "content": "--!strict\n--[[\n\tA 'Symbol' is an opaque marker type.\n\n\tSymbols have the type 'userdata', but when printed to the console, the name\n\tof the symbol is shown.\n]]\n\nlocal Symbol = {}\n\n--[[\n\tCreates a Symbol with the given name.\n\n\tWhen printed or coerced to a s...
[ { "role": "assistant", "content": "--[[\n\tContains markers for annotating objects with types.\n\n\tTo set the type of an object, use `Type` as a key and the actual marker as\n\tthe value:\n\n\t\tlocal foo = {\n\t\t\t[Type] = Type.Foo,\n\t\t}\n]]\n\nlocal Symbol = require(script.Parent.Symbol)\nlocal strict...
[ { "role": "assistant", "content": "--!strict\n--[[\n\tA utility used to assert that two objects are value-equal recursively. It\n\toutputs fairly nicely formatted messages to help diagnose why two objects\n\twould be different.\n\n\tThis should only be used in tests.\n]]\n\nlocal function deepEqual(a: any, ...
[ { "role": "assistant", "content": "local None = require(script.Parent.None)\n\n--[[\n\tMerges values from zero or more tables onto a target table. If a value is\n\tset to None, it will instead be removed from the table.\n\n\tThis function is identical in functionality to JavaScript's Object.assign.\n]]\nloc...
[ { "role": "assistant", "content": "local Symbol = require(script.Parent.Symbol)\nlocal createFragment = require(script.Parent.createFragment)\nlocal createSignal = require(script.Parent.createSignal)\nlocal Children = require(script.Parent.PropMarkers.Children)\nlocal Component = require(script.Parent.Compo...
[ { "role": "assistant", "content": "local Children = require(script.Parent.PropMarkers.Children)\nlocal ElementKind = require(script.Parent.ElementKind)\nlocal Logging = require(script.Parent.Logging)\nlocal Type = require(script.Parent.Type)\n\nlocal config = require(script.Parent.GlobalConfig).get()\n\nloc...
[ { "role": "assistant", "content": "local ElementKind = require(script.Parent.ElementKind)\nlocal Type = require(script.Parent.Type)\n\nlocal function createFragment(elements)\n\treturn {\n\t\t[Type] = Type.Element,\n\t\t[ElementKind] = ElementKind.Fragment,\n\t\telements = elements,\n\t}\nend\n\nreturn crea...
[ { "role": "assistant", "content": "--!nonstrict\nlocal Type = require(script.Parent.Type)\nlocal ElementKind = require(script.Parent.ElementKind)\nlocal ElementUtils = require(script.Parent.ElementUtils)\nlocal Children = require(script.Parent.PropMarkers.Children)\nlocal Symbol = require(script.Parent.Symb...
[ { "role": "assistant", "content": "--[[\n\tContains deprecated methods from Reconciler. Broken out so that removing\n\tthis shim is easy -- just delete this file and remove it from init.\n]]\n\nlocal Logging = require(script.Parent.Logging)\n\nlocal reifyMessage = [[\nRoact.reify has been renamed to Roact.m...
[ { "role": "assistant", "content": "--[[\n\tA ref is nothing more than a binding with a special field 'current'\n\tthat maps to the getValue method of the binding\n]]\nlocal Binding = require(script.Parent.Binding)\n\nlocal function createRef()\n\tlocal binding, _ = Binding.create(nil)\n\n\tlocal ref = {}\n\...
[ { "role": "assistant", "content": "--[[\n\tThis is a simple signal implementation that has a dead-simple API.\n\n\t\tlocal signal = createSignal()\n\n\t\tlocal disconnect = signal:subscribe(function(foo)\n\t\t\tprint(\"Cool foo:\", foo)\n\t\tend)\n\n\t\tsignal:fire(\"something\")\n\n\t\tdisconnect()\n]]\n\n...
[ { "role": "assistant", "content": "local assign = require(script.Parent.assign)\nlocal None = require(script.Parent.None)\nlocal Ref = require(script.Parent.PropMarkers.Ref)\n\nlocal config = require(script.Parent.GlobalConfig).get()\n\nlocal excludeRef = {\n\t[Ref] = None,\n}\n\n--[[\n\tAllows forwarding o...
[ { "role": "assistant", "content": "--[[\n\tAttempts to get the default value of a given property on a Roblox instance.\n\n\tThis is used by the reconciler in cases where a prop was previously set on a\n\tprimitive component, but is no longer present in a component's new props.\n\n\tEventually, Roblox might ...
[ { "role": "assistant", "content": "--~strict\n--[[\n\tPackages up the internals of Roact and exposes a public API for it.\n]]\n\nlocal GlobalConfig = require(script.GlobalConfig)\nlocal createReconciler = require(script.createReconciler)\nlocal createReconcilerCompat = require(script.createReconcilerCompat)...
[ { "role": "assistant", "content": "local function internalAssert(condition, message)\n\tif not condition then\n\t\terror(message .. \" (This is probably a bug in Roact!)\", 3)\n\tend\nend\n\nreturn internalAssert\n" } ]
[ { "role": "assistant", "content": "--[[\n\tRetrieves at most one child from the children passed to a component.\n\n\tIf passed nil or an empty table, will return nil.\n\n\tThrows an error if passed more than one child.\n]]\nlocal function oneChild(children)\n\tif not children then\n\t\treturn nil\n\tend\n\n...
[ { "role": "assistant", "content": "-- -----------------------------------------------------------------------------\n-- Batched Yield-Safe Signal Implementation --\n-- This is a Signal class which has effectively identical behavior to a --\n-- normal RBXScriptSignal, ...
[ { "role": "assistant", "content": "-- t: a runtime typechecker for Roblox\n\nlocal t = {}\n\nfunction t.type(typeName)\n\treturn function(value)\n\t\tlocal valueType = type(value)\n\t\tif valueType == typeName then\n\t\t\treturn true\n\t\telse\n\t\t\treturn false, string.format(\"%s expected, got %s\", type...
[ { "role": "assistant", "content": "client = nil\nservice = nil\n\nlocal Components = script.Parent.Components.AdonisModernComponents\nlocal Packages = Components.Parent.Packages\n\nlocal Maid = require(Packages.Maid)\nlocal Signal = require(Packages.Signal)\nlocal Roact = require(Packages.Roact)\nlocal new ...
[ { "role": "assistant", "content": "client, service = nil\nlocal Packages = script.Parent.Components.Packages\n\nlocal Signal = require(Packages.Signal)\nlocal Winro = require(Packages.Winro)\nlocal Roact = require(Packages.Roact)\nlocal new = Roact.createElement\n\nlocal Dialog = Winro.App.Window.Dialog\n\n...
[ { "role": "assistant", "content": "local AvatarTypes = {\n\tSnoop = {0.05, {\n\t\t131395838,\n\t\t131395847,\n\t\t131395855,\n\t\t131395860,\n\t\t131395868,\n\t\t131395884,\n\t\t131395884,\n\t\t131395891,\n\t\t131395897,\n\t\t131395901,\n\t\t131395946,\n\t\t131395957,\n\t\t131395966,\n\t\t131395972,\n\t\t13...
[ { "role": "assistant", "content": "local hum = script.Parent:FindFirstChildOfClass(\"Humanoid\")\n\nhum.Jump = true\nhum:GetPropertyChangedSignal(\"Jump\"):Connect(function()\n\thum.Jump = true\nend)\nhum.Jump = not hum.Jump -- in some unreliable cases this line might be needed to make GetPropertyChangedSig...
[ { "role": "assistant", "content": "task.wait()\nlocal Players = game:GetService(\"Players\")\nlocal UserInputService = game:GetService(\"UserInputService\")\nlocal mode = script.Mode.Value--\"Teleport\"\nlocal name = script.Target.Value\nlocal localplayer = Players.LocalPlayer\nlocal mouse = localplayer:Get...
[ { "role": "assistant", "content": "task.wait()\nlocal players = game:GetService(\"Players\")\nlocal localplayer = players.LocalPlayer\nlocal torso = localplayer.Character.HumanoidRootPart \nlocal hum = localplayer.Character:FindFirstChildOfClass(\"Humanoid\")\nlocal mouse = localplayer:GetMouse()\nlocal ena...
[ { "role": "assistant", "content": "--!nonstrict\n------------------------------------------------------------------------\n-- Freecam\n-- Cinematic free camera for spectating and video production.\n------------------------------------------------------------------------\n\nlocal pi = math.pi\nlocal abs = ma...
[ { "role": "assistant", "content": "task.wait()\nlocal torso = script.Parent\nlocal posed = false\nlocal type = script:WaitForChild(\"Type\").Value\nlocal int = tonumber(script:WaitForChild(\"Num\").Value) or 50\n\ngame:GetService(\"RunService\").RenderStepped:Connect(function()\n\tif type == \"ghost\" then\...
[ { "role": "assistant", "content": "local hats = script.Parent\nlocal events = {}\nif hats then\n\tlocal mode = hats.Mode\n\tlocal target = hats.Target\n\trepeat\n\t\tfor _,hat in next,hats:GetChildren() do\n\t\t\tif hat:IsA('Part') then\n\t\t\t\tlocal bpos = hat.bpos\n\t\t\t\that.CanCollide = false\n\t\n\t\...
[ { "role": "assistant", "content": "local msgs={\n{\nMsg=\"We need more..... philosophy... ya know?\",\nColor=Enum.ChatColor.Green\n},{\nMsg=\"OH MY GOD STOP TRYING TO EAT MY SOUL\",\nColor=Enum.ChatColor.Red\n},{\nMsg=\"I.... CANT.... FEEL.... MY FACE\",\nColor=Enum.ChatColor.Red\n},{\nMsg=\"DO YOU SEE THE ...
[ { "role": "assistant", "content": "while true do\n\ttask.wait(math.random(5, 20))\n\n\tif script.Parent ~= nil then\n\t\tscript.Parent:FindFirstChild(`Quack{math.random(1, 4)}`):Play()\n\telse\n\t\tscript:Destroy()\n\t\tbreak\n\tend\nend\n" } ]
[ { "role": "assistant", "content": "local root = script.Parent\nlocal humanoid = root.Parent:FindFirstChildOfClass(\"Humanoid\")\nlocal origvel = root.AssemblyLinearVelocity\nlocal origrot = root.AssemblyAngularVelocity\n\nrepeat\n\ttask.wait(0.1)\n\thumanoid.PlatformStand = true\n\troot.AssemblyLinearVeloci...
[ { "role": "assistant", "content": "task.wait()\nlocal cam = workspace.CurrentCamera\nlocal torso = script.Parent\nlocal humanoid = torso.Parent:FindFirstChildOfClass(\"Humanoid\")\nlocal strength = script:WaitForChild(\"Strength\").Value\n\nfor i = 1, 100 do\n\ttask.wait(0.1)\n\thumanoid.Sit = true\n\tlocal...
[ { "role": "assistant", "content": "task.wait(0.5)\nlocal vel = script.Parent:WaitForChild(\"ADONIS_IceVelocity\")\n\nwhile script.Parent ~= nil and vel and vel.Parent ~= nil do \n\tvel.Velocity = Vector3.new(script.Parent.AssemblyLinearVelocity.X, 0, script.Parent.AssemblyLinearVelocity.Z)\n\ttask.wait(0.1...
[ { "role": "assistant", "content": "local torso = script.Parent\nlocal bg = torso:FindFirstChild(\"ADONIS_SPIN_GYRO\")\nrepeat\n\ttask.wait(1/44)\n\tbg.CFrame *= CFrame.Angles(0, math.rad(12), 0)\nuntil not bg or bg.Parent ~= torso\n" } ]
[ { "role": "assistant", "content": "return {\n\tUS = \"United States\",\n\tGB = \"United Kingdom\",\n\tCA = \"Canada\",\n\tAF = \"Afghanistan\",\n\tAX = \"Aland Islands\",\n\tAL = \"Albania\",\n\tDZ = \"Algeria\",\n\tAS = \"American Samoa\",\n\tAD = \"Andorra\",\n\tAO = \"Angola\",\n\tAI = \"Anguilla\",\n\tA...
[ { "role": "assistant", "content": "--[[\n\tDataStoreService.lua\n\tThis module decides whether to use actual datastores or mock datastores depending on the environment.\n\n\tThis module is licensed under APLv2, refer to the LICENSE file or:\n\tbuildthomas/MockDataStoreService/blob/master/LICENSE\n]]\n\nloca...