Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- 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)
-- 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
-- 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)
-- 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.
--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
--[=[
	@within TableUtil
	@function Keys
	@param tbl table
	@return table

	Returns an array with all the keys in the table.

	```lua
	local t = {A = 10, B = 20, C = 30}
	local keys = TableUtil.Keys(t)
	print(keys) --> {"A", "B", "C"}
	```

	:::caution Ordering
	The ordering of the keys is never guaranteed. If order is imperative, call
	`table.sort` on the resulting `keys` array.
	```lua
	local keys = TableUtil.Keys(t)
	table.sort(keys)
	```
]=]


local function Keys<K, V>(tbl: { [K]: V }): { K }
	local keys = table.create(#tbl)
	for k in tbl do
		table.insert(keys, k)
	end
	return keys
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)
-- this plugin was made to work with my track, however it'll still work if you use glass or ice as the wet track surface
-- https://www.roblox.com/games/4940324361/AIC-Autodromo-Internacional-de-Codegua
-- if you're going to add a rain system, i highly suggest you hide the wet track surface in somewhere that isnt workspace when its off, because then the water effect will still appear
--/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
--[=[
	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
-- initiate



repeat local success = pcall(function() StarterGui:SetCore("TopbarEnabled", false) end) wait() until success

for _, v in pairs(StarterGui:GetChildren()) do
	v:Clone().Parent	= PLAYER_GUI
end

CAMERA.CameraType	= Enum.CameraType.Scriptable
CAMERA.CFrame		= CFrame.new(0, 0, 100)
-- Color shortcuts: you can use these strings instead of defining exact color values


local colors = {}
colors.White = Color3.new(1, 1, 1)
colors.Black = Color3.new(0, 0, 0)
colors.Red = Color3.new(1, 0.2, 0.2)
colors.Green = Color3.new(0.2, 1, 0.2)
colors.Blue = Color3.new(0.2, 0.2, 1)
-- NOTICE: Player property names do not all match their StarterPlayer equivalents,
-- with the differences noted in the comments on the right


local PLAYER_CAMERA_PROPERTIES =
{
	"CameraMinZoomDistance",
	"CameraMaxZoomDistance",
	"CameraMode",
	"DevCameraOcclusionMode",
	"DevComputerCameraMode",			-- Corresponds to StarterPlayer.DevComputerCameraMovementMode
	"DevTouchCameraMode",				-- Corresponds to StarterPlayer.DevTouchCameraMovementMode
	
	-- Character movement mode
	"DevComputerMovementMode",
	"DevTouchMovementMode",
	"DevEnableMouseLock",				-- Corresponds to StarterPlayer.EnableMouseLockOption
}

local USER_GAME_SETTINGS_PROPERTIES =
{
	"ComputerCameraMovementMode",
	"ComputerMovementMode",
	"ControlMode",
	"GamepadCameraSensitivity",
	"MouseSensitivity",
	"RotationType",
	"TouchCameraMovementMode",
	"TouchMovementMode",
}
-- ================================================================================
-- FUNCTIONS
-- ================================================================================
-- Heartbeat


function PhysicsUpdate(step)
	if dead then
		physicsUpdateHandle:Disconnect()
		if character ~= nil then
			character:Destroy()
		end
		PlayerConverter:UnlockPlayerControls()
	end
		
	GetInput(step)
	engine:Update()
	guiController:UpdateSpeed()
	-- Update boost GUI
	guiController:UpdateBoost(boostAmount)
end -- PhysicsUpdate()
--[=[
	Starts the service bag and all services
]=]


function ServiceBag:Start()
	assert(self._serviceTypesToStart, "Already started")
	assert(not self._initializing, "Still initializing")

	while next(self._serviceTypesToStart) do
		local serviceType = table.remove(self._serviceTypesToStart)
		local service = assert(self._services[serviceType], "No service")

		if service.Start then
			local current
			task.spawn(function()
				current = coroutine.running()
				service:Start()
			end)

			assert(coroutine.status(current) == "dead", "Starting service yielded")
		end
	end

	self._serviceTypesToStart = nil
end
-- Private Methods



function init(self)
	local element = self.Element
	local maid = self._Maid
	local dragBind = self._DragBind
	local lastMousePosition = Vector3.new()
	
	maid:Mark(self._DragBind)
	maid:Mark(self._StartBind)
	maid:Mark(self._StopBind)
	
	maid:Mark(element.InputBegan:Connect(function(input)
		if (VALID_PRESS[input.UserInputType]) then
			lastMousePosition = input.Position
			self.IsDragging = true
			self._StartBind:Fire()
		end
	end))
	
	maid:Mark(UIS.InputEnded:Connect(function(input)
		if (VALID_PRESS[input.UserInputType]) then
			self.IsDragging = false
			self._StopBind:Fire()
		end
	end))
	
	maid:Mark(UIS.InputChanged:Connect(function(input, process)
		if (self.IsDragging) then
			if (VALID_MOVEMENT[input.UserInputType]) then
				local delta = input.Position - lastMousePosition
				lastMousePosition = input.Position
				dragBind:Fire(element, input, delta)
			end
		end
	end))
end