Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[ @brief Packs a table so that no gaps exist.
     @param t The table to pack.
     @param maxn The highest index (obtained by table.maxn if nil).
--]]


function module.CloseGaps(t, maxn)
	if not maxn then maxn = table.maxn(t); end
	local j = 1;
	for i = 1, maxn do
		if t[i] ~= nil then
			if i > j then
				t[j] = t[i];
				t[i] = nil;
			end
			j = j + 1;
		end
	end
end
--health.Changed:connect(function()
--root.Velocity = Vector3.new(0,5000,0)
--end)



local anims = {}
local lastAttack= tick()

local target,targetType

local lastLock = tick()

local fleshDamage = 20
local structureDamage = 10

local path = nil

for _,animObject in next,animations do
	anims[animObject.Name] = hum:LoadAnimation(animObject)
end

hum.ChillmanIdle:Play()
--[[
	    ___      _______                _       _______
	   / _ |____/ ___/ /  ___ ____ ___ (_)__   /__  __/
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<     / /
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/	/_/   
						SecondLogic @ Inspare
						Avxnturador @ Novena
]]


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 BOVact = 0
local BOVact2 = 0

local BOV_Loudness = .05	--volume of the BOV (not exact volume so you kinda have to experiment with it)
local BOV_Pitch = 1.1	--max pitch of the BOV (not exact so might have to mess with it)
local TurboLoudness = .05 --volume of the Turbo (not exact volume so you kinda have to experiment with it also)

script:WaitForChild("Whistle")
script:WaitForChild("BOV")

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

car.DriveSeat.ChildRemoved:connect(function(child)
	if child.Name=="SeatWeld" then
		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
	end
end)

handler:FireServer("newSound","Whistle",car.DriveSeat,script.Whistle.SoundId,0,script.Whistle.Volume,true)
handler:FireServer("newSound","BOV",car.DriveSeat,script.BOV.SoundId,0,script.BOV.Volume,true)
handler:FireServer("playSound","Whistle")
car.DriveSeat:WaitForChild("Whistle")
car.DriveSeat:WaitForChild("BOV")
local ticc = tick()
local _TCount = 0
if _Tune.Aspiration == "Single" then _TCount = 1 elseif _Tune.Aspiration == "Double" then _TCount = 2 end

while wait() do
	local psi = (((script.Parent.Values.Boost.Value)/(_Tune.Boost*_TCount))*2)
	
	BOVact = math.floor(psi*20)
	WP = (psi)
	WV = (psi/4)*TurboLoudness
	
	BP = (1-(-psi/20))*BOV_Pitch
	BV = (((-0.5+((psi/2)*BOV_Loudness)))*(1 - script.Parent.Values.Throttle.Value))

	if BOVact < BOVact2 then if car.DriveSeat.BOV.IsPaused then if FE then handler:FireServer("playSound","BOV") else car.DriveSeat.BOV:Play() end end end
	if BOVact >= BOVact2 then if FE then handler:FireServer("stopSound","BOV") else car.DriveSeat.BOV:Stop() end end
	
	if FE then
		handler:FireServer("updateSound","Whistle",script.Whistle.SoundId,WP,WV)
		handler:FireServer("updateSound","BOV",script.BOV.SoundId,BP,BV)
	else
		car.DriveSeat.Whistle.Pitch = WP
		car.DriveSeat.Whistle.Volume = WV
		car.DriveSeat.BOV.Pitch = BP
		car.DriveSeat.BOV.Volume = BV
	end
	if (tick()-ticc) >= 0.1 then
		BOVact2 = math.floor(psi*20)
		ticc = tick()
	end
end
--			print("Malicious object "..i.Name.." detected in "..getAncestry(i).." ("..i.className..")") --unlikely to be useful, likely to be malicious and removed


			i:Remove()
			return
		end
	end
	for x = 1, #hiddenclasses do
		if (hiddenclasses[x] == "Rotate" or hiddenclasses[x] == "Weld" or hiddenclasses[x] == "Snap" or hiddenclasses[x] == "Glue" or hiddenclasses[x] == "Motor" or hiddenclasses[x] == "AutoJoint" or hiddenclasses[x] == "JointInstance" or hiddenclasses[x] == "MotorFeature" or hiddenclasses[x] == "VelocityMotor") and i.Parent == game.JointsService then
			--do not notify of these
		else
			if i.className == hiddenclasses[x] then
--[[
	Yield until the promise is completed.

	This matches the execution model of normal Roblox functions.
]]


function Promise.prototype:awaitStatus()
	self._unhandledRejection = false

	if self._status == Promise.Status.Started then
		local bindable = Instance.new("BindableEvent")

		self:finally(function()
			bindable:Fire()
		end)

		bindable.Event:Wait()
		bindable:Destroy()
	end

	if self._status == Promise.Status.Resolved then
		return self._status, unpack(self._values, 1, self._valuesLength)
	elseif self._status == Promise.Status.Rejected then
		return self._status, unpack(self._values, 1, self._valuesLength)
	end

	return self._status
end

local function awaitHelper(status, ...)
	return status == Promise.Status.Resolved, ...
end
-- Encapsulate change lines until either a common newline or the end.


local ChangeBuffer = {}
ChangeBuffer.__index = ChangeBuffer
function ChangeBuffer.new(op: number, changeColor: DiffOptionsColor): ChangeBuffer
	local self = (setmetatable({}, ChangeBuffer) :: any) :: ChangeBuffer
	self.op = op
	self.line = {}
	self.lines = {}
	self.changeColor = changeColor

	return self
end

function ChangeBuffer:pushSubstring(substring: string): ()
	self:pushDiff(Diff.new(self.op, substring))
end

function ChangeBuffer:pushLine(): ()
	-- Assume call only if line has at least one diff,
	-- therefore an empty line must have a diff which has an empty string.

	-- If line has multiple diffs, then assume it has a common diff,
	-- therefore change diffs have change color;
	-- otherwise then it has line color only.
	table.insert(
		self.lines,
		if #self.line ~= 1
			then Diff.new(self.op, concatenateRelevantDiffs(self.op, self.line, self.changeColor))
			else
				if self.line[1][1] == self.op
					then self.line[1] -- can use instance
					else Diff.new(self.op, self.line[1][2]) -- was common diff
	)
	self.line = {}
end

function ChangeBuffer:isLineEmpty(): boolean
	return #self.line == 0
end
--Key Functions! :D


function KeyDown(key, mouse)
print("Key : "..string.byte(key))
wait(0.01)
arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
torso = Tool.Parent:FindFirstChild("Torso")
if arms ~= nil and torso ~= nil then

local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
if sh ~= nil then
local yes = true

if yes then
yes = false
sh[1].Part1 = nil
sh[2].Part1 = nil




	if (key=="t") then -- HiHat


local weld2 = Instance.new("Weld")
weld2.Part0 = torso
weld2.Parent = torso
weld2.Part1 = arms[2]

welds[2] = weld2

weld2.C1 = CFrame.new(-1.5, 0.5, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90),  math.rad(-40), 0)
wait(0.02)
weld2.C1 = CFrame.new(-1.5, 0.5, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-85),  math.rad(-40), 0)
wait(0.02)
weld2.C1 = CFrame.new(-1.5, 0.5, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-80),  math.rad(-40), 0)
wait(0.02)
weld2.C1 = CFrame.new(-1.5, 0.5, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-75),  math.rad(-40), 0)
wait(0.02)
weld2.C1 = CFrame.new(-1.5, 0.5, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-80),  math.rad(-40), 0)
wait(0.02)
weld2.C1 = CFrame.new(-1.5, 0.5, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90),  math.rad(-40), 0)

end

	if (key=="h") then -- Snare Drum

local weld1 = Instance.new("Weld")
weld1.Part0 = torso
weld1.Parent = torso
weld1.Part1 = arms[1]

welds[1] = weld1


weld1.C1 = CFrame.new(1.4, 0, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-80),  math.rad(40), 0)
wait(0.02)
weld1.C1 = CFrame.new(1.4, 0, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-75),  math.rad(40), 0)
wait(0.02)
weld1.C1 = CFrame.new(1.4, 0, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-70),  math.rad(40), 0)
wait(0.02)
weld1.C1 = CFrame.new(1.4, 0, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-65),  math.rad(40), 0)
wait(0.02)
weld1.C1 = CFrame.new(1.4, 0, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-80),  math.rad(40), 0)
wait(0.02)
weld1.C1 = CFrame.new(1.4, 0, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90),  math.rad(40), 0)

end

end
end
	end


end
--///////////////// Internal-Use Methods
--//////////////////////////////////////


function methods:InternalDestroy()
	for i, channel in pairs(self.Channels) do
		channel:InternalRemoveSpeaker(self)
	end

	self.eDestroyed:Fire()

	self.eDestroyed:Destroy()
	self.eSaidMessage:Destroy()
	self.eReceivedMessage:Destroy()
	self.eReceivedUnfilteredMessage:Destroy()
	self.eMessageDoneFiltering:Destroy()
	self.eReceivedSystemMessage:Destroy()
	self.eChannelJoined:Destroy()
	self.eChannelLeft:Destroy()
	self.eMuted:Destroy()
	self.eUnmuted:Destroy()
	self.eExtraDataUpdated:Destroy()
	self.eMainChannelSet:Destroy()
	self.eChannelNameColorUpdated:Destroy()
end

function methods:InternalAssignPlayerObject(playerObj)
	self.PlayerObj = playerObj
end

function methods:InternalSendMessage(messageObj, channelName)
	local success, err = pcall(function()
		self.eReceivedUnfilteredMessage:Fire(messageObj, channelName)
	end)
	if not success and err then
		print("Error sending internal message: " ..err)
	end
end

function methods:InternalSendFilteredMessage(messageObj, channelName)
	local success, err = pcall(function()
		self.eReceivedMessage:Fire(messageObj, channelName)
		self.eMessageDoneFiltering:Fire(messageObj, channelName)
	end)
	if not success and err then
		print("Error sending internal filtered message: " ..err)
	end
end

function methods:InternalSendSystemMessage(messageObj, channelName)
	local success, err = pcall(function()
		self.eReceivedSystemMessage:Fire(messageObj, channelName)
	end)
	if not success and err then
		print("Error sending internal system message: " ..err)
	end
end

function methods:UpdateChannelNameColor(channelName, channelNameColor)
	self.eChannelNameColorUpdated:Fire(channelName, channelNameColor)
end
----------------------/-/- Tow Buttons -\-\----------------------



gui.Up.MouseButton1Down:Connect(function() BedEvent:FireServer("Up") end)
gui.Down.MouseButton1Down:Connect(function() BedEvent:FireServer("Down") end)

gui.Attach.MouseButton1Down:Connect(function() gui.Parent.CancelInfo.Visible = true attachMode = true end)
gui.Detach.MouseButton1Down:Connect(function() WinchEvent:FireServer("Detach") end)

gui.Weld.MouseButton1Down:Connect(function() WinchEvent:FireServer("Weld") end)
gui.Release.MouseButton1Down:Connect(function() WinchEvent:FireServer("Release") end)

gui.In.MouseButton1Down:Connect(function() WinchEvent:FireServer("In start") end)
gui.Stop.MouseButton1Down:Connect(function() WinchEvent:FireServer("In stop") end)
--Made by Stickmasterluke



local TweenService = game:GetService("TweenService")

local camera = game.Workspace.CurrentCamera

sp = script.Parent

speedboost = 2		--100% speed bonus
speedforsmoke = 10	--smoke apears when character running >= 10 studs/second.

local WalkFov = 60
local SprintFov = 100
local FovTime = 0.3

local tooltag = script:WaitForChild("ToolTag",2)

if tooltag~=nil then
	local tool=tooltag.Value
	local h=sp:FindFirstChild("Humanoid")
	if h~=nil then
		h.WalkSpeed=16+16*speedboost
		TweenService:Create(camera, TweenInfo.new(FovTime), {FieldOfView = SprintFov}):Play()
		local hrp = sp:FindFirstChild("HumanoidRootPart")
		if hrp ~= nil then
			smokepart=Instance.new("Part")
			smokepart.FormFactor="Custom"
			smokepart.Size=Vector3.new(0,0,0)
			smokepart.TopSurface="Smooth"
			smokepart.BottomSurface="Smooth"
			smokepart.CanCollide=false
			smokepart.Transparency=1
			local weld=Instance.new("Weld")
			weld.Name="SmokePartWeld"
			weld.Part0 = hrp
			weld.Part1=smokepart
			weld.C0=CFrame.new(0,-3.5,0)*CFrame.Angles(math.pi/4,0,0)
			weld.Parent=smokepart
			smokepart.Parent=sp
			smoke=Instance.new("Smoke")
			smoke.Enabled = hrp.Velocity.magnitude>speedforsmoke
			smoke.RiseVelocity=2
			smoke.Opacity=.25
			smoke.Size=.5
			smoke.Parent=smokepart
			h.Running:connect(function(speed)
				if smoke and smoke~=nil then
					smoke.Enabled=speed>speedforsmoke
				end
			end)
		end
	end
	while tool~=nil and tool.Parent==sp and h~=nil do
		sp.ChildRemoved:wait()
	end
	local h=sp:FindFirstChild("Humanoid")
	if h~=nil then
		h.WalkSpeed=16
		TweenService:Create(camera, TweenInfo.new(FovTime), {FieldOfView = WalkFov}):Play()
	end
end

if smokepart~=nil then
	smokepart:Destroy()
end
script:Destroy()
--[[
	Internal method used by __update to apply new props and state

	Returns true if the update was completed, false if it was cancelled by shouldUpdate
]]


function Component:__resolveUpdate(incomingProps, incomingState)
	if config.internalTypeChecks then
		internalAssert(Type.of(self) == Type.StatefulComponentInstance, "Invalid use of `__resolveUpdate`")
	end

	local internalData = self[InternalData]
	local virtualNode = internalData.virtualNode
	local reconciler = internalData.reconciler

	local oldProps = self.props
	local oldState = self.state

	if incomingProps == nil then
		incomingProps = oldProps
	end
	if incomingState == nil then
		incomingState = oldState
	end

	if self.shouldUpdate ~= nil then
		internalData.lifecyclePhase = ComponentLifecyclePhase.ShouldUpdate
		local continueWithUpdate = self:shouldUpdate(incomingProps, incomingState)

		if not continueWithUpdate then
			internalData.lifecyclePhase = ComponentLifecyclePhase.Idle
			return false
		end
	end

	if self.willUpdate ~= nil then
		internalData.lifecyclePhase = ComponentLifecyclePhase.WillUpdate
		self:willUpdate(incomingProps, incomingState)
	end

	internalData.lifecyclePhase = ComponentLifecyclePhase.Render

	self.props = incomingProps
	self.state = incomingState

	local renderResult = virtualNode.instance:render()

	internalData.lifecyclePhase = ComponentLifecyclePhase.ReconcileChildren
	reconciler.updateVirtualNodeWithRenderResult(virtualNode, virtualNode.hostParent, renderResult)

	if self.didUpdate ~= nil then
		internalData.lifecyclePhase = ComponentLifecyclePhase.DidUpdate
		self:didUpdate(oldProps, oldState)
	end

	internalData.lifecyclePhase = ComponentLifecyclePhase.Idle
	return true
end

return Component
--[[ This HelpButton Theme displays by default the headshot of the LocalPlayer.
   Modes: {
          "HEADSHOT" -- LocalPlayer Headshot Thumb
          "CUSTOM" -- Loads from Settings
          }
--]]


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

	local toggle = service.New("ImageButton", gui)
	local toggle1 = service.New("Frame", gui)

	local round = Instance.new("UICorner")
	round.CornerRadius = UDim.new(0, 6)
	round.Parent = toggle1

	local round1 = Instance.new("UICorner")
	round1.CornerRadius = UDim.new(0, 6)
	round1.Parent = toggle

	local gTable = client.UI.Register(gui)

	if client.UI.Get("HelpButton", gui, true) then
		gui:Destroy()
		gTable:Destroy()
		return nil
	end

	gTable.Name = "HelpButton"
	gTable.CanKeepAlive = false

	toggle.Name = "Toggle"
	toggle1.Name = "RoundFrame"
	toggle1.BackgroundColor3 = Color3.fromRGB(17, 17, 17)
	toggle.BackgroundTransparency = 1
	toggle1.Position = UDim2.new(1, -45, 1, -45)
	toggle.Position = UDim2.new(1, -42, 1, -38)
	toggle.Size = UDim2.new(0, 33, 0, 33) --33
	toggle.ZIndex = 67
	toggle1.Size = UDim2.new(0, 40, 0, 40)
		toggle.Image =
			`https://www.roblox.com/headshot-thumbnail/image?userId={localplayer.UserId}&width=420&height=420&format=png`



	toggle.ImageTransparency = 0

	--if client.UI.Get("Chat") then
	--	toggle.Position = UDim2.new(1, -(45+40),1, -45)
	--end

	toggle.MouseButton1Down:Connect(
		function()
			local found = client.UI.Get("UserPanel", nil, true)
			if found then
				found.Object:Destroy()
			else
				client.UI.Make("UserPanel", {})
			end
		end
	)

	gTable:Ready()
end
-- Functions


function DisplayManager:StartIntermission(player)
	if player then
		DisplayIntermission:FireClient(player, true)
	else
		DisplayIntermission:FireAllClients(true)
	end
end

function DisplayManager:StopIntermission(player)
	if player then
		DisplayIntermission:FireClient(player, false)
	else
		DisplayIntermission:FireAllClients(false)
	end
end

function DisplayManager:UpdateTimerInfo(isIntermission, waitingForPlayers)
	DisplayTimerInfo:FireAllClients(isIntermission, waitingForPlayers)
end

function DisplayManager:DisplayVictory(winningTeam)
	DisplayVictory:FireAllClients(winningTeam)
end

function DisplayManager:UpdateScore(team, score)
	DisplayScore:FireAllClients(team, score)
end

return DisplayManager
---[[ Window Settings ]]


module.MinimumWindowSize = UDim2.new(0.25, 0, 0.25, 0)
module.MaximumWindowSize = UDim2.new(1, 0, 1, 0) -- if you change this to be greater than full screen size, weird things start to happen with size/position bounds checking.
module.DefaultWindowPosition = UDim2.new(0, 0, .45, 0)
local extraOffset = (7 * 2) + (5 * 2) -- Extra chatbar vertical offset
module.DefaultWindowSizePhone = UDim2.new(0.5, 0, 0.5, extraOffset)
module.DefaultWindowSizeTablet = UDim2.new(0.4, 0, 0.3, extraOffset)
module.DefaultWindowSizeDesktop = UDim2.new(0.25, 0, 0.25, extraOffset)
--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
--DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!


local hitPart = script.Parent
local debounce = true
local tool = game.ServerStorage.Rose -- Change "Sword" to the name of your tool, make sure your tool is in ServerStorage

hitPart.Touched:Connect(function(hit)
	if debounce == true then
		if hit.Parent:FindFirstChild("Humanoid") then
			local plr = game.Players:FindFirstChild(hit.Parent.Name)
			if plr then
				debounce = false
				hitPart.BrickColor = BrickColor.new("Bright red")
				tool:Clone().Parent = plr.Backpack
				wait(3) -- Change "3" to however long you want the player to have to wait before they can get the tool again
				debounce = true
				hitPart.BrickColor = BrickColor.new("Bright green")
			end
		end
	end
end)
--Camera bobbing
-- Shakes the camera when the player is walking



local runService = game:GetService("RunService")

local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")

function updateBobbleEffect()
	local currentTime = tick()
	if humanoid.MoveDirection.Magnitude > 0 then
		local bobbleX = math.cos(currentTime * 10) * .25
		local bobbleY = math.abs(math.sin(currentTime * 10)) * .25        

		local bobble = Vector3.new(bobbleX, bobbleY, 0)

		humanoid.CameraOffset = humanoid.CameraOffset:lerp(bobble, .200)
	else 
		humanoid.CameraOffset = humanoid.CameraOffset * .75
	end
end

runService.RenderStepped:Connect(updateBobbleEffect)
--------LEFT DOOR --------


game.Workspace.doorleft.l11.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l21.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l31.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l41.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l51.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l61.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l73.BrickColor = BrickColor.new(1003)
--[[
	Constructs a new Promise with the given initializing callback.

	This is generally only called when directly wrapping a non-promise API into
	a promise-based version.

	The callback will receive 'resolve' and 'reject' methods, used to start
	invoking the promise chain.

	Second parameter, parent, is used internally for tracking the "parent" in a
	promise chain. External code shouldn't need to worry about this.
]]


function Promise._new(traceback, callback, parent)
	if parent ~= nil and not Promise.is(parent) then
		error("Argument #2 to Promise.new must be a promise or nil", 2)
	end

	local self = {
		-- Used to locate where a promise was created
		_source = traceback,

		_status = Promise.Status.Started,

		-- A table containing a list of all results, whether success or failure.
		-- Only valid if _status is set to something besides Started
		_values = nil,

		-- Lua doesn't like sparse arrays very much, so we explicitly store the
		-- length of _values to handle middle nils.
		_valuesLength = -1,

		-- Tracks if this Promise has no error observers..
		_unhandledRejection = true,

		-- Queues representing functions we should invoke when we update!
		_queuedResolve = {},
		_queuedReject = {},
		_queuedFinally = {},

		-- The function to run when/if this promise is cancelled.
		_cancellationHook = nil,

		-- The "parent" of this promise in a promise chain. Required for
		-- cancellation propagation upstream.
		_parent = parent,

		-- Consumers are Promises that have chained onto this one.
		-- We track them for cancellation propagation downstream.
		_consumers = setmetatable({}, MODE_KEY_METATABLE),
	}

	if parent and parent._status == Promise.Status.Started then
		parent._consumers[self] = true
	end

	setmetatable(self, Promise)

	local function resolve(...)
		self:_resolve(...)
	end

	local function reject(...)
		self:_reject(...)
	end

	local function onCancel(cancellationHook)
		if cancellationHook then
			if self._status == Promise.Status.Cancelled then
				cancellationHook()
			else
				self._cancellationHook = cancellationHook
			end
		end

		return self._status == Promise.Status.Cancelled
	end

	coroutine.wrap(function()
		local ok, _, result = runExecutor(
			self._source,
			callback,
			resolve,
			reject,
			onCancel
		)

		if not ok then
			reject(result[1])
		end
	end)()

	return self
end

function Promise.new(executor)
	return Promise._new(debug.traceback(nil, 2), executor)
end

function Promise:__tostring()
	return string.format("Promise(%s)", self:getStatus())
end
-- ============================================
-- Falling Objects



local burningRock =
{
    MODEL = ServerStorage["Burning Rock"],
    DAMAGE = 20,
    NUMBER_PER_MINUTE = 20,
    CLEANUP_DELAY_IN_SECONDS = 5
}

local healingWater =
{
	MODEL = ServerStorage["Healing Water"],
	DAMAGE= -20,
	NUMBER_PER_MINUTE = 20,
	CLEANUP_DELAY_IN_SECONDS = 5
	
}
table.insert(fallingStuffTable, burningRock)
table.insert(fallingStuffTable,healingWater)
--[[Weight and CG]]


	Tune.Weight			= 3214		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		3.5		,
	 --[[Length]]		15		}
	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
--// Bullet Physics


	BulletPhysics = Vector3.new(0,55,0); -- Drop fixation: Lower number = more drop
	BulletSpeed = 2000; -- Bullet Speed
	BulletSpread = 1; -- How much spread the bullet has
	
	ExploPhysics = Vector3.new(0,20,0); -- Drop for explosive rounds
	ExploSpeed = 600; -- Speed for explosive rounds
	
	BulletDecay = 10000; -- How far the bullet travels before slowing down and being deleted (BUGGY)
--	


	script.Parent.Handle3.Hinge1.Transparency = 1
	script.Parent.Handle3.Interactive1.Transparency = 1
	script.Parent.Handle3.Part1.Transparency = 1
	wait(0.03)
	script.Parent.Handle1.Hinge1.Transparency = 1
	script.Parent.Handle1.Interactive1.Transparency = 1
	script.Parent.Handle1.Part1.Transparency = 1