So these scripts are for a game where you stand in line and people line up and you can skip people in line also, and a exit button
SO what I want you to do is make suer all these scripts are working but better rememebr htis is for ROBLOX Lua

so here are all my scripts in serverscriptservice- 

CartScript- local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")

local CART_HEIGHT_OFFSET = 3.3
local CART_FORWARD_OFFSET_MOVING = 5.0
local CART_FORWARD_OFFSET_STILL = 1.0
local MOVEMENT_THRESHOLD = 0.1
local TILT_ANGLE = 3
local TILT_SPEED = 2
local OFFSET_TRANSITION_SPEED = 3

local playerCarts = {}

local function giveCart(player)
	local character = player.Character or player.CharacterAdded:Wait()
	local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
	local humanoid = character:WaitForChild("Humanoid")

	local cartModel = ReplicatedStorage:WaitForChild("Cart")
	local cart = cartModel:Clone()

	local mainPart = cart.PrimaryPart or cart:FindFirstChildWhichIsA("BasePart")
	if not mainPart then
		warn("add a postionidot")
		return
	end

	local nameModel = cart:FindFirstChild("Name")
	if nameModel and nameModel:IsA("Model") then
		local namePart = nameModel:FindFirstChildWhichIsA("BasePart")
		if namePart then
			local surfaceGui = Instance.new("SurfaceGui")
			surfaceGui.Face = Enum.NormalId.Front
			surfaceGui.SizingMode = Enum.SurfaceGuiSizingMode.PixelsPerStud
			surfaceGui.PixelsPerStud = 50
			surfaceGui.Parent = namePart

			local textLabel = Instance.new("TextLabel")
			textLabel.Size = UDim2.new(1, 0, 1, 0)
			textLabel.BackgroundTransparency = 1
			textLabel.TextScaled = true
			textLabel.Font = Enum.Font.GothamBold
			textLabel.TextColor3 = Color3.new(1, 1, 1)
			textLabel.Text = player.Name
			textLabel.Parent = surfaceGui
		end
	end

	for _, part in pairs(cart:GetDescendants()) do
		if part:IsA("BasePart") then
			part.CanCollide = false
			part.Anchored = false
			part.Transparency = 1

			if part ~= mainPart then
				local weld = Instance.new("WeldConstraint")
				weld.Part0 = mainPart
				weld.Part1 = part
				weld.Parent = part
			end
		end
	end

	local bodyPosition = Instance.new("BodyPosition")
	bodyPosition.MaxForce = Vector3.new(1e4, 1e4, 1e4)
	bodyPosition.P = 1000
	bodyPosition.D = 100
	bodyPosition.Position = mainPart.Position
	bodyPosition.Parent = mainPart

	local sound = Instance.new("Sound")
	sound.SoundId = "rbxassetid://7367699334"
	sound.Looped = true
	sound.Parent = mainPart

	local lastPosition = humanoidRootPart.Position
	local isMoving = false
	local currentTilt = 0
	local currentOffset = CART_FORWARD_OFFSET_STILL

	local function updateCartPosition()
		local forward = humanoidRootPart.CFrame.LookVector
		local up = humanoidRootPart.CFrame.UpVector

		local currentPosition = humanoidRootPart.Position
		local movement = (currentPosition - lastPosition).Magnitude
		local isWalking = humanoid:GetState() == Enum.HumanoidStateType.Running or humanoid:GetState() == Enum.HumanoidStateType.RunningNoPhysics
		local isJumping = humanoid:GetState() == Enum.HumanoidStateType.Jumping

		local targetOffset = (movement > MOVEMENT_THRESHOLD and isWalking) and CART_FORWARD_OFFSET_MOVING or CART_FORWARD_OFFSET_STILL
		currentOffset = currentOffset + (targetOffset - currentOffset) * OFFSET_TRANSITION_SPEED * RunService.Heartbeat:Wait()

		local targetPosition = humanoidRootPart.Position + forward * currentOffset

		local raycastParams = RaycastParams.new()
		raycastParams.FilterDescendantsInstances = {character, cart}
		raycastParams.FilterType = Enum.RaycastFilterType.Blacklist

		local raycastResult = workspace:Raycast(targetPosition + Vector3.new(0, 10, 0), Vector3.new(0, -20, 0), raycastParams)

		if raycastResult then
			targetPosition = raycastResult.Position + Vector3.new(0, mainPart.Size.Y/2 + CART_HEIGHT_OFFSET, 0)
		else
			targetPosition = Vector3.new(targetPosition.X, humanoidRootPart.Position.Y + CART_HEIGHT_OFFSET, targetPosition.Z)
		end

		bodyPosition.Position = targetPosition

		local targetTilt = 0
		if movement > MOVEMENT_THRESHOLD and isWalking and not isJumping then
			if not isMoving then
				sound:Play()
				isMoving = true
			end
			targetTilt = -TILT_ANGLE
		else
			if isMoving then
				sound:Stop()
				isMoving = false
			end
			targetTilt = 0
		end

		currentTilt = currentTilt + (targetTilt - currentTilt) * TILT_SPEED * RunService.Heartbeat:Wait()

		local tiltCFrame = CFrame.Angles(math.rad(currentTilt), 0, 0)
		local lookAtCFrame = CFrame.lookAt(mainPart.Position, humanoidRootPart.Position)
		mainPart.CFrame = lookAtCFrame * tiltCFrame

		lastPosition = currentPosition
	end

	local connection = RunService.Heartbeat:Connect(updateCartPosition)

	humanoid.Died:Connect(function()
		connection:Disconnect()
		cart:Destroy()
		playerCarts[player] = nil
	end)

	cart.Parent = workspace

	local spawnDuration = 1.5
	local startPosition = mainPart.Position + Vector3.new(0, 10, 0)
	mainPart.CFrame = CFrame.new(startPosition)

	local spawnTween = TweenService:Create(mainPart, TweenInfo.new(spawnDuration, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {
		CFrame = CFrame.new(mainPart.Position) * CFrame.Angles(0, math.rad(720), 0)
	})

	local transparencyTween = TweenService:Create(mainPart, TweenInfo.new(spawnDuration, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {
		Transparency = 0
	})

	spawnTween:Play()
	transparencyTween:Play()

	for _, part in pairs(cart:GetDescendants()) do
		if part:IsA("BasePart") and part ~= mainPart then
			TweenService:Create(part, TweenInfo.new(spawnDuration, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {
				Transparency = 0
			}):Play()
		end
	end

	playerCarts[player] = cart
end

local function onPlayerAdded(player)
	player.CharacterAdded:Connect(function()
		giveCart(player)
	end)
end

local function onPlayerRemoving(player)
	if playerCarts[player] then
		playerCarts[player]:Destroy()
		playerCarts[player] = nil
	end
end

Players.PlayerAdded:Connect(onPlayerAdded)
Players.PlayerRemoving:Connect(onPlayerRemoving)

for _, player in ipairs(Players:GetPlayers()) do
	onPlayerAdded(player)
end


LineScript- local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local DataStoreService = game:GetService("DataStoreService")

local moneyStore = DataStoreService:GetDataStore("PlayerMoney")
local playerMoney = {}
local lines = {}
_G.lines = lines

local CART_DISTANCE = 5
local BASE_SKIP_COST = 4000

local JumpDetectedEvent = Instance.new("RemoteEvent")
JumpDetectedEvent.Name = "JumpDetectedEvent"
JumpDetectedEvent.Parent = ReplicatedStorage

local doubleJumpSound = Instance.new("Sound")
doubleJumpSound.Name = "DoubleJumpSound"
doubleJumpSound.SoundId = "rbxassetid://6678636911"
doubleJumpSound.Volume = 0.5
doubleJumpSound.Parent = ReplicatedStorage

local phrases = {
	{"I", "LOVE", "SHOPPING"},
	{"I", "LOVE", "MONEY"},
	{"I", "LOVE", "CASH"},
	{"I", "LOVE", "STEALING"},
	{"I", "LOVE", "SHOPPING FOR EGGS"},
	{"I", "LOVE", "BEEF"}
}

local function createCartPart(player, position)
	local cartPart = Instance.new("Part")
	cartPart.Name = "Cart" .. position
	cartPart.Size = Vector3.new(6, 0.5, 0.5)
	cartPart.Anchored = true
	cartPart.CanCollide = false
	cartPart.Material = Enum.Material.Neon
	cartPart.Color = Color3.fromRGB(255, 50, 50)
	cartPart.Transparency = 0.5
	cartPart.Parent = workspace

	local billboardGui = Instance.new("BillboardGui")
	billboardGui.Name = "BillboardGui"
	billboardGui.Size = UDim2.new(0, 50, 0, 50)
	billboardGui.StudsOffset = Vector3.new(0, 2, 0)
	billboardGui.AlwaysOnTop = true
	billboardGui.Parent = cartPart

	local textLabel = Instance.new("TextLabel")
	textLabel.Size = UDim2.new(1, 0, 1, 0)
	textLabel.BackgroundTransparency = 1
	textLabel.Font = Enum.Font.SourceSansBold
	textLabel.TextColor3 = Color3.new(1, 1, 1)
	textLabel.TextSize = 60
	textLabel.Text = position
	textLabel.Parent = billboardGui

	return cartPart
end

local function removeCartPart(cartPart)
	local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Bounce, Enum.EasingDirection.In)
	local tween = TweenService:Create(cartPart, tweenInfo, {Size = Vector3.new(0, 0, 0)})
	tween:Play()
	tween.Completed:Connect(function()
		cartPart:Destroy()
	end)
end

local function createEnergyRing(origin, color)
	local ring = Instance.new("Part")
	ring.Shape = Enum.PartType.Cylinder
	ring.Size = Vector3.new(0.1, 0.1, 0.1)
	ring.Material = Enum.Material.Neon
	ring.Color = color
	ring.Transparency = 0
	ring.CFrame = origin * CFrame.Angles(0, math.rad(90), 0)
	ring.Anchored = true
	ring.CanCollide = false
	ring.Parent = workspace

	local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
	local tween = TweenService:Create(ring, tweenInfo, {Size = Vector3.new(0.1, 12, 12), Transparency = 1})
	tween:Play()
	tween.Completed:Connect(function()
		ring:Destroy()
	end)
end

local function createFloatingText(origin, text, color)
	local billboardGui = Instance.new("BillboardGui")
	billboardGui.Size = UDim2.new(0, 100, 0, 40)
	billboardGui.StudsOffset = Vector3.new(0, 3, 0)
	billboardGui.Parent = workspace

	local textLabel = Instance.new("TextLabel")
	textLabel.Size = UDim2.new(1, 0, 1, 0)
	textLabel.BackgroundTransparency = 1
	textLabel.Font = Enum.Font.SourceSansBold
	textLabel.TextColor3 = color
	textLabel.TextSize = 24
	textLabel.Text = text
	textLabel.Parent = billboardGui

	billboardGui.Parent = origin

	local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
	local tween = TweenService:Create(billboardGui, tweenInfo, {StudsOffset = Vector3.new(0, 6, 0), Size = UDim2.new(0, 150, 0, 60)})
	tween:Play()

	local fadeTween = TweenService:Create(textLabel, TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0.5), {TextTransparency = 1})
	fadeTween:Play()
	fadeTween.Completed:Connect(function()
		billboardGui:Destroy()
	end)
end

local function animateCartPart(cartPart)
	local originalSize = cartPart.Size
	local originalColor = cartPart.Color
	local originalCFrame = cartPart.CFrame

	local function createTween(instance, properties, duration, style, direction)
		return TweenService:Create(instance, TweenInfo.new(duration, style, direction), properties)
	end

	local randomPhrase = phrases[math.random(#phrases)]

	local tweenGreen = createTween(cartPart, {Color = Color3.fromRGB(50, 255, 50), Size = Vector3.new(7, 0.75, 0.75)}, 0.3, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
	tweenGreen:Play()
	createFloatingText(cartPart, randomPhrase[1], Color3.fromRGB(50, 255, 50))
	createEnergyRing(cartPart.CFrame, Color3.fromRGB(50, 255, 50))

	tweenGreen.Completed:Connect(function()
		local tweenOrange = createTween(cartPart, {Color = Color3.fromRGB(255, 165, 0), Size = Vector3.new(6.5, 0.6, 0.6)}, 0.3, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
		tweenOrange:Play()
		createFloatingText(cartPart, randomPhrase[2], Color3.fromRGB(255, 165, 0))
		createEnergyRing(cartPart.CFrame, Color3.fromRGB(255, 165, 0))

		tweenOrange.Completed:Connect(function()
			local tweenRed = createTween(cartPart, {Color = Color3.fromRGB(255, 50, 50), Size = originalSize}, 0.3, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out)
			tweenRed:Play()
			createFloatingText(cartPart, randomPhrase[3], Color3.fromRGB(255, 50, 50))
			createEnergyRing(cartPart.CFrame, Color3.fromRGB(255, 50, 50))

			tweenRed.Completed:Connect(function()
				cartPart:SetAttribute("CanAnimate", true)
			end)
		end)
	end)
end

local function positionPlayers()
	local frontPart = workspace:FindFirstChild("Front")
	if not frontPart then
		error("no front part s")
	end

	for i, player in ipairs(_G.lines) do
		if player.Character then
			local characterRootPart = player.Character:FindFirstChild("HumanoidRootPart")
			if characterRootPart then
				local cartPart = workspace:FindFirstChild("Cart" .. i) or createCartPart(player, i)

				if i == 1 then
					characterRootPart.CFrame = frontPart.CFrame * CFrame.new(0, characterRootPart.Size.Y / 2, -8)
				else
					local previousPlayerRootPart = _G.lines[i - 1].Character.HumanoidRootPart
					local offset = -previousPlayerRootPart.CFrame.lookVector * 8.5
					characterRootPart.CFrame = previousPlayerRootPart.CFrame + offset
				end

				characterRootPart.CFrame = CFrame.new(characterRootPart.Position, characterRootPart.Position - frontPart.CFrame.lookVector)
				characterRootPart.Anchored = true
				task.wait(0.1)
				characterRootPart.Anchored = false

				cartPart.CFrame = characterRootPart.CFrame * CFrame.new(0, -characterRootPart.Size.Y / 2 - 0.5, -CART_DISTANCE) * CFrame.Angles(math.rad(90), 0, 0)

				local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out)
				local tween = TweenService:Create(cartPart, tweenInfo, {Size = Vector3.new(7, 0.5, 0.5)})
				tween:Play()

				cartPart:SetAttribute("CanAnimate", true)
				cartPart:SetAttribute("JumpCount", 0)
				cartPart:SetAttribute("LastJumpTime", 0)
			end
		else
			local cartPart = workspace:FindFirstChild("Cart" .. i)
			if cartPart then
				removeCartPart(cartPart)
			end
		end
	end

	for i = #_G.lines + 1, math.huge do
		local cartPart = workspace:FindFirstChild("Cart" .. i)
		if cartPart then
			removeCartPart(cartPart)
		else
			break
		end
	end
end

_G.positionPlayers = positionPlayers

local function addPlayerToLine(player)
	if not table.find(_G.lines, player) then
		table.insert(_G.lines, player)
		player:SetAttribute("LinePosition", #_G.lines)
		positionPlayers()
	end
end

local function removePlayerFromLine(player)
	local linePosition = player:GetAttribute("LinePosition")
	if linePosition then
		table.remove(_G.lines, linePosition)
		for i = linePosition, #_G.lines do
			_G.lines[i]:SetAttribute("LinePosition", i)
		end
		player:SetAttribute("LinePosition", nil)
		positionPlayers()

		local spawnLocation = workspace:FindFirstChild("SpawnLocation")
		if spawnLocation and player.Character then
			player.Character:SetPrimaryPartCFrame(spawnLocation.CFrame + Vector3.new(0, 5, 0))
		end
	end
end

local function updateMoney(player)
	while player.Parent do
		playerMoney[player.UserId] = playerMoney[player.UserId] + 4000
		local leaderstats = player:FindFirstChild("leaderstats")
		if leaderstats then
			local money = leaderstats:FindFirstChild("Money")
			if money then
				money.Value = playerMoney[player.UserId]
			end
		end
		wait(1)
	end
end

local function setupPlayer(player)
	local success, savedMoney = pcall(function()
		return moneyStore:GetAsync(player.UserId)
	end)
	if success and savedMoney then
		playerMoney[player.UserId] = savedMoney
	else
		playerMoney[player.UserId] = 0
	end

	local function createLeaderstats()
		local leaderstats = Instance.new("Folder")
		leaderstats.Name = "leaderstats"
		leaderstats.Parent = player

		local money = Instance.new("IntValue")
		money.Name = "Money"
		money.Value = playerMoney[player.UserId]
		money.Parent = leaderstats
	end

	createLeaderstats()

	player.CharacterAdded:Connect(function()
		createLeaderstats()
	end)

	spawn(function()
		updateMoney(player)
	end)

	player:SetAttribute("SkipCount", 0)
end

local function savePlayerMoney(player)
	local success, err = pcall(function()
		moneyStore:SetAsync(player.UserId, playerMoney[player.UserId])
	end)
	if not success then
		warn("Failed to save " .. player.Name .. "'s money: " .. err)
	end
end

Players.PlayerAdded:Connect(function(player)
	setupPlayer(player)

	player.CharacterAdded:Connect(function(character)
		local linePart = workspace:FindFirstChild("Line")
		if linePart then
			character:WaitForChild("HumanoidRootPart").Touched:Connect(function(hit)
				if hit == linePart and not player:GetAttribute("LinePosition") then
					addPlayerToLine(player)
				end
			end)
		else
			warn("no line")
		end

		character:WaitForChild("Humanoid").Died:Connect(function()
			removePlayerFromLine(player)
		end)
	end)
end)

Players.PlayerRemoving:Connect(function(player)
	removePlayerFromLine(player)
	savePlayerMoney(player)
	playerMoney[player.UserId] = nil
end)

game:BindToClose(function()
	for _, player in pairs(Players:GetPlayers()) do
		savePlayerMoney(player)
	end
end)

JumpDetectedEvent.OnServerEvent:Connect(function(player)
	local linePosition = player:GetAttribute("LinePosition")
	if linePosition then
		local cartPart = workspace:FindFirstChild("Cart" .. linePosition)
		if cartPart then
			local canAnimate = cartPart:GetAttribute("CanAnimate")
			local jumpCount = cartPart:GetAttribute("JumpCount")
			local lastJumpTime = cartPart:GetAttribute("LastJumpTime")
			local currentTime = tick()

			if currentTime - lastJumpTime <= 1 then
				jumpCount = jumpCount + 1
				if jumpCount == 2 and canAnimate then
					animateCartPart(cartPart)
					cartPart:SetAttribute("CanAnimate", false)
					local soundClone = doubleJumpSound:Clone()
					soundClone.Parent = cartPart
					soundClone:Play()
					game.Debris:AddItem(soundClone, soundClone.TimeLength)
				end
			else
				jumpCount = 1
			end

			cartPart:SetAttribute("JumpCount", jumpCount)
			cartPart:SetAttribute("LastJumpTime", currentTime)
		end
	end
end)

local LeaveLineEvent = Instance.new("RemoteEvent")
LeaveLineEvent.Name = "LeaveLineEvent"
LeaveLineEvent.Parent = ReplicatedStorage

LeaveLineEvent.OnServerEvent:Connect(function(player)
	removePlayerFromLine(player)
end)

local SkipLineEvent = Instance.new("RemoteEvent")
SkipLineEvent.Name = "SkipLineEvent"
SkipLineEvent.Parent = ReplicatedStorage

SkipLineEvent.OnServerEvent:Connect(function(player)
	local currentPosition = player:GetAttribute("LinePosition")
	if currentPosition and currentPosition > 1 then
		local skipCount = player:GetAttribute("SkipCount") or 0
		local skipCost = BASE_SKIP_COST * (2 ^ skipCount)
		if playerMoney[player.UserId] >= skipCost then
			playerMoney[player.UserId] = playerMoney[player.UserId] - skipCost
			player:SetAttribute("SkipCount", skipCount + 1)

			local playerAhead = _G.lines[currentPosition - 1]
			_G.lines[currentPosition] = playerAhead
			_G.lines[currentPosition - 1] = player
			player:SetAttribute("LinePosition", currentPosition - 1)
			playerAhead:SetAttribute("LinePosition", currentPosition)

			positionPlayers()

			local leaderstats = player:FindFirstChild("leaderstats")
			if leaderstats then
				local money = leaderstats:FindFirstChild("Money")
				if money then
					money.Value = playerMoney[player.UserId]
				end
			end

			ReplicatedStorage.SkipSuccessEvent:FireClient(player, skipCost, playerMoney[player.UserId])
			updateSkipButtonText(player)
		else
			ReplicatedStorage.SkipFailedEvent:FireClient(player, skipCost)
		end
	end
end)

local SkipSuccessEvent = Instance.new("RemoteEvent")
SkipSuccessEvent.Name = "SkipSuccessEvent"
SkipSuccessEvent.Parent = ReplicatedStorage

local SkipFailedEvent = Instance.new("RemoteEvent")
SkipFailedEvent.Name = "SkipFailedEvent"
SkipFailedEvent.Parent = ReplicatedStorage

local function updateSkipButtonText(player)
	local skipCount = player:GetAttribute("SkipCount") or 0
	local skipCost = BASE_SKIP_COST * (2 ^ skipCount)
	local skipline = player.PlayerGui:FindFirstChild("Skipline")
	if skipline then
		local textLabel = skipline:FindFirstChild("TextLabel")
		if textLabel then
			textLabel.Text = "$" .. skipCost
		end
	end
end

Players.PlayerAdded:Connect(function(player)
	player:GetAttributeChangedSignal("SkipCount"):Connect(function()
		updateSkipButtonText(player)
	end)

	player.CharacterAdded:Connect(function()
		wait(1)
		updateSkipButtonText(player)
	end)
end)

for _, player in ipairs(Players:GetPlayers()) do
	updateSkipButtonText(player)
end

SkipLineScript- local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")

local SkipLineEvent = Instance.new("RemoteEvent")
SkipLineEvent.Name = "SkipLineEvent"
SkipLineEvent.Parent = ReplicatedStorage

local function skipLine(player)
	local currentPosition = player:GetAttribute("LinePosition")
	if currentPosition and currentPosition > 1 then
		local lines = _G.lines
		local playerAhead = lines[currentPosition - 1]

		-- Swap positions
		lines[currentPosition] = playerAhead
		lines[currentPosition - 1] = player

		-- Update attributes
		player:SetAttribute("LinePosition", currentPosition - 1)
		playerAhead:SetAttribute("LinePosition", currentPosition)

		-- Reposition players
		_G.positionPlayers()
	end
end

SkipLineEvent.OnServerEvent:Connect(skipLine)

CardScript- local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local SoundService = game:GetService("SoundService")

local ExpandBlockEvent = Instance.new("RemoteEvent")
ExpandBlockEvent.Name = "ExpandBlockEvent"
ExpandBlockEvent.Parent = ReplicatedStorage

local function animateNumber(textLabel)
	local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Back, Enum.EasingDirection.Out)
	local appearTween = TweenService:Create(textLabel, tweenInfo, {TextTransparency = 0, TextSize = 60, Rotation = 360})
	local disappearTween = TweenService:Create(textLabel, tweenInfo, {TextTransparency = 1, TextSize = 40, Rotation = 0})

	return function()
		textLabel.TextTransparency = 1
		textLabel.TextSize = 10
		textLabel.Rotation = 0
		appearTween:Play()
		wait(1.5)
		disappearTween:Play()
	end
end

local function createNumberCard(player, number)
	local card = ReplicatedStorage:FindFirstChild("Card"):Clone()
	card.Anchored = false
	card.CanCollide = true

	local billboardGui = Instance.new("BillboardGui")
	billboardGui.Size = UDim2.new(0, 100, 0, 100)
	billboardGui.StudsOffset = Vector3.new(0, 0.5, 0.55)
	billboardGui.Adornee = card
	billboardGui.AlwaysOnTop = true

	local textLabel = Instance.new("TextLabel")
	textLabel.Size = UDim2.new(1, 0, 1, 0)
	textLabel.Position = UDim2.new(0, 0, 0, 0)
	textLabel.BackgroundTransparency = 1
	textLabel.Text = tostring(number)
	textLabel.TextScaled = true
	textLabel.TextColor3 = Color3.new(1, 1, 1)
	textLabel.TextTransparency = 1
	textLabel.Font = Enum.Font.GothamBold
	textLabel.Parent = billboardGui

	billboardGui.Parent = card

	local weld = Instance.new("Weld")
	weld.Part0 = player.Character.RightHand
	weld.Part1 = card
	weld.C0 = CFrame.new(0, 0, -1)
	weld.Parent = player.Character.RightHand

	card.Parent = workspace

	return card, textLabel
end

local function generateRandomNumber()
	local numDigits = math.random(4, 5)
	local number = 0
	for i = 1, numDigits do
		number = number * 10 + math.random(0, 9)
	end
	return number
end

local playerNumbers = {}
local playerCards = {}

local function onPlayerAdded(player)
	player.CharacterAdded:Connect(function(character)
		local playerNumber = playerNumbers[player] or generateRandomNumber()
		playerNumbers[player] = playerNumber
		local card, textLabel = createNumberCard(player, playerNumber)
		card.Name = "NumberCard"
		playerCards[player] = card
		local animateNumberFunc = animateNumber(textLabel)

		local lastClickTime = 0
		local lastActivationTime = 0
		ExpandBlockEvent.OnServerEvent:Connect(function(clickedPlayer, clickedCard)
			if clickedPlayer == player and clickedCard == card then
				local currentTime = tick()
				if currentTime - lastClickTime < 0.3 and currentTime - lastActivationTime > 3 then
					lastActivationTime = currentTime

					local expandSound = Instance.new("Sound")
					expandSound.SoundId = "rbxassetid://154255000"
					expandSound.Parent = card
					expandSound:Play()

					local expandTween = TweenService:Create(card, TweenInfo.new(0.3, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Size = card.Size * 1.3})
					expandTween:Play()

					local colorTween = TweenService:Create(card, TweenInfo.new(0.3, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {Color = Color3.new(0, 0.8, 0.8)})
					colorTween:Play()
					card.Material = Enum.Material.Neon

					animateNumberFunc()

					local rotationTween = TweenService:Create(card, TweenInfo.new(0.5, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut), {CFrame = card.CFrame * CFrame.Angles(0, math.rad(360), 0)})
					rotationTween:Play()

					wait(1.5)

					local shrinkSound = Instance.new("Sound")
					shrinkSound.SoundId = "rbxassetid://154255000"
					shrinkSound.Parent = card
					shrinkSound:Play()

					local shrinkTween = TweenService:Create(card, TweenInfo.new(0.5, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {Size = card.Size / 1.3})
					shrinkTween:Play()

					local resetColorTween = TweenService:Create(card, TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {Color = Color3.new(1, 1, 1)})
					resetColorTween:Play()

					card.Material = Enum.Material.Plastic
				end
				lastClickTime = currentTime
			end
		end)
	end)

	player.CharacterRemoving:Connect(function()
		local card = playerCards[player]
		if card then
			card:Destroy()
			playerCards[player] = nil
		end
	end)

	player.Leaving:Connect(function()
		playerNumbers[player] = nil
		local card = playerCards[player]
		if card then
			card:Destroy()
			playerCards[player] = nil
		end
	end)
end

Players.PlayerAdded:Connect(onPlayerAdded)

for _, player in ipairs(Players:GetPlayers()) do
	onPlayerAdded(player)
end

LeaveScript- local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local unfreezeSignal = ReplicatedStorage:FindFirstChild("UnfreezeSignal") or Instance.new("RemoteEvent")
unfreezeSignal.Name = "UnfreezeSignal"
unfreezeSignal.Parent = ReplicatedStorage

local function setupCharacter(character)
	local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
	local humanoid = character:WaitForChild("Humanoid")
	local linePart = Workspace:WaitForChild("Line")
	local isFrozen = false

	local function freezePlayer()
		isFrozen = true
		humanoid.WalkSpeed = 0
		humanoid.JumpHeight = 7
		unfreezeSignal:FireClient(Players:GetPlayerFromCharacter(character))
	end

	local function unfreezePlayer()
		isFrozen = false
		humanoid.WalkSpeed = 16
		humanoid.JumpHeight = 7.2
	end

	humanoidRootPart.Touched:Connect(function(hit)
		if hit == linePart and not isFrozen then
			freezePlayer()
		end
	end)

	humanoid.StateChanged:Connect(function(_, newState)
		if isFrozen and newState == Enum.HumanoidStateType.Landed then
			humanoid.WalkSpeed = 0
		end
	end)

	unfreezeSignal.OnServerEvent:Connect(function(player)
		if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
			unfreezePlayer()
			local spawnLocation = Workspace:WaitForChild("Spawn")

			humanoidRootPart.CanCollide = false
			for _, part in ipairs(character:GetDescendants()) do
				if part:IsA("BasePart") then
					part.CanCollide = false
				end
			end

			player.Character:SetPrimaryPartCFrame(spawnLocation.CFrame)

			local function restoreCollision(hit)
				if hit == spawnLocation then
					humanoidRootPart.CanCollide = true
					for _, part in ipairs(character:GetDescendants()) do
						if part:IsA("BasePart") then
							part.CanCollide = true
						end
					end
					humanoidRootPart.Touched:Disconnect(restoreCollision)
				end
			end

			humanoidRootPart.Touched:Connect(restoreCollision)
		end
	end)
end

Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(setupCharacter)
end)

for _, player in ipairs(Players:GetPlayers()) do
	if player.Character then
		setupCharacter(player.Character)
	end
end

MOneyScript- local DataStoreService = game:GetService("DataStoreService")
local moneyStore = DataStoreService:GetDataStore("PlayerMoney")
local Players = game:GetService("Players")

local playerMoney = {}

local function updateMoney(player)
	while player.Parent do
		playerMoney[player.UserId] = playerMoney[player.UserId] + 4000
		local leaderstats = player:FindFirstChild("leaderstats")
		if leaderstats then
			local money = leaderstats:FindFirstChild("Money")
			if money then
				money.Value = playerMoney[player.UserId]
			end
		end
		wait(1)
	end
end

local function setupPlayer(player)
	local success, savedMoney = pcall(function()
		return moneyStore:GetAsync(player.UserId)
	end)

	if success and savedMoney then
		playerMoney[player.UserId] = savedMoney
	else
		playerMoney[player.UserId] = 0
	end

	local function createLeaderstats()
		local leaderstats = Instance.new("Folder")
		leaderstats.Name = "leaderstats"
		leaderstats.Parent = player

		local money = Instance.new("IntValue")
		money.Name = "Money"
		money.Value = playerMoney[player.UserId]
		money.Parent = leaderstats
	end

	createLeaderstats()

	player.CharacterAdded:Connect(function()
		createLeaderstats()
	end)

	spawn(function()
		updateMoney(player)
	end)
end

local function savePlayerMoney(player)
	local success, err = pcall(function()
		moneyStore:SetAsync(player.UserId, playerMoney[player.UserId])
	end)

	if not success then
		warn("Failed to save " .. player.Name .. "'s money: " .. err)
	end
end

Players.PlayerAdded:Connect(setupPlayer)
Players.PlayerRemoving:Connect(function(player)
	savePlayerMoney(player)
	playerMoney[player.UserId] = nil
end)

game:BindToClose(function()
	for _, player in pairs(Players:GetPlayers()) do
		savePlayerMoney(player)
	end
end)


That is all the serverscript service scripts now here is the Starterplayerscripts Localscripts

SkipButton-

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local SkipLineEvent = ReplicatedStorage:WaitForChild("SkipLineEvent")

local player = game.Players.LocalPlayer
local skipline = player:WaitForChild("PlayerGui"):WaitForChild("Skipline")
local imageButton = skipline:WaitForChild("ImageButton")

imageButton.MouseButton1Click:Connect(function()
	SkipLineEvent:FireServer()
end)

SkipLineLocalScript-
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local screenGui = playerGui:WaitForChild("ScreenGui")
local skipButton = screenGui:WaitForChild("SkipLine"):WaitForChild("ImageButton")

local SkipLineEvent = ReplicatedStorage:WaitForChild("SkipLineEvent")

skipButton.MouseButton1Click:Connect(function()
	SkipLineEvent:FireServer()
end)

Leavescript-
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local leaveGui = playerGui:WaitForChild("Leave")
local leaveButton = leaveGui:WaitForChild("ImageButton")

local JumpDetectedEvent = ReplicatedStorage:WaitForChild("JumpDetectedEvent")
local LeaveLineEvent = ReplicatedStorage:WaitForChild("LeaveLineEvent")

leaveGui.Enabled = false

player:GetAttributeChangedSignal("LinePosition"):Connect(function()
	local linePosition = player:GetAttribute("LinePosition")
	if linePosition then
		leaveGui.Enabled = true
	else
		leaveGui.Enabled = false
	end
end)

leaveButton.MouseButton1Click:Connect(function()
	LeaveLineEvent:FireServer()
end)

local function onJump()
	if player:GetAttribute("LinePosition") then
		JumpDetectedEvent:FireServer()
	end
end

player.Character:WaitForChild("Humanoid").Jumping:Connect(onJump)
player.CharacterAdded:Connect(function(character)
	character:WaitForChild("Humanoid").Jumping:Connect(onJump)
end)

Linestanding-
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local UserInputService = game:GetService("UserInputService")

local player = Players.LocalPlayer
local JumpDetectedEvent = ReplicatedStorage:WaitForChild("JumpDetectedEvent")
local ExpandBlockEvent = ReplicatedStorage:WaitForChild("ExpandBlockEvent")
local LeaveLineEvent = ReplicatedStorage:WaitForChild("LeaveLineEvent")

local linePositionDisplay = Instance.new("TextLabel")
linePositionDisplay.Size = UDim2.new(0, 200, 0, 50)
linePositionDisplay.Position = UDim2.new(0.5, -100, 0.5, -25)
linePositionDisplay.BackgroundTransparency = 0.8
linePositionDisplay.Font = Enum.Font.SourceSansBold
linePositionDisplay.TextSize = 24
linePositionDisplay.TextColor3 = Color3.new(1, 1, 1)
linePositionDisplay.Parent = player.PlayerGui

local leaveButton = Instance.new("TextButton")
leaveButton.Size = UDim2.new(0, 100, 0, 50)
leaveButton.Position = UDim2.new(0.5, -50, 0.7, 0)
leaveButton.Text = "Leave Line"
leaveButton.Visible = false
leaveButton.Parent = player.PlayerGui

player:GetAttributeChangedSignal("LinePosition"):Connect(function()
	local linePosition = player:GetAttribute("LinePosition")
	if linePosition then
		linePositionDisplay.Text = "You are in line " .. linePosition
		linePositionDisplay.Visible = true
		leaveButton.Visible = true
	else
		linePositionDisplay.Visible = false
		leaveButton.Visible = false
	end
end)

local function setupCharacter(character)
	local humanoid = character:WaitForChild("Humanoid")

	humanoid.StateChanged:Connect(function(oldState, newState)
		if newState == Enum.HumanoidStateType.Jumping and player:GetAttribute("LinePosition") then
			JumpDetectedEvent:FireServer()
		end
	end)
end

player.CharacterAdded:Connect(setupCharacter)

if player.Character then
	setupCharacter(player.Character)
end

local lastClickTime = 0
local function onInputBegan(input, gameProcessed)
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		local currentTime = tick()
		local mouse = player:GetMouse()
		local target = mouse.Target
		if target and target:IsA("Part") and target.Parent == workspace then
			ExpandBlockEvent:FireServer(target)
		end
		lastClickTime = currentTime
	end
end

UserInputService.InputBegan:Connect(onInputBegan)

leaveButton.MouseButton1Click:Connect(function()
	LeaveLineEvent:FireServer()
end)

Money-
local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local moneyGui = playerGui:WaitForChild("Money")
local moneyLabel = moneyGui:WaitForChild("TextLabel")

local function formatMoney(amount)
	return string.format("$%s", tostring(amount):reverse():gsub("%d%d%d", "%1,"):reverse():gsub("^,", ""))
end

local function updateMoneyDisplay()
	local leaderstats = player:WaitForChild("leaderstats")
	local money = leaderstats:WaitForChild("Money")

	local function updateLabel()
		moneyLabel.Text = formatMoney(money.Value)
	end

	money.Changed:Connect(updateLabel)
	updateLabel()
end

updateMoneyDisplay()

player.CharacterAdded:Connect(function(character)
	wait(0.5)
	local leaderstats = player:WaitForChild("leaderstats")
	local money = leaderstats:WaitForChild("Money")
	moneyLabel.Text = formatMoney(money.Value)

	local function updateLabel()
		moneyLabel.Text = formatMoney(money.Value)
	end

	money.Changed:Connect(updateLabel)

	character:WaitForChild("Humanoid").Died:Connect(function()
		moneyLabel.Text = formatMoney(money.Value)
	end)
end)

player:GetPropertyChangedSignal("leaderstats"):Connect(updateMoneyDisplay)

MoneySkip- local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local player = Players.LocalPlayer
local skipline = player.PlayerGui:WaitForChild("Skipline")
local imageButton = skipline:WaitForChild("ImageButton")
local textLabel = skipline:WaitForChild("TextLabel")

local BASE_SKIP_COST = 4000

local function updateSkipButtonText()
	local skipCount = player:GetAttribute("SkipCount") or 0
	local skipCost = BASE_SKIP_COST * (2 ^ skipCount)
	textLabel.Text = "$" .. skipCost
end

local SkipLineEvent = ReplicatedStorage:WaitForChild("SkipLineEvent")

imageButton.MouseButton1Click:Connect(function()
	SkipLineEvent:FireServer()
end)

ReplicatedStorage.SkipSuccessEvent.OnClientEvent:Connect(function(cost, newBalance)
	print("Successfully skipped! Cost: $" .. cost .. ", New balance: $" .. newBalance)
	updateSkipButtonText()
end)

ReplicatedStorage.SkipFailedEvent.OnClientEvent:Connect(function(cost)
	print("Not enough money to skip. Required: $" .. cost)
end)

player:GetAttributeChangedSignal("SkipCount"):Connect(updateSkipButtonText)
updateSkipButtonText()

Ok now what I want you to do is fix all these scripts so it works perfect so when I play it works smoothly perfect like 100% awesome and perfect, make sure to send the full script without NO Placeholders 0 Placeholders at all meaning all the scripts are send, make it so you also tell me where to put the scripts so I don't get confused but do this all then send everything without placeholders please

Send all the scripts fully