function findHeight(S)local Q=character.HumanoidRootPart local X=Ray.new(Vector3.new(Q.Position.X,Q.Position.Y+50,Q.Position.Z-S),(Vector3.new(0,-1,0)).Unit*300)local y=character local V,Y=game.Workspace:FindPartOnRay(X,y)return Y.Y+40 end function highest(S)local Q=S[1]for X=2,#S,1 do if S[X]>Q then Q=S[X]end end return Q end function fastStart()if started==false then started=true local S=Instance.new("\066\111\100\121\080\111\115\105\116\105\111\110")S.Name="\070\097\115\116\083\116\097\114\116"S.maxForce=Vector3.new(0,15000,0)S.Parent=character.HumanoidRootPart local Q=Instance.new("\066\111\100\121\086\101\108\111\099\105\116\121")Q.maxForce=Vector3.new(0,0,15000)Q.velocity=Vector3.new(0,0,-150)Q.Parent=character.HumanoidRootPart S.position=Vector3.new(0,highest({findHeight(0);findHeight(10);findHeight(20);findHeight(30)}),0)while character.HumanoidRootPart.Position.Z>spawnLocation.Z-1000 do wait(1)if character:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")==nil then break end S.position=Vector3.new(0,highest({findHeight(0);findHeight(10),findHeight(20);findHeight(30)}),0)end Q.velocity=Vector3.new(0,0,0)wait(2)if character:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")then S:Destroy()Q:Destroy()local X=Instance.new("\070\111\114\099\101\070\105\101\108\100")X.Name="\083\104\105\101\108\100"X.Parent=character;(game:GetService("\068\101\098\114\105\115")):AddItem(X,3)end fastStart:Destroy()script:Destroy()end end fastStart()
--Casts a ray to find the height for the character to hover at even if the path is going up or down
function findHeight(distanceInFront)
	local torso = character.HumanoidRootPart
	local ray = Ray.new(
		Vector3.new(torso.Position.X, torso.Position.Y + 50, torso.Position.Z - distanceInFront), -- origin
		(Vector3.new(0, -1, 0)).Unit * 300
	) -- direction
	local ignore = character
	local hit, position = game.Workspace:FindPartOnRay(ray, ignore)
	return position.Y + 40
end

function highest(tableOfValues)
	local highestSoFar = tableOfValues[1]
	for i = 2, #tableOfValues do
		if tableOfValues[i] > highestSoFar then
			highestSoFar = tableOfValues[i]
		end
	end
	return highestSoFar
end

function fastStart()
	if started == false then
		started = true
		local fastStartPosition = Instance.new("BodyPosition")
		fastStartPosition.Name = "FastStart"
		fastStartPosition.maxForce = Vector3.new(0, 15000, 0)
		fastStartPosition.Parent = character.HumanoidRootPart
		local fastStartVelocity = Instance.new("BodyVelocity")
		fastStartVelocity.maxForce = Vector3.new(0, 0, 15000)
		fastStartVelocity.velocity = Vector3.new(0, 0, -150)
		fastStartVelocity.Parent = character.HumanoidRootPart
		fastStartPosition.position =
			Vector3.new(0, highest({ findHeight(0), findHeight(10), findHeight(20), findHeight(30) }), 0)
		while character.HumanoidRootPart.Position.Z > spawnLocation.Z - 1000 do
			wait(1)
			if character:FindFirstChild("HumanoidRootPart") == nil then
				break
			end
			fastStartPosition.position =
				Vector3.new(0, highest({ findHeight(0), findHeight(10), findHeight(20), findHeight(30) }), 0)
		end
		fastStartVelocity.velocity = Vector3.new(0, 0, 0)
		wait(2)
		if character:FindFirstChild("HumanoidRootPart") then
			fastStartPosition:Destroy()
			fastStartVelocity:Destroy()
			local shield = Instance.new("ForceField")
			shield.Name = "Shield"
			shield.Parent = character
			game:GetService("Debris"):AddItem(shield, 3)
		end
		fastStart:Destroy()
		script:Destroy()
	end
end

fastStart() --Script starts disabled, only enabled when a player starts running
