Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[=[
	@class LocalizationServiceUtils
]=]



local require = require(script.Parent.loader).load(script)

local LocalizationService = game:GetService("LocalizationService")
local RunService = game:GetService("RunService")

local Promise = require("Promise")
local ERROR_PUBLISH_REQUIRED = "Publishing the game is required to use GetTranslatorForPlayerAsync API."

local LocalizationServiceUtils = {}

function LocalizationServiceUtils.promiseTranslator(player)
	local asyncTranslatorPromise = Promise.spawn(function(resolve, reject)
		local translator = nil
		local ok, err = pcall(function()
			translator = LocalizationService:GetTranslatorForPlayerAsync(player)
		end)

		if not ok then
			reject(err or "Failed to GetTranslatorForPlayerAsync")
			return
		end

		if translator then
			assert(typeof(translator) == "Instance", "Bad translator")
			resolve(translator)
			return
		end

		reject("Translator was not returned")
		return
	end)

	-- Give longer in non-studio mode
	local timeout = 20
	if RunService:IsStudio() then
		timeout = 0.5
	end

	task.delay(timeout, function()
		if not asyncTranslatorPromise:IsPending() then
			return
		end
		asyncTranslatorPromise:Reject(
			("GetTranslatorForPlayerAsync is still pending after %f, using local table")
			:format(timeout))
	end)

	return asyncTranslatorPromise:Catch(function(err)
		if err ~= ERROR_PUBLISH_REQUIRED then
			warn(("[LocalizationServiceUtils.promiseTranslator] - %s"):format(tostring(err)))
		end

		-- Fallback to just local stuff
		local translator = LocalizationService:GetTranslatorForPlayer(player)
		return translator
	end)
end


return LocalizationServiceUtils
-- the following data is to update the ObjectTable


local ValidClassNames = {"Part","WedgePart","TrussPart","Model","Seat","VehicleSeat"}
function isValidClass(part)
	local CN = part.className 
	for i=1,#ValidClassNames do
		if(CN == ValidClassNames[i]) then
			return true
		end
	end
	return false
end
function isValidPart(part)	-- returns className if its a part or model otherwise returns nil
	if isValidClass(part) == true then
		return part
	end
   return nil -- not a part or an model
end

function retriveParts(model) -- main function for retriving all the parts of a model and loading them into a table
	if(isValidPart(model) and model.className ~= "Model") then
			WorkSpaceObjects[WSONum] = model;
			WSONum = WSONum + 1;
	else
		local raw_model = model:GetChildren()
		for i=1,#raw_model do
			local part = isValidPart(raw_model[i])
			if(part ~= nil) then
				if(part.className == "Model") then
					retriveParts(part);
				else
					if(part.Anchored == false) then
						--if(part:findFirstChild("TAG") == nil) then
						--	Tag = Instance.new("ObjectValue")
						--	Tag.Parent = part
						--	Tag.Name = "TAG"
							WorkSpaceObjects[WSONum] = part;
							WSONum = WSONum + 1;
						--end
					end
				end
			end
		end
	end
end
function RemoveBits(model) -- Function for removing bits from our global table as they dont exist in the workspace anymore
	if(isValidPart(model) and model.className ~= "Model") then
		for i=1,#WorkSpaceObjects	do
			if(model == WorkSpaceObjects[i]) then
				table.remove(WorkSpaceObjects,i)
				WSONum = WSONum -1
			end
		end
	else
		local raw_model = model:GetChildren()
		for i=1,#raw_model do
			local part = raw_model[i]
			if(part.className == "Model") then
				RemoveBits(part);
			else
				for i=1,#WorkSpaceObjects	do
					if(part == WorkSpaceObjects[i]) then
						table.remove(WorkSpaceObjects,i)
						WSONum = WSONum -1
					end
				end
			end
		end
	end
end

retriveParts(game.Workspace); -- call our retreiver
game.Workspace.ChildAdded:connect(retriveParts)-- just encase any new objects get added to the game
game.Workspace.ChildRemoved:connect(RemoveBits)
-- // Equips & Unequip


Remotes.Main1.OnServerEvent:Connect(function(plr,firingtype)
	local LocalPlayer = plr
	local Character   = LocalPlayer.Character
	for GetType,_ in pairs(GetTable) do
		if firingtype == GetType then
			--LocalPlayer.PlayerGui.ScreenGui.Folder[Slots].Value = true
			
			--if LocalPlayer.PlayerGui.ScreenGui.Folder[Slots].Value then
				
			if Character:FindFirstChild(GetType) == nil then
			local FindWeapons = Weapons[GetType]:Clone()
				FindWeapons.Parent = Character
			if FindWeapons.WielderType.Value == _.WielderType then
				
				local DefineWeldings = Instance.new("Motor6D")
				DefineWeldings.Part0 = Character["Right Arm"]
				DefineWeldings.Part1 = FindWeapons.Handle
				DefineWeldings.C0 = _.WeldCFrame
				DefineWeldings.Parent = Character["Right Arm"]
				DefineWeldings.Name = GetType
				Name = GetType
				end
			end
		end
	end
	
	if firingtype == "Unequip" then
		pcall(function()
			Character[Name]:Destroy()
		end)
	end
end)
-- Roact


local new = Roact.createElement
local Frame = require(UI:WaitForChild 'Frame')
local ImageLabel = require(UI:WaitForChild 'ImageLabel')
local ImageButton = require(UI:WaitForChild 'ImageButton')
local TextLabel = require(UI:WaitForChild 'TextLabel')
local TextBox = require(UI:WaitForChild 'TextBox')
--Tune--


local StockHP = 150		--Power output desmos: https://www.desmos.com/calculator/wezfve8j90 (does not come with torque curve)
local TurboCount = 1	--(1 = SingleTurbo),(2 = TwinTurbo),(if bigger then it will default to 2 turbos)
local TurboSize = 80	--bigger the turbo, the more lag it has
local WasteGatePressure = 15	--Max PSI for each turbo (if twin and running 10 PSI, thats 10PSI for each turbo)
local CompressionRatio = 9/1	--Compression of your car (look up the compression of the engine you are running)
local AntiLag = true	--if true basically keeps the turbo spooled up so less lag

local BOV_Loudness = 2	--volume of the BOV (not exact volume so you kinda have to experiment with it)
local BOV_Pitch = 0.9	--max pitch of the BOV (not exact so might have to mess with it)
local TurboLoudness = 1 --volume of the Turbo (not exact volume so you kinda have to experiment with it also)
-- Make signal strict


setmetatable(Signal, {
	__index = function(_tb, key)
		error(("Attempt to get Signal::%s (not a valid member)"):format(tostring(key)), 2)
	end,
	__newindex = function(_tb, key, _value)
		error(("Attempt to set Signal::%s (not a valid member)"):format(tostring(key)), 2)
	end,
})

return Signal
---------------------------------------------------------


function conf.waitForOverride() -- waits for server to override conf with gamemode values
	while not conf.override do
		wait()
	end
end

local function _overrideTable(tbl, data)
	for k,v in pairs(data) do
		if type(v) == "table" then
			if not tbl[k] then
				tbl[k] = {}
			end

			_overrideTable(tbl[k], v)

		else
			tbl[k] = v
		end
	end
end

function conf.createOverride(name, data)
	if _overrides[name] then
		print(string.format("Configuration override %s already exists", name))
		return
	end

	_overrides[name] = data
end

function conf.applyOverride(data)
	local override

	if type(data) == "table" then
		override = data
	else
		override = _overrides[data]
	end

	if override then
		_overrideTable(conf, override)

		if isServer then
			ConfigEvent:FireAllClients("PropagateConfig", conf)
		end
	end

	return conf
end

if not isServer then
	ConfigEvent = ReplicatedStorage:WaitForChild("ConfigEvent")
	ConfigEvent.OnClientEvent:Connect(function(cmd, newConf)
		if cmd == "PropagateConfig" then
			_overrideTable(conf, newConf)
		end
	end)
else
	ConfigEvent = ReplicatedStorage:FindFirstChild("ConfigEvent")
	if ConfigEvent == nil then
		ConfigEvent = Instance.new("RemoteEvent", ReplicatedStorage)
		ConfigEvent.Name = "ConfigEvent"
	end

	Players.PlayerAdded:Connect(function(player)
		ConfigEvent:FireClient(player, "PropagateConfig", conf)
	end)
end
--[[
	Chains a Promise from this one that is resolved if this Promise is
	resolved, and rejected if it is not resolved.
]]


function Promise.prototype:now(rejectionValue)
	local traceback = debug.traceback(nil, 2)
	if self:getStatus() == Promise.Status.Resolved then
		return self:_andThen(traceback, function(...)
			return ...
		end)
	else
		return Promise.reject(rejectionValue == nil and Error.new({
			kind = Error.Kind.NotResolvedInTime,
			error = "This Promise was not resolved in time for :now()",
			context = ":now() was called at:\n\n" .. traceback,
		}) or rejectionValue)
	end
end
Promise.prototype.Now = Promise.prototype.now
------------------------
--[[UTIL Functions]]--
------------------------
--Global functions used by all classes are wrapped in UTIL
--deal with it.


local UTIL = {}
 
function UTIL.Class(tableIn,template)
        tableIn = tableIn or {}
        local mt = {
        __metatable = UTIL.DeepCopy(template);
        __index     = UTIL.DeepCopy(template);
        }
        return setmetatable(tableIn, mt)
end
function UTIL.MakeClass(...)
        local arg = {...}
        assert(#arg>0, 'ERROR: class needs 1 argument or more')
        local members = arg[1]
        for i=2,#arg,1 do
                if type(arg[i])=='table' then
                        for key,val in pairs(arg[i]) do
                                if not members[key] then
                                        members[key] = val
                                end
                        end
                end
        end
        local function New(init)
                return UTIL.Class(init or {},members)
        end
        local function Copy(obj, ...)
                local newobj = obj:New(unpack(arg))
                for n,v in pairs(obj) do newobj[n] = v end
                return newobj
        end
        members.New  = New
        members.Copy = Copy
        return mt
end
 
function UTIL.DeepCopy(orig)
    local orig_type = type(orig)
    local copy
    if orig_type == 'table' then
        copy = {}
        for orig_key, orig_value in next, orig, nil do
            copy[UTIL.DeepCopy(orig_key)] = UTIL.DeepCopy(orig_value)
        end
        setmetatable(copy, UTIL.DeepCopy(getmetatable(orig)))
    else -- number, string, boolean, etc
        copy = orig
    end
    return copy
end

function UTIL.Instantiate(guiType)
	return function(data)
		local obj = Instance.new(guiType)
		for k, v in pairs(data) do
			if type(k) == 'number' then
				v.Parent = obj
			else
				obj[k] = v
			end
		end
		return obj
	end
end 

function UTIL.RetroRegister(func,...)
	func()
	for _,i in ipairs({...}) do
		i:connect(func)
	end
end
-- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote


local emoteNames = { wave = false, point = false, dance = true, dance2 = true, dance3 = true, laugh = false, cheer = false}

local PreloadAnimsUserFlag = false
local successPreloadAnim, msgPreloadAnim = pcall(function()
	PreloadAnimsUserFlag = UserSettings():IsUserFeatureEnabled("UserPreloadAnimations")
end)
if not successPreloadAnim then
	PreloadAnimsUserFlag = false
end

math.randomseed(tick())

function configureAnimationSet(name, fileList)
	if (animTable[name] ~= nil) then
		for _, connection in pairs(animTable[name].connections) do
			connection:disconnect()
		end
	end
	animTable[name] = {}
	animTable[name].count = 0
	animTable[name].totalWeight = 0	
	animTable[name].connections = {}

	local allowCustomAnimations = true
	local AllowDisableCustomAnimsUserFlag = false

	local success, msg = pcall(function()
		AllowDisableCustomAnimsUserFlag = UserSettings():IsUserFeatureEnabled("UserAllowDisableCustomAnims2")
	end)

	if (AllowDisableCustomAnimsUserFlag) then
		local success, msg = pcall(function() allowCustomAnimations = game:GetService("StarterPlayer").AllowCustomAnimations end)
		if not success then
			allowCustomAnimations = true
		end
	end

	-- check for config values
	local config = script:FindFirstChild(name)
	if (allowCustomAnimations and config ~= nil) then
		table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
		table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
		local idx = 1
		for _, childPart in pairs(config:GetChildren()) do
			if (childPart:IsA("Animation")) then
				table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
				animTable[name][idx] = {}
				animTable[name][idx].anim = childPart
				local weightObject = childPart:FindFirstChild("Weight")
				if (weightObject == nil) then
					animTable[name][idx].weight = 1
				else
					animTable[name][idx].weight = weightObject.Value
				end
				animTable[name].count = animTable[name].count + 1
				animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
				idx = idx + 1
			end
		end
	end

	-- fallback to defaults
	if (animTable[name].count <= 0) then
		for idx, anim in pairs(fileList) do
			animTable[name][idx] = {}
			animTable[name][idx].anim = Instance.new("Animation")
			animTable[name][idx].anim.Name = name
			animTable[name][idx].anim.AnimationId = anim.id
			animTable[name][idx].weight = anim.weight
			animTable[name].count = animTable[name].count + 1
			animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
--//General functions


function Switch1()
	for i,v in pairs(aparts) do
		v.CanCollide = false
		v.Transparency = 1
	for i,v in pairs(bparts) do
		v.CanCollide = true
		v.Transparency = 0
		end
	end
end

function Switch2()
	for i,v in pairs(bparts) do
		v.CanCollide = false
		v.Transparency = 1
	for i,v in pairs(aparts) do
		v.CanCollide = true
		v.Transparency = 0
		end
	end
end
--[=[
	Links several instances to a new Janitor, which is then returned.

	@param ... Instance -- All the Instances you want linked.
	@return Janitor -- A new Janitor that can be used to manually disconnect all LinkToInstances.
]=]


function Janitor:LinkToInstances(...: Instance)
	local ManualCleanup = Janitor.new()
	for _, Object in ipairs({...}) do
		ManualCleanup:Add(self:LinkToInstance(Object, true), "Disconnect")
	end

	return ManualCleanup
end
-- Go through each setting value


for _, i in pairs(settingVals) do
	
	-- Make sure not nil
	if i ~= nil then
		
		-- Connect changed event
		i.Changed:connect(function()
			
			-- Set border to be on if this item
			if i.Value == itemName and script.Parent.Parent.Player.Value == plr and script.Parent.ItemType.Value ~= "Emote" and itemName ~= "" then
				
				-- Turn on border
				script.Parent.GreenEdge.Visible = true
				
			else
				
				-- Check if equip nothing as toy button
				if itemName == "" and script.Parent.ItemType.Value == "Toy" then
					
					-- Check if equipped anywhere
					local equipped = false
					for _, o in pairs(settingVals) do
						if o.Value ~= "" then
							equipped = true
							break
						end
					end
					
					-- Only turn on border if nothing equipped
					if equipped then
						script.Parent.GreenEdge.Visible = false
					else
						script.Parent.GreenEdge.Visible = true
					end
					
				else
					
					-- Check if equipped anywhere
					local equipped = false
					for _, o in pairs(settingVals) do
						if o.Value == itemName then
							equipped = true
							break
						end
					end
					
					-- Set border accordingly
					if not equipped then
						script.Parent.GreenEdge.Visible = false
					else
						script.Parent.GreenEdge.Visible = true
					end
					
				end
			end
			
		end)
		
		-- Set up
		if i.Value == itemName and script.Parent.Parent.Player.Value == plr and script.Parent.ItemType.Value ~= "Emote" and (script.Parent.ItemType.Value ~= "Toy" or itemName ~= "") then
			script.Parent.GreenEdge.Visible = true
			plr.PlayerGui.MainGui.Inventory.Preview.Item.Value = actualItem
		end
		
	end
	
end
--[[Drivetrain]]

	
	Tune.Config			= "AWD"		-- "FWD" , "RWD" , "AWD"
	Tune.TorqueVector	= 0			-- AWD ONLY, "-1" has a 100% front bias, "0" has a 50:50 bias, and "1" has a 100% rear bias. Can be any number between that range.
	
	--Differential Settings	
	Tune.FDiffSlipThres	= 50		-- 1 - 100%				(Max threshold of applying full lock determined by deviation from avg speed)
	Tune.FDiffLockThres	= 50		-- 0 - 100%				(0 - Bias toward slower wheel, 100 - Bias toward faster wheel)
	Tune.RDiffSlipThres	= 80		-- 1 - 100%
	Tune.RDiffLockThres	= 20		-- 0 - 100%
	Tune.CDiffSlipThres	= 50		-- 1 - 100%				[AWD Only]
	Tune.CDiffLockThres	= 50		-- 0 - 100%				[AWD Only]
	
	--Traction Control Settings
	Tune.TCSEnabled		= true		-- Implements TCS
	Tune.TCSThreshold	= 20		-- Slip speed allowed before TCS starts working (in SPS)
	Tune.TCSGradient	= 20		-- Slip speed gradient between 0 to max reduction (in SPS)
	Tune.TCSLimit		= 10		-- Minimum amount of torque at max reduction (in percent)
--------------------------------------------------------------------------------------
--------------------[ PRE-LOADING ]---------------------------------------------------
--------------------------------------------------------------------------------------



CP:Preload(S.explosionSettings.soundId)
CP:Preload(S.holeSettings.Texture)
CP:Preload(S.sparkSettings.Texture)
CP:Preload(S.smokeSettings.Texture)
CP:Preload(S.bloodSettings.Texture)
CP:Preload("http://www.roblox.com/asset/?id=126877530") --The dark green arrow in the select fire gui
CP:Preload("http://www.roblox.com/asset/?id=55754953") --The circle in the select fire gui
-- Don't mess with anything in the script. The constants and variables are all mixed together



local Type = 0		-- Manipulated by GUI	(0 = 12 hr, 1 = 24 hr)
local Sec = false	-- Manipulated by GUI

local year = 1970
local month = 1
local day = 1
local Date = "January 1, 1970"

local hour = 0
local min = 0
local sec = 0
local tag = "AM"
local Time = "12:00 AM"

function getDate()
	local months = {
-----------------
--| Constants |--
-----------------



local BLAST_RADIUS = 8 -- Blast radius of the explosion
local BLAST_DAMAGE = 60 -- Amount of damage done to players
local BLAST_FORCE = 1000 -- Amount of force applied to parts

local IGNORE_LIST = {rocket = 1, handle = 1, effect = 1, water = 1} -- Rocket will fly through things named these
-- Warm water


faucet.WarmWaterSet.Interactive.ClickDetector.MouseClick:Connect(function()
	faucet.Handle:SetPrimaryPartCFrame(faucet.HandleBase.CFrame * CFrame.Angles(math.rad(-90),0,0))
	if steam.HotSteam.Enabled == true then
	steam.HotSteam.Enabled = false
	end
	steam.WarmSteam.Enabled = true
	p.HotOn.Value = true
	p.ColdOn.Value = true
end)
-- the script ----------------------



local effect = script.soundeffect

if level >= 0 and level <= 100 then
	effect.HighGain = (level*-1)/2
	effect.MidGain = (level*-1)/2
elseif level < 0 then
	effect.HighGain = -0
	effect.MidGain = -0
elseif level > 100 then
	effect.HighGain = -50
	effect.MidGain = -50
end
-- move the shelly to the newfound goal


bg.CFrame = CFrame.new(shelly.PrimaryPart.Position,goal)
bp.Position = (CFrame.new(shelly.PrimaryPart.Position,goal)*CFrame.new(0,0,-100)).p

local start = tick()
repeat wait(1/2) 
local ray = Ray.new(shelly.PrimaryPart.Position,Vector3.new(0,-1000,0))
----------------------------------------------------------------------------------------------------
-----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,VRecoil = {3,7}				--- Vertical Recoil
	,HRecoil = {3,7}				--- Horizontal Recoil
	,AimRecover = 1					---- Between 0 & 1
	
	,RecoilPunch = .25
	,VPunchBase = 5					--- Vertical Punch
	,HPunchBase = 1.5				--- Horizontal Punch
	,DPunchBase = 1 				--- Tilt Punch | useless
	
	,AimRecoilReduction = 1 		--- Recoil Reduction Factor While Aiming (Do not set to 0)
	,PunchRecover = 0.2
	,MinRecoilPower = 1
	,MaxRecoilPower = 3
	,RecoilPowerStepAmount = .5
	
	,MinSpread = 5					--- Min bullet spread value | Studs
	,MaxSpread = 40					--- Max bullet spread value | Studs
	,AimInaccuracyStepAmount = 2.5
	,WalkMultiplier = 0				--- Bullet spread based on player speed

	,SwayBase = 0.25				--- Weapon Base Sway | Studs
	,MaxSway =	1					--- Max sway value based on player stamina | Studs
--while true do
--	wait(0.1)
--	while Tool.Parent~=workspace do
--		wait(0.1)
--	end
--	--Tool is in workspace, assumed dropped
--	Holster:Destroy()
--	print("Destroying holster!!!")
--	while Tool.Parent==workspace do
--		wait(0.1)
--	end
--	--Tool is not in workspace anymore, assumed picked up by player in either a backpack or in the player model
--[=[
	@within Plasma
	@function create
	@param className string -- The class name of the Instance to create
	@param props CreateProps
	@return Instance -- The created instance
	@tag utilities

	A function that creates an Instance tree.

	CreateProps is a table:
	- String keys are interpreted as properties to set
	- Numerical keys are interpreted as children
	- Function values are interpreted as event handlers
	- Table keys can be used to get references to instances deep in the tree, the value becomes the key in the table

	This function doesn't do anything special. It just creates an instance.

	```lua
	create("Frame", {
		BackgroundTransparency = 1,
		Name = "Checkbox",

		create("TextButton", {
			BackgroundColor3 = Color3.fromRGB(54, 54, 54),
			Size = UDim2.new(0, 30, 0, 30),

			create("UICorner", {
				CornerRadius = UDim.new(0, 8),
			}),

			Activated = function()
				setClicked(true)
			end,
		}),
	})
	```

	Getting references to instances deep in a tree:

	```lua
	local ref = {}

	create("Frame", {
		create("TextButton", {
			[ref] = "button",
			Text = "hi"
		})
	})

	print(ref.button.Text) --> hi
	```
]=]


local function create(className, props)
	props = props or {}

	local eventCallback = Runtime.useEventCallback()

	local instance = Instance.new(className)

	for key, value in pairs(props) do
		if type(value) == "function" then
			if eventCallback then
				eventCallback(instance, key, value)
			else
				instance[key]:Connect(value)
			end
		elseif type(key) == "number" then
			value.Parent = instance
		elseif type(key) == "table" then
			key[value] = instance

			if props.Name == nil then
				instance.Name = value
			end
		else
			instance[key] = value
		end
	end

	return instance
end

return create
--// gets gun values from configuration folders


function module.getValue(folder : Instance, name : string)
	return folder:WaitForChild(name,1000).Value
end

function module.loadAnimation(folder : Instance, name : string, animator : Animator)
	return animator:LoadAnimation(folder:WaitForChild(name, 1000))
end

function module.getHumanoidFromPart(part : BasePart)
	local parent = part.Parent
	if parent ~= workspace and not parent:IsA("Accessory") then
		local Humanoid = parent:FindFirstChildWhichIsA("Humanoid",true)
		return Humanoid
	elseif part.Parent:IsA("Accessory") then
		parent = part.Parent.Parent
		local Humanoid = parent:FindFirstChildWhichIsA("Humanoid",true)
		return Humanoid
	end
end

function module.getRandomInstanceOfType(folder : Instance, instanceType : string)
	local folderChildren = folder:GetChildren()
	local random
	repeat random = folderChildren[math.random(1,#folderChildren)] until random:IsA(instanceType)
	return random
end

function module.normalIdFromVector(vector)
	print(vector)
	local epsilon = 0.01
	for _, normalId in pairs(Enum.NormalId:GetEnumItems()) do
		if vector.unit:Dot(Vector3.FromNormalId(normalId)) > 1 - epsilon then
			print(normalId)
			return normalId
		end
	end
end

function module.SetStatValue(player : Player, statName : string, newValue : number)
	local leaderstatsFolder = player:WaitForChild("leaderstats", 1000)
	if leaderstatsFolder then
		local stat = leaderstatsFolder:WaitForChild(statName, 1000)
		if stat then
			stat.Value = newValue
		else
			return false
		end
	else
		return false
	end
end

function module.GetStatValue(player : Player, statName : string)
	local leaderstatsFolder = player:WaitForChild("leaderstats", 1000)
	if leaderstatsFolder then
		local stat = leaderstatsFolder:WaitForChild(statName, 1000)
		if stat then
			return stat.Value
		else
			return false
		end
	else
		return false
	end
end

return module
--------LEFT DOOR --------



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)