Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[=[
	Folds an array of values or promises into a single value. The array is traversed sequentially.

	The reducer function can return a promise or value directly. Each iteration receives the resolved value from the previous, and the first receives your defined initial value.

	The folding will stop at the first rejection encountered.
	```lua
	local basket = {"blueberry", "melon", "pear", "melon"}
	Promise.fold(basket, function(cost, fruit)
		if fruit == "blueberry" then
			return cost -- blueberries are free!
		else
			-- call a function that returns a promise with the fruit price
			return fetchPrice(fruit):andThen(function(fruitCost)
				return cost + fruitCost
			end)
		end
	end, 0)
	```

	@since v3.1.0
	@param list {T | Promise<T>}
	@param reducer (accumulator: U, value: T, index: number) -> U | Promise<U>
	@param initialValue U
]=]


function Promise.fold(list, callback, initialValue)
	assert(type(list) == "table", "Bad argument #1 to Promise.fold: must be a table")
	assert(type(callback) == "function", "Bad argument #2 to Promise.fold: must be a function")

	local accumulator = Promise.resolve(initialValue)
	return Promise.each(list, function(resolvedElement, i)
		accumulator = accumulator:andThen(function(previousValueResolved)
			return callback(previousValueResolved, resolvedElement, i)
		end)
	end):andThenReturn(accumulator)
end
--[=[
	Accepts an array of Promises and returns a new promise that is resolved or rejected as soon as any Promise in the array resolves or rejects.

	:::warning
	If the first Promise to settle from the array settles with a rejection, the resulting Promise from `race` will reject.

	If you instead want to tolerate rejections, and only care about at least one Promise resolving, you should use [Promise.any](#any) or [Promise.some](#some) instead.
	:::

	All other Promises that don't win the race will be cancelled if they have no other consumers.

	```lua
	local promises = {
		returnsAPromise("example 1"),
		returnsAPromise("example 2"),
		returnsAPromise("example 3"),
	}

	return Promise.race(promises) -- Only returns 1st value to resolve or reject
	```

	@param promises {Promise<T>}
	@return Promise<T>
]=]


function Promise.race(promises)
	assert(type(promises) == "table", string.format(ERROR_NON_LIST, "Promise.race"))

	for i, promise in pairs(promises) do
		assert(Promise.is(promise), string.format(ERROR_NON_PROMISE_IN_LIST, "Promise.race", tostring(i)))
	end

	return Promise._new(debug.traceback(nil, 2), function(resolve, reject, onCancel)
		local newPromises = {}
		local finished = false

		local function cancel()
			for _, promise in ipairs(newPromises) do
				promise:cancel()
			end
		end

		local function finalize(callback)
			return function(...)
				cancel()
				finished = true
				return callback(...)
			end
		end

		if onCancel(finalize(reject)) then
			return
		end

		for i, promise in ipairs(promises) do
			newPromises[i] = promise:andThen(finalize(resolve), finalize(reject))
		end

		if finished then
			cancel()
		end
	end)
end
-- TODO: Include and support inverted walls


local function createObjectTypesFromAsset(asset)
	if asset then
		local newObjectTypes = {}
		for rotation = 0, 270, 90 do
			table.insert(newObjectTypes, ObjectType.new(asset, rotation, 0))
			if asset then
				local typeConfig = asset:WaitForChild("ObjectType")
				if typeConfig and typeConfig:IsA("StringValue") then
					local type = typeConfig.Value
					if BitOps.getVerticalFaceFromOccupancy(ObjectTypeConfigurations[type].OCCUPANCY) then
						table.insert(newObjectTypes, ObjectType.new(asset, rotation, 180))
					end
				end
			end
		end

		return newObjectTypes
	else
		error("Cannot create a grid object from nil instance")
	end
end

return createObjectTypesFromAsset
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------



Collapse.OnServerEvent:Connect(function(player)
	

	local Human = player.Character.Humanoid
	local Dor = Human.Parent.Saude.Variaveis.Dor
	local Sangue = Human.Parent.Saude.Variaveis.Sangue
	local IsWounded = Human.Parent.Saude.Stances.Caido
	local IsDead = Human.Parent.Saude.Stances.rodeath


	if Sangue.Value <= 1250 or Dor.Value >= 600 or IsWounded.Value == true or IsDead.Value == true then -- Man this Guy's Really wounded,
		IsWounded.Value = true
		Human.PlatformStand = true
		Human.AutoRotate = false		
	elseif IsWounded.Value == false then -- YAY A MEDIC ARRIVED! =D
		Human.PlatformStand = false
		Human.AutoRotate = true
		
	end
end)




rodeath.OnServerEvent:Connect(function(player)

	local Human = player.Character.Humanoid
	local Dor = Human.Parent.Saude.Variaveis.Dor
	local Sangue = Human.Parent.Saude.Variaveis.Sangue
	
	local IsWounded = Human.Parent.Saude.Stances.Caido
	local IsDead = Human.Parent.Saude.Stances.rodeath
	local bleeding = Human.Parent.Saude.Stances.Sangrando
	local bbleeding = Human.Parent.Saude.Stances.bbleeding
	local cpr = Human.Parent.Saude.Stances.cpr
	local dead = Human.Parent.Saude.Stances.dead
	local life = Human.Parent.Saude.Stances.life
	local Sangrando = Human.Parent.Saude.Stances.Sangrando
	--local Teams = game:GetService("Teams")
	--local civilian = Teams.Civilian
	
	if IsDead.Value == true then
		life.Value = false
		IsWounded.Value = true
		--Sangrando.Value = true
		if Sangue.Value <= 0 then
			dead.Value = true	
			wait(1)
			Human.PlatformStand = false
			Human.AutoRotate = true	
			
			--player.Team = civilian
			Human.Health = 0
		else

		wait(90)
		
		
	
		if Human.Health <= 1 then
				
			
			dead.Value = true
			Sangue.Value = 0	
				
			wait(1)
			Human.PlatformStand = false
			Human.AutoRotate = true	
			
			--player.Team = civilian
			Human.Health = 0
		
	
		end
		end
		end

end)


Reset.OnServerEvent:Connect(function(player)

local Human = player.Character.Humanoid
local target = Human.Parent.Saude.Variaveis.PlayerSelecionado

target.Value = "N/A"
end)
-- Module functions:


function RateLimiter.NewRateLimiter(rate) --> [RateLimiter]
	if rate <= 0 then
		error("[RateLimiter]: Invalid rate")
	end
	
	local rate_limiter = {
		_sources = {},
		_rate_period = 1 / rate,
	}
	setmetatable(rate_limiter, RateLimiterObject)
	
	RateLimiters[rate_limiter] = true
	
	return rate_limiter
end
--				-1 = Closed
--				0 = Active
--				1 = Open



function getItems() 
	for _,v in pairs(script.Parent:GetChildren()) do 
		if ((v:IsA("BasePart")) and (v.Name == "Bar")) then 
			table.insert(_items,v) 
		end 
	end 
end 

function main() 
	local d = door 
	door = 0 
	script.Parent.Button.BrickColor = BrickColor.new("New Yeller") 
	for i = 0,5,0.05 do 
		for _,v in pairs(_items) do 
			v.CFrame = v.CFrame * CFrame.new((-0.20*(-d)),0,0) 
		end 
		wait() 
	end 
	if (d == (-1)) then 
		script.Parent.Button.BrickColor = BrickColor.new("Really red") 
	elseif (d == 1) then 
		script.Parent.Button.BrickColor = BrickColor.new("Bright green") 
	end 
	door = d 
end 

script.Parent.Button.Click.MouseClick:connect(function() 
	if (door == 0) then return end 
	door = (door*(-1)) 
	main() 
end) 

getItems()
--Differential Settings	


Tune.FDiffSlipThres	= 50		-- 1 - 100%				(Max threshold of applying full lock determined by deviation from avg speed)
Tune.FDiffLockThres	= 0			-- 0 - 100%				(0 - Bias toward slower wheel, 100 - Bias toward faster wheel)
Tune.RDiffSlipThres	= 100		-- 1 - 100%
Tune.RDiffLockThres	= 0			-- 0 - 100%
Tune.CDiffSlipThres	= 1			-- 1 - 100%				[AWD Only]
Tune.CDiffLockThres	= 0			-- 0 - 100%				[AWD Only]
--


local cl_api = script.Parent.Close
local op_api = script.Parent.Open

local tweeninfo = TweenInfo.new(
	script.Parent.Parent.Settings.DoorMoveTime.Value,
	Enum.EasingStyle.Sine,
	Enum.EasingDirection.InOut,
	0,
	false,
	0
)


local d1close = tweenservice:Create(door1, tweeninfo, {Position = script.Parent.Door1ClosePos.Position})
local d1open = tweenservice:Create(door1, tweeninfo, {Position = script.Parent.Door1OpenPos.Position})
-----------------------------------------------------------------------------------------------



script.Parent:WaitForChild("Speedo")
script.Parent:WaitForChild("ln")
script.Parent:WaitForChild("Gear")
script.Parent:WaitForChild("Speed")

local player=game.Players.LocalPlayer
local mouse=player:GetMouse()

local car = script.Parent.Parent.Car.Value
car.DriveSeat.HeadsUpDisplay = false

local _Tune = require(car["A-Chassis Tune"])

local _pRPM = _Tune.PeakRPM
local _lRPM = _Tune.Redline

local currentUnits = 1
local revEnd = math.ceil(_lRPM/1000)
-- [ SETTINGS ] --



local statsName = "Fails" -- Your stats name
local maxItems = 20 -- Max number of items to be displayed on the leaderboard
local minValueDisplay = 1 -- Any numbers lower than this will be excluded
local maxValueDisplay = 10e15 -- (10 ^ 15) Any numbers higher than this will be excluded
local abbreviateValue = true -- The displayed number gets abbreviated to make it "human readable"
local updateEvery = 20 -- (in seconds) How often the leaderboard has to update
local headingColor = Color3.fromRGB(25, 181, 254) -- The background color of the heading
--[[
	Returns a version of the given method that can be called with either . or :
]]


local function bindSelf(self, method)
	return function(firstArg, ...)
		if firstArg == self then
			return method(self, ...)
		else
			return method(self, firstArg, ...)
		end
	end
end

local function formatMessage(result, trueMessage, falseMessage)
	if result then
		return trueMessage
	else
		return falseMessage
	end
end
-- Ensures that all scripts included with a DevModule are marked as Disabled.
-- This makes sure there are no race conditions resulting in the Install script
-- running after the scripts included with the module.


local function assertScriptsAreDisabled(devModuleScripts: {Script|LocalScript})
    local enabledScripts = {}

    for _, devModuleScript in ipairs(devModuleScripts) do
        if not devModuleScript.Disabled then
            table.insert(enabledScripts, devModuleScript.Name)
        end
    end

    if #enabledScripts > 0 then
        error(ENABLED_SCRIPTS_ERROR:format(table.concat(enabledScripts, ", ")))
    end
end

function DevModuleInstaller:Install(devModule: Instance)
    local devModuleType = typeof(devModule)
    assert(devModuleType == "Instance", ("expected a DevModule to install, got %s"):format(devModuleType))

    script.InstallStarted:Fire()

    log("info", ("Installing %s from %s..."):format(devModule.Name, devModule.Parent.Name))

    local devModuleScripts = getDevModuleScripts(devModule)
    assertScriptsAreDisabled(devModuleScripts)

    if DEV_MODULE_STORAGE:FindFirstChild(devModule.Name) then
        log("info", "A version of this DevModule already exists. Skipping...")
        devModule:Destroy()
        return
    end

    if DevModuleInstaller.PruneDevelopmentFiles then
        log("info", "Pruning development files...")
        prune(devModule)
    end

    -- The `true` flag searches all descendants of an instance, which is needed
    -- here since the Packages folder is nested.
    local packages = devModule:FindFirstChild(PACKAGE_NAME, true)
    if packages then
        log("info", "Linking packages...")
        dedupePackages(packages)
    end

    log("info", "Overlaying services...")
    for _, child in ipairs(devModule:GetChildren()) do
        -- GetService errors if the given name is not a service so we wrap it in
        -- a pcall to use the result in a conditional.
        local success, service = pcall(function()
            return game:GetService(child.Name)
        end)

        if success then
            overlay(child, service)
        end
    end

    log("info", "Enabling scripts...")
    for _, devModuleScript in ipairs(devModuleScripts) do
        devModuleScript.Disabled = false
        log("info", ("Enabled %s"):format(devModuleScript.Name))
    end

    script.InstallFinished:Fire()

    log("info", ("Safe to remove %s"):format(devModule:GetFullName()))
    log("info", ("Removing %s..."):format(devModule:GetFullName()))
    devModule:Destroy()

    log("info", ("Successfully installed %s!"):format(devModule.Name))
end

return DevModuleInstaller
--Setup static variables


local v3,cf		= Vector3.new,CFrame.new
local match,max	= string.match,math.max
local clipperSize, clipperCF = v3(1,0.1,1), cf(0,-0.1,0)


local module = {}

function module.new(ID, Type)
	
	--Sanity checks
	assert(ID and type(ID) == "string" and match(ID,"%d+"), "Invalid Image ID: "..ID)
	assert(Type and type(Type) == "string" and script:FindFirstChild(Type), "Invalid Clipper Type: "..Type)
	
	--Clipper mesh
	local Clipper	= script:FindFirstChild(Type):Clone()
		Clipper.Size			= clipperSize
		Clipper.CFrame			= clipperCF
		Clipper.Transparency	= 1
		
	--Decal Image
	local Image		= Decal:Clone()
		Image.Texture			= ID
		
	--Camera renderpoint
	local Cam		= Camera:Clone()
		Cam.CFrame				= CFrame.new(Vector3.new(0,(max(Clipper.Size.X,Clipper.Size.Z)/2)/0.17,0),Vector3.new())*CFrame.Angles(0,0,-1.5707963267949)
		
	--ViewportFrame
	local Frame		= ViewportFrame:Clone()
		Frame.CurrentCamera		= Cam

	--Finalize setup
	Image.Parent	= Clipper
	Clipper.Parent	= Frame
	Cam.Parent		= Frame	--If Frame is deleted, so is Cam (avoiding mem leaks)
	
	return Frame, Clipper
	
end

return module
--nohax--


local raycastParams = RaycastParams.new();
raycastParams.FilterType = Enum.RaycastFilterType.Blacklist;

local lastValidCF = hrp.CFrame;
local velocityModifiers : {BodyVelocity} = {};

local lastValidGroundCF = hrp.CFrame;
local flyStartVelocity = Vector3.new();

local flightTime = 0;
local FLIGHT_TIME_THRESHOLD = 0.5;
--Weld Body


wait()
ModelWeld(bike.Body,bike.DriveSeat)

ModelWeld(bike.FrontSection.Wheel.Parts,bike.FrontSection.Wheel)
ModelWeld(bike.FrontSection.Wheel.WheelFixed,bike.FrontSection.Axle)
ModelWeld(bike.FrontSection.Wheel.SuspensionFixed,bike.FrontSection.FrontSuspensionBase)

MakeWeld(bike.FrontSection.FrontSuspensionAxle,bike.FrontSection.Axle)
MakeWeld(bike.FrontSection.TripleTreeHinge,bike.FrontSection.FrontSuspensionBase)

MakeWeld(bike.RearSection.Axle,bike.RearSection.RearSwingArmHinge)
ModelWeld(bike.RearSection.Wheel.Parts,bike.RearSection.Wheel)
ModelWeld(bike.RearSection.Wheel.WheelFixed,bike.RearSection.Axle)
--!strict


local LuauPolyfill = script.Parent.Parent
local types = require(LuauPolyfill.types)
type Array<T> = types.Array<T>
type PredicateFunction<T> = (T, number, Array<T>) -> boolean

return function<T>(array: Array<T>, predicate: PredicateFunction<T>): number
	for i = 1, #array do
		local element = array[i]
		if predicate(element, i, array) then
			return i
		end
	end
	return -1
end
-- Set up the click event handlers for each button


for _, button in ipairs(dock:GetChildren()) do
	if button:IsA("ImageButton") then
		local appName = button.AppName
		appName.Visible = false

		button.MouseEnter:Connect(function()
			-- Show the AppName frame
			appName.Visible = true
		end)

		button.MouseLeave:Connect(function()
			-- Hide the AppName frame
			appName.Visible = false
		end)
	end
end
--[[Weight and CG]]


	Tune.Weight			= 700		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		4	,
	 --[[Length]]		14		}
	Tune.WeightDist		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .0		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible
	
	--Unsprung Weight
	Tune.FWheelDensity	= .1		-- Front Wheel Density
	Tune.RWheelDensity	= .1		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1			-- Rear Wheel Density [PGS OFF]
	
	Tune.AxleSize		= 2			-- Size of structural members (larger = more stable/carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members
-------AGAIN



game.Workspace.doorleft.l11.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l12.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l13.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l41.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l42.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l43.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l71.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l72.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l73.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l11.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l12.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l13.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l41.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l42.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l43.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l71.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l72.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l73.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l21.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l22.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l23.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l51.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l52.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l53.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l21.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l22.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l23.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l51.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l52.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l53.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l31.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l32.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l33.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l61.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l62.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l63.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l31.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l32.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l33.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l61.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l62.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l63.BrickColor = BrickColor.new(21)

end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
-- << BANLAND >>


local banlandDe = true
function module:CreateBanland()
	coroutine.wrap(function()
	
		if not banlandDe then
			return
		else
			banlandDe = false
		end
		local totalY = 0
		if main.pdata.Rank < main.settings.ViewBanland then
			main:GetModule("cf"):ClearPage(pages.banland)
			local label = templates.banTitle:Clone()
			label.BackgroundColor3 = Color3.fromRGB(95, 95, 95)
			label.TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
			label.TextLabel.Text = "Must be rank '".. main:GetModule("cf"):GetRankName(main.settings.ViewBanland).."' or higher to view the Banland"
			label.Name = "TitleLabel"
			label.Visible = true
			label.Parent = pages.banland
		else
			
			--Retrieve Info
			local banlandInfo = main.signals.RetrieveBanland:InvokeServer()
			local canModifyBans = false
			if main.pdata.Rank >= (main.commandRanks.directban or 4) then
				canModifyBans = true
			end		
			
			--Clear labels
			main:GetModule("cf"):ClearPage(pages.banland)
			
			--Setup Labels
			local sectionNames = {"Current Server", "All Servers"}
			for section, records in pairs(banlandInfo) do
				--
				if #records > 0 then
					local label = templates.banTitle:Clone()
					label.BackgroundColor3 = Color3.fromRGB(95, 95, 95)
					label.TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
					label.TextLabel.Text = sectionNames[section]
					label.Name = "TitleLabel"
					totalY = totalY + templates.banTitle.AbsoluteSize.Y
					label.Visible = true
					label.Parent = pages.banland
				end
				--
				for i, record in pairs(records) do
					local userId = record.UserId
					if userId > 0 then
						totalY = totalY + templates.ban.AbsoluteSize.Y
						local settingsBan = record.SettingsBan
						local label = templates.ban:Clone()
						label.Name = "BanLabel"
						label.PlrName.Text = main:GetModule("cf"):GetName(userId)
						local banDateString
						local banTime = record.BanTime
						if tonumber(banTime) then
							banDateString = main:GetModule("cf"):GetBanDateString(os.date("*t", banTime))
						elseif settingsBan then
							banDateString = "Auto Settings Ban"
						else
							banDateString = "Infinite"
						end
						label.BanLength.Text = banDateString
						label.PlayerImage.Image = main:GetModule("cf"):GetUserImage(userId)
						label.BackgroundColor3 = main:GetModule("cf"):GetLabelBackgroundColor(i)
						local viewMore = label.ViewMore
						if canModifyBans and not settingsBan then
							viewMore.Visible = true
							viewMore.MouseButton1Down:Connect(function()
								main:GetModule("cf"):ShowBannedUser{label.PlrName.Text, userId, record.Reason, record.BannedBy}
							end)
						else
							viewMore.Visible = false
						end
						label.Visible = true
						label.Parent = pages.banland
					end
				end
			end
		
		
		end
		
		--Canvas Size
		pages.banland.CanvasSize = UDim2.new(0, 0, 0, totalY)
		
		banlandDe = true
	
	end)()
end

function module:UpdatePages()
	module:CreateServerRanks()
	module:CreateBanland()
	module:CreateRanks()
end
---------------
-- Variables --
---------------



local RunService = game:GetService('RunService')
local PlayersService = game:GetService('Players')
local Player = PlayersService.LocalPlayer

local Camera = nil
local Character = nil
local Torso = nil

local Mode = nil
local BehaviorFunction = nil

local childAddedConn = nil
local childRemovedConn = nil

local Behaviors = {} -- Map of modes to behavior fns
local SavedHits = {} -- Objects currently being faded in/out
local TrackedLimbs = {} -- Used in limb-tracking casting modes
--Internal functions


function DataStore:Debug(...)
	if self.debug then
		--print("[DataStore2.Debug]", ...)
	end
end

function DataStore:_GetRaw()
	if self.getRawPromise then
		return self.getRawPromise
	end

	self.getRawPromise = self.savingMethod:Get():andThen(function(value)
		self.value = value
		self:Debug("value received")
		self.haveValue = true
		self.getting = false
	end):catch(function(reason)
		self.getting = false
		self.getRawPromise = nil
		return Promise.reject(reason)
	end)

	return self.getRawPromise
end

function DataStore:_Update(dontCallOnUpdate)
	if not dontCallOnUpdate then
		for _, callback in ipairs(self.callbacks) do
			callback(self.value, self)
		end
	end

	self.haveValue = true
	self.valueUpdated = true
end