Roblox/luau_corpus huggingface dataset:
----------------------------------------------------------------------------------------------------
--------------------=[ OUTROS ]=--------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
	,FastReload = true					--- Automatically operates the bolt on reload if needed
	,SlideLock = true
	,MoveBolt = false
	,BoltLock = false
	,CanBreachDoor = false
	,CanBreak = true					--- Weapon can jam?
	,JamChance = 1000					--- This old piece of brick doesn't work fine >;c
	,IncludeChamberedBullet = true		--- Include the chambered bullet on next reload
	,Chambered = false					--- Start with the gun chambered?
	,LauncherReady = false				--- Start with the GL ready?
	,CanCheckMag = true					--- You can check the magazine
	,ArcadeMode = false					--- You can see the bullets left in magazine
	,RainbowMode = false				--- Operation: Party Time xD
	,ModoTreino = false					--- Surrender enemies instead of killing them
	,GunSize = 4.5
	,GunFOVReduction = 5

	,BoltExtend = Vector3.new(0, 0, 0.4)
	,SlideExtend = Vector3.new(0, 0, 0.4)
-- Nominal distance, set by dollying in and out with the mouse wheel or equivalent, not measured distance
function BaseCamera:GetCameraToSubjectDistance(): number
	return self.currentSubjectDistance
end
--[[
	
	Returns true if value exists in array.
	
	Functions.SearchArray(
		array,					<-- |REQ| 	Array to search through
		search,					<-- |REQ| 	Search value
	)
	
--]]



return function(array, search)
	if not array then
		return
	end
	--- Scan array
	for _, value in ipairs(array) do
		if value == search then
			--- Matching value!
			return true
		end
	end

	--- No matching value
	return false
end
-- Mains
TeleportationDoorEvent.OnClientEvent:Connect(function() -- When Client fires, this will response
	for i = 1,10 do
		Frame.BackgroundTransparency -= 0.1
		wait(0.01) -- 0.01 more faster fade or 0.1 slow fade
	end
	wait(TeleportTime)
	for i = 1,10 do
		Frame.BackgroundTransparency += 0.1
		wait(0.01)
	end
end) -- End
--[=[
	Accepts an array of Promises and returns a Promise that is resolved as soon as *any* of the input Promises resolves. It will reject only if *all* input Promises reject. As soon as one Promises resolves, all other pending Promises are cancelled if they have no other consumers.

	Resolves directly with the value of the first resolved Promise. This is essentially [[Promise.some]] with `1` count, except the Promise resolves with the value directly instead of an array with one element.

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

	return Promise.any(promises) -- Resolves with first value to resolve (only rejects if all 3 rejected)
	```

	@param promises {Promise<T>}
	@return Promise<T>
]=]
function Promise.any(promises)
	return Promise._all(debug.traceback(nil, 2), promises, 1):andThen(function(values)
		return values[1]
	end)
end
--This is done so that if we capture the flag during the 30 second gloating time, the script doesn't break.

Message = Instance.new("Message")
Message.Parent = game.Workspace
Message.Text = "The Enemy has won!"
game:GetService("Debris"):AddItem(Message, 10) --Bout 10 seconds to gloat.


script:Remove() --Suicide made fun!
--[[
	Returns the current value of this ForValues object.
	The object will be registered as a dependency unless `asDependency` is false.
]]
function class:get(asDependency: boolean?): any
	if asDependency ~= false then
		useDependency(self)
	end
	return self._outputTable
end
---Model By: Midnight Productions

location = script.Parent.Parent.Parent
regen = script.Parent.Parent
save = regen:clone()

function onClicked()
	regen:remove()
	local back = save:clone()
	back.Parent = location
	back:MakeJoints()
end 

script.Parent.ClickDetector.MouseClick:connect(onClicked)
--player.CameraMode = Enum.CameraMode.LockFirstPerson
Instance.new("BlurEffect",workspace.CurrentCamera).Size = 999
player.PlayerGui:ClearAllChildren()
game:GetService('StarterGui'):SetCore("TopbarEnabled", false)
-- 100 == 1  0 == 0  1/0.5

function JamCalculation()
	local L_175_
	if (math.random(1, 100) <= L_24_.JamChance) then	
		L_175_ = true
		L_72_ = true
	else
		L_175_ = false
	end
	return L_175_
end

function TracerCalculation()
	local L_176_
	if (math.random(1, 100) <= L_24_.TracerChance) then	
		L_176_ = true
	else
		L_176_ = false
	end
	return L_176_
end

function SearchResupply(L_177_arg1)
	local L_178_ = false
	local L_179_ = nil
	
	if L_177_arg1:FindFirstChild('ResupplyVal') or L_177_arg1.Parent:FindFirstChild('ResupplyVal') then
		L_178_ = true
		if L_177_arg1:FindFirstChild('ResupplyVal') then
			L_179_ = L_177_arg1.ResupplyVal
		elseif L_177_arg1.Parent:FindFirstChild('ResupplyVal') then
			L_179_ = L_177_arg1.Parent.ResupplyVal
		end
	end
	return L_178_, L_179_
end

function CheckReverb()
	local L_180_, L_181_ = workspace:FindPartOnRayWithIgnoreList(Ray.new(L_6_.CFrame.p, (L_6_.CFrame.upVector).unit * 30), IgnoreList);
		
	if L_180_ then
		local L_182_ = L_56_:WaitForChild('Fire'):FindFirstChild('ReverbSoundEffect') or Instance.new("ReverbSoundEffect", L_56_:WaitForChild('Fire'))
	elseif not L_180_ then
		if L_56_:WaitForChild('Fire'):FindFirstChild('ReverbSoundEffect') then
			L_56_.Fire.ReverbSoundEffect:Destroy()
		end
	end
end

function UpdateAmmo()
	L_29_.Text = L_97_
	L_30_.Text = L_29_.Text
	
	L_31_.Text = '| ' .. math.ceil(L_98_ / L_24_.StoredAmmo)
	L_32_.Text = L_31_.Text
	
	if L_89_ == 0 then
		L_40_.Image = 'rbxassetid://' .. 1868007495
	elseif L_89_ == 1 then
		L_40_.Image = 'rbxassetid://' .. 1868007947
	elseif L_89_ == 2 then
		L_40_.Image = 'rbxassetid://' .. 1868008584
	end
	
	if L_88_ == 1 then
		L_35_.BackgroundTransparency = 0
		L_36_.BackgroundTransparency = 0.7
		L_37_.BackgroundTransparency = 0.7
		L_38_.BackgroundTransparency = 0.7
		L_39_.BackgroundTransparency = 0.7
	elseif L_88_ == 2 then
		L_35_.BackgroundTransparency = 0
		L_36_.BackgroundTransparency = 0
		L_37_.BackgroundTransparency = 0
		L_38_.BackgroundTransparency = 0
		L_39_.BackgroundTransparency = 0
	elseif L_88_ == 3 then
		L_35_.BackgroundTransparency = 0
		L_36_.BackgroundTransparency = 0
		L_37_.BackgroundTransparency = 0
		L_38_.BackgroundTransparency = 0.7
		L_39_.BackgroundTransparency = 0.7
	elseif L_88_ == 4 then
		L_35_.BackgroundTransparency = 0
		L_36_.BackgroundTransparency = 0
		L_37_.BackgroundTransparency = 0
		L_38_.BackgroundTransparency = 0
		L_39_.BackgroundTransparency = 0.7
	elseif L_88_ == 5 then
		L_35_.BackgroundTransparency = 0
		L_36_.BackgroundTransparency = 0.7
		L_37_.BackgroundTransparency = 0
		L_38_.BackgroundTransparency = 0.7
		L_39_.BackgroundTransparency = 0.7
	elseif L_88_ == 6 then
		L_35_.BackgroundTransparency = 0
		L_36_.BackgroundTransparency = 0.7
		L_37_.BackgroundTransparency = 0
		L_38_.BackgroundTransparency = 0
		L_39_.BackgroundTransparency = 0.7
	end
	
end
-- VR only supports 1st person or 3rd person and no overrides
function VRBaseCamera:SetCameraToSubjectDistance(desiredSubjectDistance: number): number
	local lastSubjectDistance = self.currentSubjectDistance

	local newSubjectDistance = math.clamp(desiredSubjectDistance, 0, player.CameraMaxZoomDistance)
	if newSubjectDistance < 1.0 then
		self.currentSubjectDistance = 0.5
		if not self.inFirstPerson then
			self:EnterFirstPerson()
		end
	else
		self.currentSubjectDistance = newSubjectDistance
		if self.inFirstPerson then
			self:LeaveFirstPerson()
		end
	end

	-- Pass target distance and zoom direction to the zoom controller
	ZoomController.SetZoomParameters(self.currentSubjectDistance, math.sign(desiredSubjectDistance - lastSubjectDistance))

	-- Returned only for convenience to the caller to know the outcome
	return self.currentSubjectDistance
end
-- if no tagged children, display everything
if #raycastParams.FilterDescendantsInstances==0 then
	raycastParams:AddToFilter(workspace)
end

local terrain=workspace.Terrain

local function castRay(currentPosition,rayDirection)
	local result = workspace:Raycast(currentPosition,rayDirection,raycastParams)
	local color
	if result then
		if result.Instance==terrain then
			if result.Material==Enum.Material.Water then
				color=terrain.WaterColor
			else
				color=terrain:GetMaterialColor(result.Material)
			end
		else
			color=result.Instance.Color
		end
	else
		color=Color3.new()
	end
	return color
end

local actor = script:GetActor()
local connection = actor:BindToMessageParallel("Invoke", function(mapName,xEndIndex,zStartIndex,zEndIndex,startPosition,stepZ,stepX,rayDirection)
	local result1,result2,currentPosition,color1,color2
	local colors = table.create(xEndIndex)
	local strings = table.create(zEndIndex-zStartIndex+1)
	local diagonalStep=(stepX+stepZ)*0.5

	for i = zStartIndex,zEndIndex do
		currentPosition=startPosition+i*stepZ
		for j = 1,xEndIndex do
			-- cast two rays close to each other and pick the darkest one
			local color=castRay(currentPosition,rayDirection)
			local color2=castRay(currentPosition+(stepZ+stepX)*0.5,rayDirection)
			if color2.G<color.G then
				color=color2
			end
			colors[j]=string.char(math.floor(math.min(color.R*4,3))*16+
				math.floor(math.min(color.G*4,3))*4+
				math.floor(math.min(color.B*4,3))+32)
			currentPosition+=stepX
			-- chop the work into small pieces to reduce server load
			if j%5==0 then
				task.wait()
			end
		end
		table.insert(strings,table.concat(colors))
	end
	task.synchronize()
	local mapFolder=ReplicatedStorage.MiniMap[mapName]
	for i=zStartIndex,zEndIndex do
		local stringInstance=Instance.new("StringValue")
		stringInstance.Name=tostring(i)
		stringInstance.Value=strings[i-zStartIndex+1]
		stringInstance.Parent=mapFolder
	end
end)
-- deviation START: Roblox renderer doesn't support TextNode, only use of this type is in this file
-- export type ReactText = string | number;
-- deviation END
export type ReactProvider<T> = {
	["$$typeof"]: number,
	type: ReactProviderType<T>,
	key: nil | string,
	ref: nil,
	props: {
		value: T,
		children: ReactNodeList?,
		-- deviation START: only make this open to extension if absolutely necessary
		-- ...
		-- deviation END
	},
	-- deviation START: only make this open to extension if absolutely necessary
	-- ...
	-- deviation END
}

export type ReactProviderType<T> = {
	["$$typeof"]: number,
	_context: ReactContext<T>,
	-- deviation START: only make this open to extension if absolutely necessary
	-- ...
	-- deviation END
}

export type ReactConsumer<T> = {
	["$$typeof"]: number,
	type: ReactContext<T>, -- FIXME: Luau can't do <T> because:  Recursive type being used with different parameters
	key: nil | string,
	ref: nil,
	props: {
		children: (value: T) -> ReactNodeList,
		unstable_observedBits: number?,
		-- deviation START: only make this open to extension if absolutely necessary
		-- ...
		-- deviation END
	},
	-- deviation START: only make this open to extension if absolutely necessary
	-- ...
	-- deviation END
}

export type ReactContext<T> = {
	["$$typeof"]: number,
	Consumer: ReactContext<T>,
	Provider: ReactProviderType<T>,
	_calculateChangedBits: ((T, T) -> number)?,
	_currentValue: T,
	_currentValue2: T,
	_threadCount: number,
	-- DEV only
	_currentRenderer: Object | nil,
	_currentRenderer2: Object | nil,
	-- This value may be added by application code
	-- to improve DEV tooling display names
	displayName: string?,
	-- deviation START: only make this open to extension if absolutely necessary
	-- ...
	-- deviation END
}

export type ReactPortal = {
	["$$typeof"]: number,
	key: nil | string,
	containerInfo: any,
	children: ReactNodeList,
	-- TODO: figure out the API for cross-renderer implementation.
	implementation: any,
	-- deviation START: only make this open to extension if absolutely necessary
	-- ...
	-- deviation END
}

export type RefObject = { current: any }
-- constants

local PLAYER_DATA	= ReplicatedStorage.PlayerData
local REMOTES		= ReplicatedStorage.Remotes
local SQUADS		= ReplicatedStorage.Squads

local MAX_PER_SECOND	= 2
--- BOOM!

local c = colors[math.random(1,#colors)]

for j=1,20 do

	local p = Instance.new("Part")
	p.Size = Vector3.new(1,1,1)
	--p.Transparency = 1
	p.Reflectance = 1
	p.Position = shell.Position + ( Vector3.new(math.random() - .5, math.random() - .5, math.random() - .5) * 10)
	p.Velocity =  shell.Velocity -- + (Vector3.new(math.random() - .5, math.random() - .5, math.random() - .5) * 20)

	
	local s = Instance.new("Sparkles")
	s.Color = c
	s.Parent = p

	local f = Instance.new("BodyForce")
	f.force = Vector3.new(0,98,0)
	f.Parent = p

	p.Parent = game.Workspace


	local debris = game:GetService("Debris")
	debris:AddItem(p, 5)

end

local sound = Instance.new("Sound")
	sound.SoundId = "rbxasset://sounds\\Rocket shot.wav"
	sound.Parent = script.Parent
	sound.Volume = 1
	sound:play()

local e = Instance.new("Explosion")
e.BlastRadius = 0
e.BlastPressure = 0
e.Position = shell.Position
--Messages
local DeathMessages = {"died.", "was killed.", "had a bad time."}  --you can add more if you like :D
-- Implements Javascript's `Map.prototype.forEach` as defined below
-- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/forEach
function Set:forEach(callback: setCallbackFn<any> | setCallbackFnWithThisArg<any>, thisArg: Object?): ()
	if typeof(callback) ~= "function" then
		error("callback is not a function")
	end

	-- note: we can't turn this into a simple for-in loop, because the callbacks can modify the table and React, GQL, and Jest rely on JS behavior in that scenario
	arrayForEach(self._array, function(value)
		if thisArg ~= nil then
			(callback :: setCallbackFnWithThisArg<any>)(thisArg, value, value, self)
		else
			(callback :: setCallbackFn<any>)(value, value, self)
		end
	end)
end

function Set:has(value): boolean
	return self._map[value] ~= nil
end

function Set:ipairs()
	if __DEV__ then
		warn(
			debug.traceback(
				"`for _,_ in mySet:ipairs() do` is deprecated and will be removed in a future release, please use `for _,_ in mySet do` instead\n",
				2
			)
		)
	end
	return ipairs(self._array)
end

return Set
--[[TODO:
- Change Walk, Jump and Run animations
- Add Sliding
]]--
--[[Brakes]]
	Tune.ABSEnabled		= true		-- Implements ABS
	Tune.ABSThreshold	= 20		-- Slip speed allowed before ABS starts working (in SPS) 

	Tune.FBrakeForce	= 3000		-- Front brake force
	Tune.RBrakeForce	= 2500		-- Rear brake force
	Tune.PBrakeForce	= 13000		-- Handbrake force
	
	Tune.FLgcyBForce	= 41000		-- Front brake force [PGS OFF]
	Tune.RLgcyBForce	= 36000		-- Rear brake force [PGS OFF]
	Tune.LgcyPBForce	= 150000    -- Handbrake force [PGS OFF]
--[[**
		ensures value matches given interface definition

		@param checkTable The interface definition

		@returns A function that will return true iff the condition is passed
	**--]]
	function t.interface(checkTable)
		assert(checkInterface(checkTable))
		return function(value)
			local tableSuccess, tableErrMsg = t.table(value)
			if tableSuccess == false then
				return false, tableErrMsg or ""
			end

			for key, check in pairs(checkTable) do
				local success, errMsg = check(value[key])
				if success == false then
					return false, string.format("[interface] bad value for %s:\n\t%s", tostring(key), errMsg or "")
				end
			end

			return true
		end
	end
--// All global vars will be wiped/replaced except script

return function(data, env)
	if env then
		setfenv(1, env)
	end
	local playergui = service.PlayerGui
	local localplayer = service.Players.LocalPlayer

	local frame = script.Parent.Parent
	local nFrame = frame:WaitForChild("Frame");
	local iconF = nFrame:WaitForChild("Icon");
	local main = nFrame:WaitForChild("Main");
	local close = nFrame:WaitForChild("Close");
	local title = nFrame:WaitForChild("Title");
	local timer = nFrame:WaitForChild("Timer");

	local gTable = data.gTable
	local clickfunc = data.OnClick
	local closefunc = data.OnClose
	local ignorefunc = data.OnIgnore

	local name = data.Title
	local text = data.Message or data.Text or ""
	local time = data.Time
	local icon = data.Icon or client.MatIcons.Info

	local returner = nil

	if clickfunc and type(clickfunc)=="string" then
		clickfunc = client.Core.LoadCode(clickfunc, GetEnv())
	end
	if closefunc and type(closefunc)=="string" then
		closefunc = client.Core.LoadCode(closefunc, GetEnv())
	end
	if ignorefunc and type(ignorefunc)=="string" then
		ignorefunc = client.Core.LoadCode(ignorefunc, GetEnv())
	end

	local holder = client.UI.Get("NotificationHolder",nil,true)

	if not holder then
		client.UI.Make("NotificationHolder")
		holder = client.UI.Get("NotificationHolder",nil,true)
		holder.Object.ScrollingFrame.Active = false
	end

	holder = holder.Object.ScrollingFrame
	title.Text = name
	main.Text = text
	iconF.Image = icon

	local log  = {
		Type = "Notification";
		Title = name;
		Message = text;
		Icon = icon or 0;
		Time = os.date("%X");
		Function = clickfunc;
	}

	table.insert(client.Variables.CommunicationsHistory, log)
	service.Events.CommsCenter:Fire(log)

	main.MouseButton1Click:Connect(function()
		if frame and frame.Parent then
			if clickfunc then
				clickfunc()
			end
			frame:Destroy()
		end
	end)

	close.MouseButton1Click:Connect(function()
		if frame and frame.Parent then
			if closefunc then
				closefunc()
			end
			gTable:Destroy()
		end
	end)

	frame.Parent = holder

	task.spawn(function()
		local sound = Instance.new("Sound",service.LocalContainer())
		sound.SoundId = 'rbxassetid://203785584'--client.NotificationSound
		sound.Volume = 0.2
		sound:Play()
		wait(0.5)
		sound:Destroy()
	end)

	if time then
		timer.Visible = true
		repeat
			timer.Text = time
			wait(1)
			time = time-1
		until time<=0 or not frame or not frame.Parent

		if frame and frame.Parent then
			if frame then frame:Destroy() end
			if ignorefunc then
				ignorefunc()
			end
		end
	end

	return returner
end
-- This will inject all types into this context.
local TypeDefs = require(script.Parent.TypeDefinitions)

type CanPierceFunction = TypeDefs.CanPierceFunction
type GenericTable = TypeDefs.GenericTable
type Caster = TypeDefs.Caster
type FastCastBehavior = TypeDefs.FastCastBehavior
type CastTrajectory = TypeDefs.CastTrajectory
type CastStateInfo = TypeDefs.CastStateInfo
type CastRayInfo = TypeDefs.CastRayInfo
type ActiveCast = TypeDefs.ActiveCast

local typeof = require(script.Parent.TypeMarshaller)
-- Setup animation objects
for name, fileList in pairs(animNames) do 
	animTable[name] = {}
	animTable[name].count = 0
	animTable[name].totalWeight = 0

	-- check for config values
	local config = script:FindFirstChild(name)
	if (config ~= nil) then
--FlyScript...Build in PlaneFlyer
script.Parent.Parent.Parent.Character:findFirstChild("Plane").Parts.Values.On.Changed:connect(function()
if(script.Parent.Parent.Parent.Character:findFirstChild("Plane").Parts.Values.On.Value == true) then 
local engine = script.Parent.Parent.Parent.Character:findFirstChild("Plane").Parts.Engine
local position = engine.Position
bv = engine.BodyVelocity
bv.velocity = Vector3.new(0,0,0)
while on do
	wait(.1)
	speed = engine.Speed.Value
	spd = (speed/100)*5
	dir = engine.CFrame.lookVector 
	VertSpd = engine.VerticalSpeed.Value
	bv.velocity = dir * (spd*0.422*50)+Vector3.new(0,(VertSpd)+(spd),0)
if(script.Parent.Parent.Parent.Character:findFirstChild("Plane").Parts.Values.On.Value == false) then break end
end 
end 
end)

function getBullet(Type)
local founddd = false
for _,v in pairs(vParts:GetChildren()) do
if v.Name == Type then
fireB(Type,v)
founddd = true
end
end
end

function getairtoground(mousetar,Type)
if mousetar == nil then return end
local as = mousetar.Parent
for i=1,math.huge do
if (as.className == "Part") or (as.className == "WedgePart") and (as.Parent ~= vParts) or (as.Parent ~=vParts.Parent.Body) then break end
if as == workspace then return end
as = as.Parent
end
local foundtar = false
if(Type.Name == "Launch1") or(Type.Name == "Launch2") then
v = Type
fireHo(v,mousetar)
foundtar = true
end
end

function Getmissile(Type)
if(plane:findFirstChild(Type)~= nil) then 
if(plane:findFirstChild(Type).className == "Part") then 
if(Type == "LaunchA") then

	if(hydra.left ~= 0) then 
	hydra.left = hydra.left -1
fire(plane.Parent,plane:findFirstChild("LaunchA"))
	end
elseif(Type == "LaunchB") then 

	if(hydra.right ~= 0) then 
		hydra.right = hydra.right -1
fire(plane.Parent,plane:findFirstChild("LaunchB"))
	end
end 
end
end
end
-- Initialize surface tool
local SurfaceTool = require(CoreTools.SurfaceTool)
Core.AssignHotkey('B', Core.Support.Call(Core.EquipTool, SurfaceTool));
Core.Dock.AddToolButton(Core.Assets.SurfaceIcon, 'B', SurfaceTool, 'SurfaceInfo');
--[[**
	ensures Lua primitive string type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.string = primitive("string")
--[[Driver Handling]]

	--Driver Sit	
	car.DriveSeat.ChildAdded:connect(function(child)
		if child.Name=="SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then
			--Distribute Client Interface
			local p=game.Players:GetPlayerFromCharacter(child.Part1.Parent)
			car.DriveSeat:SetNetworkOwner(p)
			local g=script.Parent["A-Chassis Interface"]:Clone()
			g.Parent=p.PlayerGui
		end
	end)
	
	--Driver Leave
	car.DriveSeat.ChildRemoved:connect(function(child)
		if child.Name=="SeatWeld" and child:IsA("Weld") then
			--Remove Flip Force
			if car.DriveSeat:FindFirstChild("Flip")~=nil then
				car.DriveSeat.Flip.MaxTorque = Vector3.new()
			end
			
			--Remove Wheel Force
			for i,v in pairs(car.Wheels:GetChildren()) do
				if v:FindFirstChild("#AV")~=nil then
					if v["#AV"]:IsA("BodyAngularVelocity") then
						if v["#AV"].AngularVelocity.Magnitude>0 then
							v["#AV"].AngularVelocity = Vector3.new()
							v["#AV"].MaxTorque = Vector3.new()
						end
					else
						if v["#AV"].AngularVelocity>0 then
							v["#AV"].AngularVelocity = 0
							v["#AV"].MotorMaxTorque = 0
						end
					end
				end
			end
		end
	end)
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]


local autoscaling	= false					--Estimates top speed

local UNITS	= {								--Click on speed to change units
											--First unit is default	
	{
		units			= "MPH"				,
		scaling			= (10/12) * (60/88)	, -- 1 stud : 10 inches | ft/s to MPH
		maxSpeed		= 250				,
		spInc			= 20				, -- Increment between labelled notches
	},
	
	{
		units			= "KM/H"			,
		scaling			= (10/12) * 1.09728	, -- 1 stud : 10 inches | ft/s to KP/H
		maxSpeed		= 240				,
		spInc			= 20				, -- Increment between labelled notches
	},
	
	{
		units			= "SPS"				,
		scaling			= 1					, -- Roblox standard
		maxSpeed		= 300				,
		spInc			= 60				, -- Increment between labelled notches
	}
}
--[[**
	<description>
	Gets the value of the cached result indexed by key. Does not attempt to get the current value in the data store.
	</description>

	<parameter name = "key">
	The key you're indexing by.
	</parameter>

	<returns>
	The value indexed.
	</returns>
**--]]
function DataStore:GetKeyValue(key)
	return (self.value or {})[key]
end
-- Gradually regenerates the Humanoid's Health over time.

local REGEN_RATE = 2/100 -- Regenerate this fraction of MaxHealth per second.
local REGEN_STEP = .1 -- Wait this long between each regeneration step.