Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- setup emote chat hook
--Game.Players.LocalPlayer.Chatted:connect(function(msg)
--	local emote = ""
--	if (string.sub(msg, 1, 3) == "/e ") then
--		emote = string.sub(msg, 4)
--	elseif (string.sub(msg, 1, 7) == "/emote ") then
--		emote = string.sub(msg, 8)
--	end
--	
--	if (pose == "Standing" and emoteNames[emote] ~= nil) then
--		playAnimation(emote, 0.1, Humanoid)
--	end
----	print("===> " .. string.sub(msg, 1, 3) .. "(" .. emote .. ")")
--end)
--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
--[[Weight and CG]]


	Tune.Weight			= 4000		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		3.5		,
	 --[[Length]]		14		}
	Tune.WeightDist		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .8		-- 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
--		local grid = scroller:WaitForChild("UIGridLayout")


		local function GetGuiObjects()
			local objs = {}
			local c = scroller:GetChildren()
			for i=1, #c do
				local o = c[i]
				if o:IsA("GuiObject") then
					table.insert(objs,o)
				end
			end
			return objs
		end
		
		-- updates the CanvasSize based on the amount of frames in the frame, along with
		local function Update()
			scroller.CanvasSize = UDim2.new(0,only_y and 0 or layout.AbsoluteContentSize.X,0,layout.AbsoluteContentSize.Y + 25)
		end
		connections[scroller] = {
			layout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(Update),
			scroller.AncestryChanged:Connect(function()
				if not scroller.Parent then
					AutoCanvasSize.Disconnect(scroller)
				end
			end),
			scroller.ChildAdded:Connect(function()
				spawn(Update) -- it appears the child does not get added until the connection returns (or something of that effect)
							  -- so, we spawn the Update so it is inclusive of the new child.
			end),
			scroller.ChildRemoved:Connect(Update)
		}
		Update()
	end
	
return AutoCanvasSize
--Made by Luckymaxer



Debris = game:GetService("Debris")
RunService = game:GetService("RunService")

Character = script.Parent

Humanoid = Character:FindFirstChild("Humanoid")

Smoke = script:FindFirstChild("Smoke")

function DestroyScript()
	Debris:AddItem(script, 0.5)
end

if not Smoke or not Humanoid or Humanoid.Health > 0 then
	return
end

PartsEffected = {}

for i, v in pairs(Character:GetChildren()) do
	if v:IsA("BasePart") and v.Transparency < 1 then
		v.Velocity = (v.Velocity + (CFrame.Angles((math.random(-360, 360) * 0.01), (math.random(-360, 360) * 0.01), (math.random(-360, 360) * 0.01)).lookVector * math.random(1, 5)))
		v.RotVelocity = Vector3.new((math.random(-360, 360) * 0.01), (math.random(-360, 360) * 0.01), (math.random(-360, 360) * 0.01))
		for ii, vv in pairs(v:GetChildren()) do
			if vv:IsA("ParticleEmitter") then
				vv:Destroy()
			end
		end
		local SmokeEffect = Smoke:Clone()
		SmokeEffect.Enabled = true
		SmokeEffect.Parent = v
		table.insert(PartsEffected, {Part = v, Smoke = SmokeEffect})
	end
end

FadeLoop = RunService.Stepped:connect(function(Time, Step)
	if #PartsEffected == 0 then
		if FadeLoop then
			FadeLoop:disconnect()
			return
		end
	else
		for i, v in pairs(PartsEffected) do
			if v.Part.Transparency < 1 then
				v.Part.Transparency = (v.Part.Transparency + 0)
				if v.Part.Transparency >= 1 then
					v.Smoke.Enabled = false
					Debris:AddItem(v.Part, 4)
				end
			else
				table.remove(PartsEffected, i)
			end
		end
	end
end)
-- setup emote chat hook


Game.Players.LocalPlayer.Chatted:connect(function(msg)
	local emote = ""
	if (string.sub(msg, 1, 3) == "/e ") then
		emote = string.sub(msg, 4)
	elseif (string.sub(msg, 1, 7) == "/emote ") then
		emote = string.sub(msg, 8)
	end
	
	if (pose == "Standing" and emoteNames[emote] ~= nil) then
		playAnimation(emote, 0.1, Humanoid)
	end

end)
--edit the below function to execute code when this response is chosen OR this prompt is shown
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data


return function(player, dialogueFolder)
	local References = require(game.ReplicatedStorage.Source.Modules.References)

	References.Util:GetPlayerData(player).Character.Appearance.Face.Value = game.ReplicatedStorage.Assets.SystemPrefabs.Faces:GetChildren()[math.random(1,#game.ReplicatedStorage.Assets.SystemPrefabs.Faces:GetChildren())].Name
	
	game.ReplicatedStorage.Events.System.UpdateFace:Fire(player)
	
end
--Tune--


local StockHP = 445		--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 = 91	--bigger the turbo, the more lag it has (actually be realistic with it) no 20mm turbos
local WasteGatePressure = 50	--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 = 1.1	--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 = 0.65 --volume of the Turbo (not exact volume so you kinda have to experiment with it also)
-------------------------


 
mouse.KeyDown:connect(function (key)
    key = string.lower(key)
		if key == "v" then --Camera controls
	        if cam == ("car") then
				Camera.CameraSubject = player.Character.Humanoid
				Camera.CameraType = ("Custom")
				cam = ("freeplr")
				Camera.FieldOfView = 70
			elseif cam == ("freeplr") then
				Camera.CameraSubject = player.Character.Humanoid
				Camera.CameraType = ("Attach")
				cam = ("lockplr")
				Camera.FieldOfView = 45
	        elseif cam == ("lockplr") then
				Camera.CameraSubject = carSeat
				Camera.CameraType = ("Custom")
				cam = ("car")
				Camera.FieldOfView = 70
	        end
		elseif key == "u" then --Window controls
		 if windows == false then 
			winfob.Visible = true
			windows = true
		 else windows = false
			winfob.Visible = false
		 end
		elseif key == "[" then -- volume down
			if carSeat.Parent.Body.MP.Sound.Volume > 0 then
				handler:FireServer('updateVolume', -0.5)
			end
		elseif key == "]" then -- volume up
			if carSeat.Parent.Body.MP.Sound.Volume < 10 then
				handler:FireServer('updateVolume', 0.5)
			end	
	end
end)



winfob.mg.Play.MouseButton1Click:connect(function() --Play the next song
	handler:FireServer('updateSong', winfob.mg.Input.Text)
end)

winfob.mg.Stop.MouseButton1Click:connect(function() --Play the next song
	handler:FireServer('pauseSong')
end)
-- Example test-code here. Put the following code in a localscript inside a screengui with this module.
--[[



local confettiModule = require(script.Parent:WaitForChild('ConfettiModule'))

while true do
	confettiModule.Explode(Vector2.new(300,150), 50)
	wait(.5)
	confettiModule.Explode(Vector2.new(500,150), 50)
	wait(.5)
	confettiModule.Explode(Vector2.new(700,150), 50)
	wait(5)
	confettiModule.Rain(100)
	wait(5)
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: { BaseScript })
	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(constants.ENABLED_SCRIPTS_ERROR:format(table.concat(enabledScripts, ", ")))
	end
end

type Options = {
	verboseLogging: boolean,
}

local defaultOptions: Options = {
	verboseLogging = false,
}

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

	assert(devModule.Parent, ("%s must be parented to be installed"):format(devModule.Name))

	local mergedOptions = defaultOptions
	for key, value in pairs(options or {}) do
		mergedOptions[key] = value
	end

	if mergedOptions.verboseLogging then
		useVerboseLogging = mergedOptions.verboseLogging
	end

	events.started:Fire()

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

	local devModuleScripts = getDevModuleScripts(devModule)
	assertScriptsAreDisabled(devModuleScripts)

	if constants.DEV_MODULE_STORAGE:FindFirstChild(devModule.Name) then
		log("info", "A version of this DevModule already exists. Skipping...")
		devModule:Destroy()
		return
	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

	events.finished: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 install
-- Code to begin tracking, evenly spread out


task.defer(function()
	local iterationsPerSec = 4
	while true do
		local Mobn = GetTableLength(MobList)
		local Quota = Mobn / (60/iterationsPerSec)
		
		for _, Mob in MobList do
			if not Mob.isDead and not Mob.Destroyed then
				local Player = AI:GetClosestPlayer(Mob)
				
				if Player and not ActiveMobs[Mob.Instance] then
					task.defer(AI.StartTracking, AI, Mob)
					Quota -= 1
					if Quota < 1 then
						Quota += Mobn / (60/iterationsPerSec)
						task.wait()
					end
				end
			end
		end
		task.wait()
	end
end)
--[[Flip]]



	function Flip()
		--Detect Orientation
		if (car.Body.CarName.Value.VehicleSeat.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector.y > .1 or FlipDB then
			FlipWait=tick()
			
		--Apply Flip
		else
			if tick()-FlipWait>=3 then
				FlipDB=true
				local gyro = car.Body.CarName.Value.VehicleSeat.Flip
				gyro.maxTorque = Vector3.new(10000,0,10000)
				gyro.P=3000
				gyro.D=500
				wait(1)
				gyro.maxTorque = Vector3.new(0,0,0)
				gyro.P=0
				gyro.D=0
				FlipDB=false
			end
		end
	end
--[[ Modules ]]

--
local CurrentControlModule = nil
local ClickToMoveTouchControls = nil
local ControlModules = {}

local MasterControl = require(script:WaitForChild('MasterControl'))

if IsTouchDevice then
	ControlModules.Thumbstick = require(script.MasterControl:WaitForChild('Thumbstick'))
	ControlModules.Thumbpad = require(script.MasterControl:WaitForChild('Thumbpad'))
	ControlModules.DPad = require(script.MasterControl:WaitForChild('DPad'))
	ControlModules.Default = ControlModules.Thumbstick
	TouchJumpModule = require(script.MasterControl:WaitForChild('TouchJump'))
	BindableEvent_OnFailStateChanged = script.Parent:WaitForChild('OnClickToMoveFailStateChange')
else
	ControlModules.Keyboard = require(script.MasterControl:WaitForChild('KeyboardMovement'))
end
ControlModules.Gamepad = require(script.MasterControl:WaitForChild('Gamepad'))
local success, value = pcall(function() return UserSettings():IsUserFeatureEnabled("UserUseLuaVehicleController") end)
if success and value then
	local VehicleController = require(script.MasterControl:WaitForChild('VehicleController')) 	-- Not used, but needs to be required
end
--/////////////////////////////////////////////////////////--



local curSize
local create
local Expand
local doHide
local doClose
local dragSize
local isVisible
local DoRefresh
local getNextPos
local wallPosition
local setPosition
local checkMouse
local isInFrame 
local setSize
local apiIfy

client = nil
cPcall = nil
Pcall = nil
Routine = nil
service = nil
GetEnv = nil

local function isGui(child)
	return child:IsA("GuiObject");
end
---Place this INSIDE the model. Don't replace the model name or anything.
------------------------------------------------------------------------------------------ 


object = script.Parent 
if (object ~= nil) and (object ~= game.Workspace) then 
model = object 
messageText = "regenerating " .. model.Name .. "" 

message = Instance.new("Message") 
message.Text = messageText 
backup = model:clone() -- Make the backup 
waitTime = 1740 --Time to wait between regenerations 
wait(math.random(0, waitTime)) 
while true do 
wait(waitTime) -- Regen wait time 

message.Parent = game.Workspace 
model:remove() 

wait(2.5) -- Display regen message for this amount of time 

model = backup:clone() 
model.Parent = game.Workspace 
model:makeJoints() 
message.Parent = nil 
end 
end
--Misc


Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
Tune.RevDecay		= 75		-- RPM decay when clutch is off
Tune.RevBounce		= 500		-- RPM kickback from redline
Tune.IdleThrottle	= 3			-- Percent throttle at idle
Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response, lower = more stable RPM)
-- Mapping from movement mode and lastInputType enum values to control modules to avoid huge if elseif switching


local movementEnumToModuleMap = {
	[Enum.TouchMovementMode.DPad] = TouchDPad, -- Map to DT
	[Enum.DevTouchMovementMode.DPad] = TouchDPad, -- Map to DT
	[Enum.TouchMovementMode.Thumbpad] = TouchThumbpad, -- Map to DT
	[Enum.DevTouchMovementMode.Thumbpad] = TouchThumbpad, -- Map to DT
	[Enum.TouchMovementMode.Thumbstick] = TouchThumbstick, -- Map to DT
	[Enum.DevTouchMovementMode.Thumbstick] = TouchThumbstick, -- Map to DT
	[Enum.TouchMovementMode.DynamicThumbstick] = DynamicThumbstick,
	[Enum.DevTouchMovementMode.DynamicThumbstick] = DynamicThumbstick,
	[Enum.TouchMovementMode.ClickToMove] = ClickToMove,
	[Enum.DevTouchMovementMode.ClickToMove] = ClickToMove,

	-- Current default
	[Enum.TouchMovementMode.Default] = DynamicThumbstick,

	[Enum.ComputerMovementMode.Default] = Keyboard,
	[Enum.ComputerMovementMode.KeyboardMouse] = Keyboard,
	[Enum.DevComputerMovementMode.KeyboardMouse] = Keyboard,
	[Enum.DevComputerMovementMode.Scriptable] = nil,
	[Enum.ComputerMovementMode.ClickToMove] = ClickToMove,
	[Enum.DevComputerMovementMode.ClickToMove] = ClickToMove,
}
--[Lokalizacje]
--[Góra]


g1 = script.Parent.Parent.gura1
legansio = true

g2 = script.Parent.Parent.gura2
legansio = true

g3 = script.Parent.Parent.gura3
legansio = true

g4 = script.Parent.Parent.gura4
legansio = true

g5 = script.Parent.Parent.gura5
legansio = true

g6 = script.Parent.Parent.gura6
legansio = true

g7 = script.Parent.Parent.gura7
legansio = true

g8 = script.Parent.Parent.gura8
legansio = true

g9 = script.Parent.Parent.gura9
legansio = true

g10 = script.Parent.Parent.gura10
legansio = true

g11 = script.Parent.Parent.gura11
legansio = true

g12 = script.Parent.Parent.gura12
legansio = true

g13 = script.Parent.Parent.gura13
legansio = true

g14 = script.Parent.Parent.gura14
legansio = true

s1 = script.Parent.Parent.s1
legansio = true

q1 = script.Parent.Parent.q1
legansio = true
--if u wanna add more lights make sure to use the same script format u see below
--ex. (if script.Parent.Lights.(light).(partname).Material == Enum.Material.Neon then etc...)



while true do
	wait()
	if script.Parent.Parent.Lights.FB.Light.enabled == true then	
		script.Parent.Material = Enum.Material.Neon
	else
		script.Parent.Material = Enum.Material.SmoothPlastic
	end
end
--Robux


bux1.MouseEnter:connect(function()
	bux1.BorderColor3 = Color3.new(200/255,0,0)
end)
bux1.MouseLeave:connect(function()
	bux1.BorderColor3 = Color3.new(0,0,0)
end)

bux2.MouseEnter:connect(function()
	bux2.BorderColor3 = Color3.new(200/255,0,0)
end)
bux2.MouseLeave:connect(function()
	bux2.BorderColor3 = Color3.new(0,0,0)
end)

bux3.MouseEnter:connect(function()
	bux3.BorderColor3 = Color3.new(200/255,0,0)
end)
bux3.MouseLeave:connect(function()
	bux3.BorderColor3 = Color3.new(0,0,0)
end)
--[[Running Logic]]

--
local equipped = false
local rayparts = {}
local ColorChoices = {BrickColor.new('Really red'),BrickColor.new('Lime green'),BrickColor.new('Toothpaste')}
local StartOffset = {Vector3.new(-.45,0,0),Vector3.new(0,0,0),Vector3.new(.45,0,0)}
local oldC0 =nil
local nweld
local EffectFunctions = 
{
	function(hum,dir) hum:TakeDamage(1) end,
	function(hum,dir) hum:TakeDamage(-1) end,
	function(hum,dir) 
		if hum.Torso then
			local nforce = Instance.new('BodyForce')
			nforce.force = dir*3000
			nforce.Parent = hum.Torso
			hum.Sit = true
			game.Debris:AddItem(nforce,.2)
			Delay(.2,function() hum.Sit = false end)
		end
	end
}
Tool.Equipped:connect(function(mouse)
	--game.Players.LocalPlayer:GetMouse()
	Spawn(function()
		local colorChoice = 1
		if not Tool.Parent:FindFirstChild('Torso') or not Tool.Parent.Torso:FindFirstChild('Right Shoulder') or not Tool.Parent:FindFirstChild('Humanoid') then return end
		LazerSound:Play()
		nweld = Tool.Parent.Torso['Right Shoulder']
		oldC0 = nweld.C0
		nweld.CurrentAngle = 0
		nweld.DesiredAngle = 0
		nweld.MaxVelocity = 0
		mouse.Button1Down:connect(function()
			colorChoice=colorChoice+1
			if colorChoice>#ColorChoices then colorChoice =1 end
			LazerSound.Pitch = .75+((colorChoice*.25)*3)
		end)
		equipped = true
		while equipped and Tool.Parent:FindFirstChild('Torso') do
			local tframe = Tool.Parent.Torso.CFrame
			tframe = tframe + tframe:vectorToWorldSpace(Vector3.new(1, 0.5, 0))
			local taim = mouse.Hit.p -( tframe.p )
			nweld.C0 = (CFrame.new(Vector3.new(),tframe:vectorToObjectSpace(taim))*CFrame.Angles(0,math.pi/2,0))+Vector3.new( 1, 0.5, 0 )
			rayparts = CastLightRay(Handle.CFrame.p+Handle.CFrame:vectorToWorldSpace(StartOffset[colorChoice]),mouse.Hit.p,ColorChoices[colorChoice], 5, .2,rayparts, EffectFunctions[colorChoice])
			LazerSound.Volume = ((math.sin(tick()*3)+1)*.25)+.25
			wait()
		end
		nweld.C0 =oldC0
		LazerSound:Stop()
	end)
end)

Tool.Unequipped:connect(function(mouse)
	equipped= false
	LazerSound:Stop()
	for i=1,50,1 do
		if rayparts[i] then
			rayparts[i]:Destroy()
			rayparts[i]=nil		
		end
	end
	if nweld then
		nweld.MaxVelocity =.15
		nweld.C0 =oldC0
	end
	
end)
--[=[
	Similar to [Promise.andThen](#andThen), except the return value is the same as the value passed to the handler. In other words, you can insert a `:tap` into a Promise chain without affecting the value that downstream Promises receive.

	```lua
		getTheValue()
		:tap(print)
		:andThen(function(theValue)
			print("Got", theValue, "even though print returns nil!")
		end)
	```

	If you return a Promise from the tap handler callback, its value will be discarded but `tap` will still wait until it resolves before passing the original value through.

	@param tapHandler (...: any) -> ...any
	@return Promise<...any>
]=]


function Promise.prototype:tap(tapCallback)
	assert(type(tapCallback) == "function", string.format(ERROR_NON_FUNCTION, "Promise:tap"))
	return self:_andThen(debug.traceback(nil, 2), function(...)
		local callbackReturn = tapCallback(...)

		if Promise.is(callbackReturn) then
			local length, values = pack(...)
			return callbackReturn:andThen(function()
				return unpack(values, 1, length)
			end)
		end

		return ...
	end)
end
--local Service = require(script.Parent)



local currentTestingService = nil

function this.new()
	if not currentTestingService then
		local self = {}--Service.new() -- change this to "local self = {}" Nvm I did it for you
		setmetatable(self,this)
		
		return self	
	end
	return currentTestingService -- return cached TestingService
end

function this:GetEnvironment()
	local Environment = "Release"
	if game:GetService("RunService"):IsStudio() then
		Environment = "Debug"
	end
	return Environment
end


function this:GetFlags()
	return script.Flags[self:GetEnvironment()]:GetChildren()
end

function this:GetEnabledFlags() -- returns flags that are turned on for the environment
	local EnabledFlags = {}
	for i,v in pairs(self:GetFlags()) do
		if v.Value == true then
			EnabledFlags[v.Name] = true -- For example -> if EnabledFlags["SecretFeature1"] then ...
		end
	end
	return EnabledFlags
end
	
function this:GetDisabledFlags() -- returns flags that are turned off for the environment
	local DisabledFlags = {}
	for i,v in pairs(self:GetFlags()) do
		if v.Value == false then
			DisabledFlags[v.Name] = true -- For example -> if DisabledFlags["SecretFeature1"] then ...
		end
	end
	return DisabledFlags
end
	
function this:IsFlagEnabled(FlagName) -- it's not exactly efficient and direct referencing
	-- would be faster, but we're trying to prevent errors here!
	-- FindFirstChild would be more efficient and scan quicker but it really doesn't make that much of a difference here
	-- I don't expect anybody to be calling this function frame by frame. Just cache the result ¯\_(ツ)_/¯
	local EnabledFlags = self:GetEnabledFlags()
	if EnabledFlags[FlagName] then
		return true
	end
	return false
end

return this