Pinkstack/roblox-luau-corpus-text huggingface dataset:
--Loop For Making Rays For The Bullet's Trajectory


for i = 1, 30 do
	local thisOffset = offset + Vector3.new(0, yOffset*(i-1), 0)
	local travelRay = Ray.new(point1,thisOffset)
	local hit, position = workspace:FindPartOnRay(travelRay, parts.Parent)

	local distance 		= (position - point1).magnitude
	round.Size				= Vector3.new(.6, distance, .6)
	round.CFrame			= CFrame.new(position, point1)
								* CFrame.new(0, 0, -distance/2)
								* CFrame.Angles(math.rad(90),0,0)
	round.Parent			= workspace
	point1					= point1 + thisOffset
	
	

	if hit then
		round:remove()
		local e = Instance.new("Explosion")
		e.BlastRadius = 5
		e.BlastPressure = 0
		e.Position = position
		e.Parent = workspace
		e.DestroyJointRadiusPercent = 0
		
		

			if hit and hit.Parent then
		if hit.Parent:FindFirstChild("Humanoid") then
			return hit.Parent.Humanoid
		elseif hit.Parent.Parent:FindFirstChild("Humanoid") then
			return hit.Parent.Parent.Humanoid
		
		elseif (hit.Parent.Name ==  "Hull") or (hit.Parent.Name ==  "Turret") or (hit.Parent.Name ==  "Gun") or (hit.Parent.Name ==  "Parts") then
			print("You Have Damaged a Vehicle")
			local HitSound = hit.Parent:findFirstChild("Pen"):Clone()
			HitSound.Parent = hit
			HitSound:Play()
			hit.Parent.Parent:findFirstChild("Damage").Value = hit.Parent.Parent:findFirstChild("Damage").Value - dealingdamage
			if hit.Parent.Parent:findFirstChild("Damage").Value<1 and hit.Parent.Parent:findFirstChild("Destroyed").Value == false then
				
			local DestroyScript = hit.Parent.Parent:findFirstChild("DestroyScript"):clone()
			DestroyScript.Parent = hit.Parent.Parent
			DestroyScript.Disabled = false		
		
			print("Vehicle Disabled")
		
		
			end

		elseif hit.Name == "Left Arm" or hit.Name == "Left Leg" or hit.Name == "Right Arm" or hit.Name == "Right Leg" or hit.Name == "Torso" or hit.Name == "HumanoidRootPart" then
			hit.Parent:findFirstChild("Humanoid").Health = hit.Parent:findFirstChild("Humanoid").Health - dealingdamage
			print("Direct Hit a Player lmao")
			
		elseif hit.Parent.Name == "Face" then
			hit.Parent.Parent:findFirstChild("Humanoid").Health = hit.Parent.Parent:findFirstChild("Humanoid").Health - dealingdamage
			print("Direct Hit a Morph of a Player lmao")
			
				
			
		end
		end

		

		local players = game.Players:getChildren()
		for i = 1, #players do
		
			
			-- if players[i].TeamColor ~= script.Parent.Parent.Tank.Value then --if he's not an ally
				character = players[i].Character
				torso = character:findFirstChild'Torso'
				if character and torso then
						
						torsoPos = torso.Position
						origPos = round.Position
						
						local ray = Ray.new(origPos, torsoPos-origPos)
						local hit, position = game.Workspace:FindPartOnRayWithIgnoreList(ray,ignoreList)
						if hit then
							if hit.Parent == character then
								human = hit.Parent:findFirstChild("Humanoid")
								human2 = hit.Parent.Parent:findFirstChild("Humanoid")
								if human then
									distance = (position-origPos).magnitude
--[ Hooks ]--
-- Controls


Mouse.KeyDown:connect(function(Key)
	if (Hold ~= nil) then return end
	if (string.upper(Key) ~= "C") and (string.lower(Key) ~= " ") then return end
	Hold = true

	if (Torso:FindFirstChild("LegWeld") == nil) and (string.lower(Key) ~= " ") then
		-- Right Leg
		RH.Part1 = nil
		CreateWeld(RL, CFrame.new(-0.5, 0.495, 1.25)* CFrame.Angles(math.rad(90), 0, 0))

		-- Left Leg
		LH.Part1 = nil
		CreateWeld(LL, CFrame.new(0.5, 0.495, 1.25) * CFrame.Angles(math.rad(90), 0, 0))
		
		-- Lower Character
		RJ.C0 = CFrame.new(0, -1.25, 0) * CFrame.Angles(0, 0, 0)
		RJ.C1 = CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
		
		-- Slow Walk Speed
		Humanoid.WalkSpeed = 5
	else
		StandUp()

		-- Normal Walk Speed
		Humanoid.WalkSpeed = 16
	end

	wait(0.5)

	Hold = nil
end)

Mouse.KeyUp:connect(function(Key)
	if (Hold ~= nil) then return end
	if (string.upper(Key) ~= "C") or (HoldKey.Value == false) then return end
	Hold = true

	StandUp()

	-- Normal Walk Speed
	Humanoid.WalkSpeed = 16

	wait(0.5)

	Hold = nil
end)
--[[
	Get the afterAll hooks from the current level.
]]


function LifecycleHooks:getAfterAllHooks()
	return self._stack[#self._stack][TestEnum.NodeType.AfterAll]
end

function LifecycleHooks:_getHooksOfType(nodes, key)
	local hooks = {}

	for _, node in ipairs(nodes) do
		if node.type == key then
			table.insert(hooks, node.callback)
		end
	end

	return hooks
end

return LifecycleHooks
-- Player's tank GUI


GUI = script.Parent.Parent.Parent.PlayerGui.TankGUI;
GUI.HP.Hitpoints.Text = parts.Parent:findFirstChild("Damage").Value

local Hull = parts.Parent:findFirstChild("Damage")

if Hull.Value<0 then
	GUI.HP.Hitpoints.Text = "DISABLED"
end

	
local MGDamage = math.random(35,45)


braking = false;
firingMg = false;
reloading = false;
currRound = tankStats.Round; -- Current loaded ammo (AP/HE)


myMouse = nil;

function updateAmmo()
	GUI.Ammo.Text = "Cannon Ammo = " .. tankStats[tankStats.Round.Value .. "Ammo"].Value;
	GUI.MG_Ammo.Text = tankStats.MGAmmo.Value;
	GUI.HP.Hitpoints.Text = parts.Parent:findFirstChild("Damage").Value
end


function Brakes()
	for i = 1, 5 do
	parts.Engine.BodyVelocity.Velocity = Vector3.new(0,0,0)
	print("Brakes activated")
	end
end
--Private functions


local function IsInFrame(v)

	local X = Mouse.X
	local Y = Mouse.Y

	if X>v.AbsolutePosition.X and Y>v.AbsolutePosition.Y and X<v.AbsolutePosition.X+v.AbsoluteSize.X and Y<v.AbsolutePosition.Y+v.AbsoluteSize.Y then
		return true
	else 
		return false
	end
end

local function CheckMouseExited(Object)

	if not Object.MouseIsInFrame and Object.MouseWasIn then --Mouse was previously over object, fire leave event
		Object.MouseWasIn = false
		Object.LeaveEvent:Fire()
	end
end


local function CheckMouseEntered(Object)
	if Object.MouseIsInFrame and not Object.MouseWasIn then
		Object.MouseWasIn = true
		Object.EnteredEvent:Fire()
	end
end

game:GetService("RunService").Heartbeat:Connect(function()
	--Check each UI object
	--All exit events fire before all enter events for ease of use, so check for mouse exit events here
	for _, Object in pairs(CurrentItems) do
		Object.MouseIsInFrame = IsInFrame(Object.UIObj)
		CheckMouseExited(Object)
	end

	--Now check if the mouse entered any frames
	for _, Object in pairs(CurrentItems) do
		CheckMouseEntered(Object)
	end
end)
-------- OMG HAX



r = game:service("RunService")


local damage = 16


local slash_damage = 28

sword = script.Parent.Handle
Tool = script.Parent


local SlashSound = Instance.new("Sound")
SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
SlashSound.Parent = sword
SlashSound.Volume = .7

local UnsheathSound = Instance.new("Sound")
UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav"
UnsheathSound.Parent = sword
UnsheathSound.Volume = 1



function blow(hit)
	local humanoid = hit.Parent:findFirstChild("Humanoid")
	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)
	local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
	if humanoid~=nil and humanoid ~= hum and hum ~= nil then
		print("SWORD HIT")
		tagHumanoid(humanoid, vPlayer)
		humanoid:TakeDamage(damage)
		wait(1)
		untagHumanoid(humanoid)
	end
end


function tagHumanoid(humanoid, player)
	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = player
	creator_tag.Name = "creator"
	creator_tag.Parent = humanoid
end

function untagHumanoid(humanoid)
	if humanoid ~= nil then
		local tag = humanoid:findFirstChild("creator")
		if tag ~= nil then
			tag.Parent = nil
		end
	end
end


function attack()
	damage = slash_damage
	SlashSound:play()
	local anim = Instance.new("StringValue")
	anim.Name = "toolanim"
	anim.Value = "Slash"
	anim.Parent = Tool
end


function swordUp()
	Tool.GripForward = Vector3.new(-1.1,0,0)
	Tool.GripRight = Vector3.new(0,1,0)
	Tool.GripUp = Vector3.new(0,0,1)
end

function swordOut()
	Tool.GripForward = Vector3.new(0,0,1)
	Tool.GripRight = Vector3.new(0,-1,0)
	Tool.GripUp = Vector3.new(-1,0,0)
end

function swordAcross()
	-- parry
end


Tool.Enabled = true
local last_attack = 0
function onActivated()

	if not Tool.Enabled then
		return
	end

	Tool.Enabled = false

	local character = Tool.Parent;
	local humanoid = character.Humanoid
	if humanoid == nil then
		print("Humanoid not found")
		return 
	end

	t = r.Stepped:wait()
	attack()
	last_attack = t

	--wait(.5)

	Tool.Enabled = true
end


function onEquipped()
	UnsheathSound:play()
end


script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)


connection = sword.Touched:connect(blow)
-- If you want to know how to retexture a hat, read this:  http://www.roblox.com/Forum/ShowPost.aspx?PostID=10502388










debounce = true

function onTouched(hit)
	if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
		debounce = false
		h = Instance.new("Hat")
		p = Instance.new("Part")
		h.Name = "Hat"   -- It doesn't make a difference, but if you want to make your place in Explorer neater, change this to the name of your hat.
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle" 
		p.formFactor = 0
		p.Size = Vector3.new(-0,-0,-1) 
		p.BottomSurface = 0 
		p.TopSurface = 0 
		p.Locked = true 
		script.Parent.Mesh:clone().Parent = p
		h.Parent = hit.Parent
		h.AttachmentPos = Vector3.new(0,0.1,0) -- Change these to change the positiones of your hat, as I said earlier.
		wait(5)		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)
--	for _, v in pairs(ClassZombie:SetWaypoints(game.Workspace.Pad.Position)) do
--		v.Touched:Connect(function(hit)
--			if hit.Name == "TurnPads" and hit.Open.Value then
--				ClassZombie:MoveTo(hit)
--				v:Destroy()
--				hit.Open.Value = false
--			end
--		end)
--	end
--end
--[[
	A common interface for accessing the values of state objects or constants.
]]



local Package = script.Parent.Parent
local PubTypes = require(Package.PubTypes)
local xtypeof = require(Package.Utility.xtypeof)

local function unwrap<T>(item: PubTypes.CanBeState<T>, useDependency: boolean?): T
	return if xtypeof(item) == "State" then (item :: PubTypes.StateObject<T>):get(useDependency) else (item :: T)
end

return unwrap
-- OFFSET HANDLERS


local alignmentDetails = {}
alignmentDetails["left"] = {
	startScale = 0,
	getOffset = function()
		local offset = 48 + IconController.leftOffset
		if checkTopbarEnabled() and starterGui:GetCoreGuiEnabled("Chat") then
			offset += 12 + 32
		end
		return offset
	end,
	getStartOffset = function()
		local alignmentGap = IconController["leftGap"]
		local startOffset = alignmentDetails.left.getOffset() + alignmentGap
		return startOffset
	end,
	records = {},
}
alignmentDetails["mid"] = {
	startScale = 0.5,
	getOffset = function()
		return 0
	end,
	getStartOffset = function(totalIconX)
		local alignmentGap = IconController["midGap"]
		return -totalIconX / 2 + (alignmentGap / 2)
	end,
	records = {},
}
alignmentDetails["right"] = {
	startScale = 1,
	getOffset = function()
		local offset = IconController.rightOffset
		if
			checkTopbarEnabled()
			and (
				starterGui:GetCoreGuiEnabled(Enum.CoreGuiType.PlayerList)
				or starterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Backpack)
				or starterGui:GetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu)
			)
		then
			offset += 48
		end
		return offset
	end,
	getStartOffset = function(totalIconX)
		local startOffset = -totalIconX - alignmentDetails.right.getOffset()
		return startOffset
	end,
	records = {},
	--reverseSort = true
}
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]




local autoscaling	= true					--Estimates top speed

local UNITS	= {								--Click on speed to change units
											--First unit is default	
	{
		units			= "KM/H"				,
		scaling			= (10/12) * (60/88)	, -- 1 stud : 10 inches | ft/s to MPH
		maxSpeed		= 100				,
		spInc			= 10				, -- Increment between labelled notches
	},
	
	{
		units			= "MPH"			,
		scaling			= (10/12) * 1.09728	, -- 1 stud : 10 inches | ft/s to KP/H
		maxSpeed		= 80				,
		spInc			= 20				, -- Increment between labelled notches
	},
	
	{
		units			= "SPS"				,
		scaling			= 1					, -- Roblox standard
		maxSpeed		= 240				,
		spInc			= 20				, -- Increment between labelled notches
	}
}
--[[
	Spawns a new thread without waiting one step
	
	Args:
		Function callback,
		Vararg ...
--]]


local Instance_new = Instance.new
local BaseEvent = Instance_new'BindableEvent'
local Signal_connect = BaseEvent.Event.connect
local Event_Fire = BaseEvent.Fire
local Event_Destroy = BaseEvent.Destroy

return function(callback, ...)
	local event = Instance_new'BindableEvent'
	
	--event.Event:connect(callback)
	Signal_connect(event.Event, callback)
	
	--event:Fire(...)
	Event_Fire(event, ...)
	
	--event:Destroy()
	Event_Destroy(event)
end
-- -- -- -- -- -- --
--DIRECTION SCROLL--
-- -- -- -- -- -- --


This.Direction.Rotation = 0
This.Floor.Position = UDim2.new(0.125,0,0.5,0)
This.Floor.Size = UDim2.new(0.75,0,0.5,0)
This.Direction.LineHeight = 0.5
This.Direction.TextScaled = false
This.Direction.Text = "^"
wait(0.25)
This.Direction.Text = "^\nI"
wait(0.25)
This.Direction.Text = "^\nI\nI"
wait(0.25)
This.Direction.Rotation = -180
This.Direction.Text = "^"
wait(0.25)
This.Direction.Text = "^\nI"
wait(0.25)
This.Direction.Text = "^\nI\nI"
wait(0.25)
This.Direction.Rotation = 0
This.Direction.LineHeight = 1
This.Direction.TextScaled = true
This.Direction.Text = "SYSTEM READY"
wait(5)
This.Direction.LineHeight = 0.5
This.Floor.Position = UDim2.new(0.125,0,0,0)
This.Floor.Size = UDim2.new(0.75,0,1,0)
This.Direction.Text = ""
This.Direction.TextScaled = false
while wait() do
	if Lift:WaitForChild("Direction").Value ~= 0 then 
		if Lift:WaitForChild("Velocity").Value == 0 then
			if Lift:WaitForChild("Direction").Value == 1 then
				This.Floor.Position = UDim2.new(0.125,0,0.5,0)
				This.Floor.Size = UDim2.new(0.75,0,0.5,0)
				This.Direction.Rotation = 0
				This.Direction.Text = "^\nI\nI"
			else
				This.Floor.Position = UDim2.new(0.125,0,0.5,0)
				This.Floor.Size = UDim2.new(0.75,0,0.5,0)
				This.Direction.Rotation = 180
				This.Direction.Text = "^\nI\nI"
			end
		elseif Lift:WaitForChild("Velocity").Value ~= 0 then
			if Lift:WaitForChild("Direction").Value == 1 then
				This.Floor.Position = UDim2.new(0.125,0,0.5,0)
				This.Floor.Size = UDim2.new(0.75,0,0.5,0)
				This.Direction.Rotation = 0
				This.Direction.Text = "^"
				wait(0.25)
				This.Direction.Text = "^\nI"
				wait(0.25)
				This.Direction.Text = "^\nI\nI"
				wait(0.25)
			else
				This.Floor.Position = UDim2.new(0.125,0,0.5,0)
				This.Floor.Size = UDim2.new(0.75,0,0.5,0)
				This.Direction.Rotation = 180
				This.Direction.Text = "^"
				wait(0.25)
				This.Direction.Text = "^\nI"
				wait(0.25)
				This.Direction.Text = "^\nI\nI"
				wait(0.25)
			end
		end
	else
		This.Floor.Position = UDim2.new(0.125,0,0,0)
		This.Floor.Size = UDim2.new(0.75,0,1,0)
		This.Direction.Text = ""
	end
end
-- function that is called when the user clicks to grab an object:


local function onGrabActivated()
	-- use roblox's built-in Raycasting module to cast a ray out in front of the gun:
	local raycastResult = workspace:Raycast(tipPart.Position, tipPart.Position + (tipPart.CFrame.lookVector * RAY_LENGTH), {gripPart})

	-- check if the raycast collided with an object:
	if (raycastResult) then
tool.Activated:Connect(function()
	-- Get the current mouse target using Raycasting
	local currentTarget = workspace:FindPartOnRay(Ray.new(
		player.Character.HumanoidRootPart.Position,
		(player.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -maxDistance)).Position
		))

	-- Store the selected attachment if it exists
	local attachment = nil
	if currentTarget then
		attachment = currentTarget:FindFirstChild("Attachment")
	end

	-- Apply a force to the selected object
	applyForce(attachment)
end)
-- local BLACKLIST = Set.new({ "env", "mainModule", "_events" })
-- -- ROBLOX FIXME: make proper platform check
-- -- local isWin32 = process.platform == "win32"
-- local isWin32 = false -- UserInputService:GetPlatform() == 0
-- local proto: Record<string, unknown> = Object.getPrototypeOf(process.env)
-- [ SETTINGS ] --



local statsName = "Rebirth" -- Your stats name
local maxItems = 100 -- Max number of items to be displayed on the leaderboard
local minValueDisplay = 1 -- Any numbers lower than this will be excluded
local maxValueDisplay = 10e15 -- (10 ^ 15) Any numbers higher than this will be excluded
local abbreviateValue = true -- The displayed number gets abbreviated to make it "human readable"
local updateEvery = 10 -- (in seconds) How often the leaderboard has to update
local headingColor = Color3.fromRGB(25, 181, 254) -- The background color of the heading
-- assume we are in the character, let's check



function sepuku()
	script.Parent = nil
end

local h = script.Parent:FindFirstChild("Humanoid")

if (h == nil) then sepuku() end

local head = script.Parent:FindFirstChild("Head")

if (head == nil) then sepuku() end

local m = head:FindFirstChild("Mesh")

if (m == nil) then sepuku() end

local oldColor = head.BrickColor
local oldScale = m.Scale

head.BrickColor = BrickColor.Random()

for i=1,10 do
	m.Scale = m.Scale * 1.05
	wait(.1)
end

wait(12)

for i=1,10 do
	m.Scale = m.Scale / 1.05
	wait(.1)
end

m.Scale = oldScale
head.BrickColor = oldColor

script.Parent = nil
-- See if I have a tool


local spawner = script.Parent
local tool = nil
local region = Region3.new(Vector3.new(spawner.Position.X - spawner.Size.X/2, spawner.Position.Y + spawner.Size.Y/2, spawner.Position.Z - spawner.Size.Z/2),
   Vector3.new(spawner.Position.X + spawner.Size.X/2, spawner.Position.Y + 4, spawner.Position.Z + spawner.Size.Z/2))
local parts = game.Workspace:FindPartsInRegion3(region)
for _, part in pairs(parts) do
	if part and part.Parent and part.Parent:IsA("Tool") then
		tool = part.Parent
		break
	end
end

local configTable = spawner.Configurations
local configs = {}
local function loadConfig(configName, defaultValue)
	if configTable:FindFirstChild(configName) then
		configs[configName] = configTable:FindFirstChild(configName).Value
	else
		configs[configName] = defaultValue
	end
end

loadConfig("SpawnCooldown", 100)

if tool then
	tool.Parent = game.ServerStorage
	
	while true do
		-- put tool on pad
		local toolCopy = tool:Clone()
		local handle = toolCopy:FindFirstChild("Handle")
		toolCopy.Parent = game.Workspace
		local toolOnPad = true
		local parentConnection
		parentConnection = toolCopy.AncestryChanged:connect(function()
			if handle then handle.Anchored = false end
			toolOnPad = false
			parentConnection:disconnect()
		end)
		if handle then
			handle.CFrame = (spawner.CFrame + Vector3.new(0,handle.Size.Z/2 + 1,0)) * CFrame.Angles(-math.pi/2,0,0)
			handle.Anchored = true
		end
		-- wait for tool to be removed
		while toolOnPad do 
			if handle then
				handle.CFrame = handle.CFrame * CFrame.Angles(0,0,math.pi/60)
			end
			wait() 
		end
		
		-- wait for cooldown
		wait(configs["SpawnCooldown"])		
	end
	
end
-- background stuff



local function defaultHide(child)
	child.TextTransparency = 2;
	child.BackgroundTransparency = 2;
	child.TextStrokeTransparency = 2;
end;

local function newBackground(child, class)
	local frame = instance("Frame", child);
	frame.Name = "_background";
	frame.Size = udim2(1, 0, 1, 0);
	frame.BackgroundTransparency = child.BackgroundTransparency;
	frame.BackgroundColor3 = child.BackgroundColor3;
	frame.BorderSizePixel = child.BorderSizePixel;
	frame.BorderColor3 = child.BorderColor3;
	frame.ZIndex = child.ZIndex;
	if (class == "TextButton") then
		frame.MouseEnter:connect(function()
			if child.AutoButtonColor then 
				local origin = child.BackgroundColor3;
				frame.BackgroundColor3 = color3(origin.r - 75/255, origin.g - 75/255, origin.b - 75/255); 
			end;
		end);
		child.MouseLeave:connect(function()
			if child.AutoButtonColor then
				frame.BackgroundColor3 = child.BackgroundColor3;
			end;
		end);
	end;
	return frame;
end;
--[[Steering]]


	Tune.SteerInner		= 31		-- Inner wheel steering angle (in degrees)
	Tune.SteerOuter		= 29		-- Outer wheel steering angle (in degrees)
	Tune.SteerSpeed		= .18		-- Steering increment per tick (in degrees)
	Tune.ReturnSpeed	= .15		-- Steering increment per tick (in degrees)
	Tune.SteerDecay		= 320		-- Speed of gradient cutoff (in SPS)
	Tune.MinSteer		= 50 		-- Minimum steering at max steer decay (in percent)
	Tune.MSteerExp		= 1			-- Mouse steering exponential degree
	
	--Steer Gyro Tuning
	Tune.SteerD			= 1000		-- Steering Dampening
	Tune.SteerMaxTorque	= 50000		-- Steering Force
	Tune.SteerP			= 20000	    -- Steering Aggressiveness
--//Shifting//-


if key == "1" then
		 carSeat.Wheels.FR.Spring.Stiffness = 0
 		 carSeat.Wheels.FL.Spring.Stiffness = 0
		 carSeat.Wheels.RR.Spring.Stiffness = 0
		 carSeat.Wheels.RL.Spring.Stiffness = 0
elseif key == "2" then		 
	carSeat.Wheels.FR.Spring.Stiffness = 12000
	carSeat.Wheels.FL.Spring.Stiffness = 12000
	carSeat.Wheels.RR.Spring.Stiffness = 12000
	carSeat.Wheels.RL.Spring.Stiffness = 12000
	end
end)
--[[
	Creates a new promise that receives the result of this promise.
	The given callbacks are invoked depending on that result.
]]


function Promise.prototype:andThen(successHandler, failureHandler)
	self._unhandledRejection = false

	-- Create a new promise to follow this part of the chain
	return Promise.new(function(resolve, reject)
		-- Our default callbacks just pass values onto the next promise.
		-- This lets success and failure cascade correctly!

		local successCallback = resolve
		if successHandler then
			successCallback = createAdvancer(successHandler, resolve, reject)
		end

		local failureCallback = reject
		if failureHandler then
			failureCallback = createAdvancer(failureHandler, resolve, reject)
		end

		if self._status == Promise.Status.Started then
			-- If we haven't resolved yet, put ourselves into the queue
			table.insert(self._queuedResolve, successCallback)
			table.insert(self._queuedReject, failureCallback)
		elseif self._status == Promise.Status.Resolved then
			-- This promise has already resolved! Trigger success immediately.
			successCallback(unpack(self._values, 1, self._valuesLength))
		elseif self._status == Promise.Status.Rejected then
			-- This promise died a terrible death! Trigger failure immediately.
			failureCallback(unpack(self._values, 1, self._valuesLength))
		end
	end)
end