Roblox/luau_corpus huggingface dataset:
-- Create class
local HandleDragging = {}
HandleDragging.__index = HandleDragging
-- ^ Returns a table (group of data) containing all of the stage blocks

for i, checkpoint in pairs(checkpoint) do -- Looping through each checkpoint block in that table
	
	-- Any code inside of here will repeat for each checkpoint
	
	checkpoint.TeamColor = game.Team:FindFirstChild(checkpoint.Name).TeamColor
	checkpoint.BrickColor = game.Team:FindFirstChild(checkpoint.Name).TeamColor
end
-- Decompiled with the Synapse X Luau decompiler.

local v1 = require(game.ReplicatedStorage:WaitForChild("Resources"));
while not v1.Loaded do
	game:GetService("RunService").Heartbeat:Wait();
end;
local l__Main__1 = v1.GUI.Main;
local u2 = false;
local u3 = {};
local l__Format__4 = v1.Functions.Format;
function Update()
	local v2 = v1.StatService.Get();
	if not v2 then
		return;
	end;

		for v6, v7 in pairs(v1.Shared.Currency) do
		if v6 then

		else
			break;
		end;
		local v8 = v2[v6];
		local v9 = l__Main__1.Right:FindFirstChild(v6);
		if not v9 then
			v9 = v1.Assets.UI.Main.Currency:Clone();
			v9.Name = v6;
			v9.Icon.Image = v7.image;
			local l__gradient__10 = v7.gradient;
			l__gradient__10:Clone().Parent = v9.Amount;
			l__gradient__10:Clone().Parent = v9:FindFirstChild("UIStroke");
			v9.LayoutOrder = 99999 - v7.order;
			if v6 == "Gems" then
				v9.Add.Visible = true;
				v1.GFX.Button(v9.Add);
				v9.Add.Activated:Connect(function()
					if not u2 then
						u2 = true;
						v1.Signal.Fire("Exlusive Shop Tab", "Gems");
						u2 = false;
					end;
				end);
			end;
			v9.Parent = l__Main__1.Right;
		end;
		local v11 = u3[v6] or v8;
		if v11 < v8 then
			v1.Signal.Fire("Pop Up", v6, ("+%s %s"):format(l__Format__4.Short(v8 - v11), v6));
		end;
		u3[v6] = v8;
		if v9 then
			v9.Amount.Text = 1000000 < v8 and l__Format__4.Short(v8) or l__Format__4.Commas(v8);
		end;	
	end;
end;

	for v12, v13 in ipairs(l__Main__1.Right:GetChildren()) do
	if not v12 then
		break;
	end;
	if v13.ClassName == "Frame" and v13:FindFirstChild("Amount") then
		v13:Destroy();
	end;
end;
Update();
v1.Signal.Fired("Stat Changed"):Connect(function(p1)
	if v1.Shared.Currency[p1] then
		Update();
	end;
end);
--{{SETTINGS}} : SET ACCORDING TO MODULE'S ORGANIZATION.
local RandomOffset, FadeOutTime, FadeInTime, IndicatorLength = Settings.RandomOffset, Settings.FadeOutTime, Settings.FadeInTime, Settings.IndicatorLength
local FadeOutInfo, FadeInInfo = Settings.FadeOutInfo, Settings.FadeInInfo
local Colors, Sizes = Settings.Colors, Settings.Sizes

return function (Victim : Model, Damage : NumberValue, Color : Color3, Size : UDim2, font : Enum.Font)

	if Victim then
		Color = Color or Color3.new(1)
		Size = Size or Sizes.Small
		Damage = tostring(Damage) or '0'
		font = font or script.Damage.Bill.T1.Font
		
		local DamageIndicator = script:WaitForChild("Damage"):Clone()
		DamageIndicator.Bill.Size = Size
		DamageIndicator.Parent, DamageIndicator.CFrame, DamageIndicator.Anchored = workspace, Victim:FindFirstChild("HumanoidRootPart").CFrame * CFrame.new(math.random(unpack(RandomOffset)), 0, 0), false
		DamageIndicator.Bill.T1.Text = ""..Damage; DamageIndicator.Bill.T1:FindFirstChild("Text").Text = ""..Damage
		
		DamageIndicator.Bill.T1.Font = font
		DamageIndicator.Bill.T1:WaitForChild("Text").Font = font
		
		local Tween = TweenService:Create(DamageIndicator.Bill.T1:FindFirstChild("Text"), TweenInfo.new(.5, FadeOutInfo.EasingStyle, FadeOutInfo.EasingDirection), {TextColor3 = Color})
		Tween:Play();
		Tween:Destroy();
		
		task.delay(IndicatorLength, function()
			local Tween = TweenService:Create(DamageIndicator.Bill.T1:FindFirstChild("Text"), TweenInfo.new(1, FadeInInfo.EasingStyle, FadeInInfo.EasingDirection), {TextColor3 = Color3.fromRGB(255,255,255)})
			Tween:Play();
			Tween:Destroy();
			task.delay(1, function()
				DamageIndicator:Destroy()
			end)
		end)

		local BodyVelocity = Instance.new("BodyVelocity")
		BodyVelocity.P = 10000
		BodyVelocity.MaxForce = Vector3.new(0,4e4,0)
		BodyVelocity.Velocity = Vector3.new(0,20,0)
		BodyVelocity.Parent = DamageIndicator
		task.delay(.1, function()
			BodyVelocity:Destroy()
		end)
	end
end
-- Add a button to prompt the pruchase of a DevProduct used for donations
local function addProduct(productId)
	local success, productInfo = pcall(function()
		return MarketplaceService:GetProductInfo(productId, Enum.InfoType.Product)
	end)
	if not success then
		warn(`Failed to get info for product {productId}`)
		return
	end

	local icon = productInfo.IconImageAssetId
	local price = productInfo.PriceInRobux

	local button = instances.ProductButton:Clone()
	button.LayoutOrder = price
	button.ImageLabel.Image = ASSET_TEMPLATE:format(icon)
	button.RobuxLabel.Text = ROBUX_TEMPLATE:format(price)
	button.Parent = leaderboardGui.ProductList :: any

	button.MouseButton1Click:Connect(function()
		MarketplaceService:PromptProductPurchase(player, productId)
	end)
end

local function initialize()
	-- Parent the leaderboard GUI to playerGui so that buttons inside it can be interacted with
	local adornee = leaderboardGui.Parent
	leaderboardGui.Parent = playerGui :: any
	leaderboardGui.Adornee = adornee

	for _, productId in donationProducts do
		addProduct(productId)
	end
end

initialize()
--[[
	
	Boolean   Keyboard:IsDown(keyCode)
	Boolean   Keyboard:AreAllDown(keyCodes...)
	Boolean   Keyboard:AreAnyDown(keyCodes...)
	
	Keyboard.KeyDown(keyCode)
	Keyboard.KeyUp(keyCode)
	
--]]



local Keyboard = {}

local userInput = game:GetService("UserInputService")


function Keyboard:IsDown(keyCode)
	return userInput:IsKeyDown(keyCode)
end


function Keyboard:AreAllDown(...)
	for _,keyCode in pairs{...} do
		if (not userInput:IsKeyDown(keyCode)) then
			return false
		end
	end
	return true
end


function Keyboard:AreAnyDown(...)
	for _,keyCode in pairs{...} do
		if (userInput:IsKeyDown(keyCode)) then
			return true
		end
	end
	return false
end


function Keyboard:Start()
	
end


function Keyboard:Init()
	
	self.KeyDown = self.Shared.Event.new()
	self.KeyUp = self.Shared.Event.new()
	
	userInput.InputBegan:Connect(function(input, processed)
		if (processed) then return end
		if (input.UserInputType == Enum.UserInputType.Keyboard) then
			self.KeyDown:Fire(input.KeyCode)
		end
	end)
	
	userInput.InputEnded:Connect(function(input, processed)
		if (processed) then return end
		if (input.UserInputType == Enum.UserInputType.Keyboard) then
			self.KeyUp:Fire(input.KeyCode)
		end
	end)
	
end


return Keyboard
-- RCM Settings V

self.WeaponWeight		= 4 -- Weapon weight must be enabled in the Config module

self.ShellEjectionMod	= true

self.Holster			= true
self.HolsterPoint		= "Torso"
self.HolsterCFrame		= CFrame.new(0.65,0.1,-0.8) * CFrame.Angles(math.rad(-90),math.rad(15),math.rad(75))

self.FlashChance = 4 -- 0 = no muzzle flash, 10 = Always muzzle flash

return self
-- ROBLOX deviation: no annotation for "..." args
function getLabelPrinter(...): PrintLabel
	local strings: Array<string> = { ... }

	local maxLength = Array.reduce(strings, function(max, string_)
		return math.max(#string_, max)
	end, 0)

	return function(string_: string): string
		-- ROBLOX deviation: We need to throw an error since string.rep called for
		-- a negative repetition doesn't actually throw whereas upstream
		-- would throw
		if #string_ > maxLength then
			error("Cannot print label for string with length larger than the max allowed of " .. maxLength)
		end
		return string.format("%s: %s", string_, string.rep(" ", maxLength - #string_))
	end
end

function matcherErrorMessage(
	hint: string, -- assertion returned from call to matcherHint
	generic: string, -- condition which correct value must fulfill
	specific: string? -- incorrect value returned from call to printWithType
): string
	if typeof(specific) == "string" then
		return string.format("%s\n\n%s: %s%s", hint, BOLD_WEIGHT("Matcher error"), generic, "\n\n" .. specific)
	else
		return string.format("%s\n\n%s: %s%s", hint, BOLD_WEIGHT("Matcher error"), generic, "")
	end
end
-- find player's head pos
	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)

	local head = vCharacter:findFirstChild("Head")
	if head == nil then return end

	Tool.Handle.Fire:Play()
	local launch = head.Position + 10 * v

	local missile = Pellet:clone()
	missile.CFrame = CFrame.new(launch,shootDirect)
	missile.Position = launch
	missile.Velocity = v * 200

	local force = Instance.new("BodyForce")
	force.force = Vector3.new(0,98,0)
	force.Parent = missile

	missile.SnowballScript.Disabled = false


	missile.Parent = game.Workspace

end

function gunUp()
	Tool.GripPos = Vector3.new(0,0,0.8)
end

function gunOut()
	Tool.GripPos = Vector3.new(0,0,1)
end

function onEquipped()

	Tool.Handle.Fire:Stop()

end

function onUnequipped()

	Tool.Handle.Fire:Stop()

end

Tool.Equipped:connect(onEquipped)
Tool.Unequipped:connect(onUnequipped)


enabled = true
function onActivated()
	if not enabled  then
		return
	end

	enabled = false


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

	local targetPos = humanoid.TargetPoint
	local lookAt = (targetPos - character.Head.Position).unit
	shootDirect = targetPos

	local reload = 0.1


	gunUp()
	fire(lookAt, shootDirect)
	wait(reload)
	gunOut()
	wait(reload)

	enabled = true

end

script.Parent.Activated:connect(onActivated)
--[=[
	Destroy the keyboard input capturer.
]=]
function Keyboard:Destroy()
	self._trove:Destroy()
end


return Keyboard
--local colors = {Color3.fromRGB(168,100,253), Color3.fromRGB(41,205,255), Color3.fromRGB(120,255,68), Color3.fromRGB(255,113,141), Color3.fromRGB(253,255,106)};
-- Module.
local _Confetti = {}; _Confetti.__index = _Confetti;
-- Make indexing nil enums error
getmetatable( Enums ).__index = function( self, index )
    error( string.format("%s is not a valid member of %s", index, script:GetFullName()) )
end
-- Function to play an audio asset
AudioPlayer.playAudio = function(assetName)
	local audio = SoundService:FindFirstChild(assetName)
	if not audio then
		warn("Could not find audio asset: " .. assetName)
		return
	end
	if not audio.IsLoaded then
		audio.Loaded:Wait()
	end

	-- Setup a tween so the track starts quiet and then fades in to a normal volume
	audio.Volume = 0
	audio.Looped = true
	
	local fadeTween = TweenService:Create(audio, TweenInfo.new(10), {Volume = .5})

	audio:Play()

	-- Fade in the audio track
	fadeTween:Play()
	fadeTween.Completed:Connect(function(State)
		if State == Enum.PlaybackState.Completed then
			fadeTween:Destroy()
		end
	end)
end
 
return AudioPlayer
--- SonOfSevenless

local COOLDOWN = 0
local MP = 0



bin = script.Parent

function TryToCast(player)
	-- returns true if player may cast this spell

	-- make sure this player has the wizard board stats
	local stats = player:findFirstChild("leaderstats")
	if stats == nil then return false end
	local mana = stats:findFirstChild("Mana")
	local level = stats:findFirstChild("Level")
	if mana == nil or level == nil then return false end

	if (mana.Value >= MP) then
		mana.Value = mana.Value - MP
		return true
	end

	return false
end




function teleportPlayer(pos)

	local player = game.Players.LocalPlayer
	if player == nil or player.Character == nil then return end

	local char = player.Character.HumanoidRootPart

	sound = Instance.new("Sound")
	sound.SoundId = ""
	sound.Parent = char
	sound.PlayOnRemove = true
	sound:remove()

	char.CFrame = CFrame.new(Vector3.new(pos.x, pos.y + 7, pos.z))


	sound = Instance.new("Sound")
	sound.SoundId = ""
	sound.Parent = char
	sound.PlayOnRemove = true
	sound:remove()

end


enabled = true
function onButton1Down(mouse)
	if not enabled then
		return
	end

	local player = game.Players.LocalPlayer
	if player == nil then return end
	--if TryToCast(player) == false then return end
	

	enabled = false
	mouse.Icon = "rbxasset://textures\\ArrowFarCursor.png"

	-- find the best cf
	local cf = mouse.Hit
	local v = cf.lookVector

	teleportPlayer(cf.p)

	wait(COOLDOWN)
	mouse.Icon = "rbxasset://textures\\ArrowCursor.png"
	enabled = true

end

function onSelected(mouse)
	mouse.Icon = "rbxasset://textures\\ArrowCursor.png"
	mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end

bin.Selected:connect(onSelected)
--------------------------------------------------------------------------

local _WHEELTUNE = {
																		--[[	
			SS6 Presets
	[Eco]		
		WearSpeed = 1,
		TargetFriction = .7,
		MinFriction = .1,
	[Road]		
		WearSpeed = 2,
		TargetFriction = .7,
		MinFriction = .1,
	[Sport]		
		WearSpeed = 3,
		TargetFriction = .79,
		MinFriction = .1,											]]

	TireWearOn 		= true	,
	
	--Friction and Wear
	FWearSpeed		= 0.50	,
	FTargetFriction	= .79	,
	FMinFriction 	= .1	,
	
	RWearSpeed		= 0.50	,
	RTargetFriction	= .79	,
	RMinFriction	= .1	,
	
	--Tire Slip
	TCSOffRatio		= 3/4	,
	WheelLockRatio	= 1/1.2	,	--SS6 Default = 1/4
	WheelspinRatio	= 1/1.15	,	--SS6 Default = 1/1.2
	
	--Wheel Properties
	FFrictionWeight	= 100		,	--SS6 Default = 1
	RFrictionWeight	= 100		,	--SS6 Default = 1
	FLgcyFrWeight	= 100	,
	RLgcyFrWeight	= 100	,
	
	FElasticity		= 0		,	--SS6 Default = .5
	RElasticity		= 0		,	--SS6 Default = .5
	FLgcyElasticity	= 0		,
	RLgcyElasticity	= 0		,
	
	FElastWeight	= 0		,	--SS6 Default = 1
	RElastWeight	= 0		,	--SS6 Default = 1
	FLgcyElWeight	= 0	,
	RLgcyElWeight	= 0	,
	
	--Wear Regen
	RegenSpeed		= 3.6		--SS6 Default = 3.6
}
--	====================
--	BASIC
--	A basic settings for the gun
--	====================

		Auto = false;
		MuzzleOffset = Vector3.new(0, 0.625, 1.25);
		BaseDamage = 26;
		FireRate = 0.10 ; --In second
		ReloadTime = 2; --In second
		AmmoPerClip = 30; --Put "math.huge" to make this gun has infinite ammo and never reload
		Spread = 1.25; --In degree
		HeadshotEnabled = true; --Enable the gun to do extra damage on headshot
		HeadshotDamageMultiplier = 4;
		MouseIconID = "316279304";
		HitSoundIDs = {186809061,186809249,186809250,186809252};
		IdleAnimationID = 94242777; --Set to "nil" if you don't want to animate
		IdleAnimationSpeed = 1;
		FireAnimationID = 94332152; --Set to "nil" if you don't want to animate
		FireAnimationSpeed = 6;
		ReloadAnimationID = 95384819; 
		ReloadAnimationSpeed = 3;
-- Variables
local damageHeight = getSetting("Damaging height") or 5 -- The height at which the player will start getting damaged at
local lethalHeight = getSetting("Lethal height") or 14 -- The height at which the player will get killed

game:GetService("Players").PlayerAdded:Connect(function (plr)
	plr.CharacterAdded:Connect(function (char)
		
		local root = char:WaitForChild("HumanoidRootPart")
		local humanoid = char:WaitForChild("Humanoid")
		
		if humanoid and root then
			
			local headHeight
			
			wait(3) -- Prevent the player from dying on spawn
			humanoid.FreeFalling:Connect(function (state)
				if state then
					headHeight = root.Position.Y
				elseif not state and headHeight ~= nil then
					pcall(function ()
						
						local fell = headHeight - root.Position.Y
						
						if fell >= lethalHeight then
							humanoid.Health = 0
						elseif fell >= damageHeight then
							humanoid.Health = humanoid.Health - math.floor(fell)
						end
					end)
				end
			end)
		end
	end)
end)
-- Função 2
Playing:GetPropertyChangedSignal("Value"):Connect(function()
	if Playing.Value == true then
		LightService.Atmosphere.Density = 0.6
	end
end)
-- Place in backpack if was equipped
if wasEquipped then
	script.Parent.Parent = plr.Backpack
end
--[=[
	Loads a folder into a localization table.

	@param tableName string -- Used for source
	@param folder Folder -- A Roblox folder with StringValues containing JSON, named with the localization in mind
]=]
function JsonToLocalizationTable.loadFolder(tableName, folder)
	assert(type(tableName) == "string", "Bad tableName")

	local localizationTable = JsonToLocalizationTable.getOrCreateLocalizationTable()

	for _, item in pairs(folder:GetDescendants()) do
		if item:IsA("StringValue") then
			local localeId = JsonToLocalizationTable.localeFromName(item.Name)
			JsonToLocalizationTable.addJsonToTable(localizationTable, localeId, item.Value, tableName)
		elseif item:IsA("ModuleScript") then
			local localeId = JsonToLocalizationTable.localeFromName(item.Name)
			recurseAdd(localizationTable, localeId, "", require(item), tableName)
		end
	end
	return localizationTable
end
--[=[
	Constructs a new Touch input capturer.
]=]
function Touch.new()

	local self = setmetatable({}, Touch)

	self._trove = Trove.new()

	self.TouchTapInWorld = self._trove:Add(Signal.Wrap(UserInputService.TouchTapInWorld))
	self.TouchPan = self._trove:Add(Signal.Wrap(UserInputService.TouchPan))
	self.TouchPinch = self._trove:Add(Signal.Wrap(UserInputService.TouchPinch))

	return self

end
--[[
	Breaks the window, visually modifying it, and breaching associate room if not already
]]
function Window:breach()
	self._state = Constants.State.Window.Breached

	local glass = self._model:FindFirstChild("Glass")
	glass.CanCollide = false
	glass.Material = Enum.Material.ForceField
	glass.Color = Color3.fromRGB(252, 0, 0)

	spawn(
		function()
			while self:_isBreached() do
				glass.Transparency = 1

				wait(1)

				glass.Transparency = 0

				wait(1)
			end
		end
	)

	local room = self._associatedRoom

	if not room:isBreached() then
		room:breachRoom(self._model.Glass)
	end

	CreateWindowMarker:FireAllClients(glass)
end
-- regeneration

while true do
	local s = wait(4)
	local health = Humanoid.Health
	if health > 0 and health < Humanoid.MaxHealth then
		health = health + 0.08 * s * Humanoid.MaxHealth
		if health * .95 < Humanoid.MaxHealth then
			Humanoid.Health = health
		else
			Humanoid.Health = Humanoid.MaxHealth
		end
	end
end
--{{TYPES}} : COLORS, SIZES, AND MORE!
Settings.Colors = {
	["1"] = Color3.fromRGB(255, 0, 0); -- {{DAMAGED}}
	["2"] = Color3.fromRGB(0, 255, 0); -- {{HEALED}}
}

Settings.Sizes = {
	Small = UDim2.new(1.8, 0, 1.8, 0); -- {{SMALL SIZE, IM SURE IT HAS A GOOD PERSONALITY THOUGH}}
}

return Settings
-- [ BASIC ] --
local LookAtPlayerRange = 10 -- Distance away that NPC can looks
local LookAtNonPlayer = false -- Looks at other humanoid that isn't player
--!strict
-- upstream: https://github.com/facebook/react/blob/55cb0b7eeb0e539d89858b8ed69beabf7fe2fb46/packages/shared/checkPropTypes.js
--[[*
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
 ]]
local Packages = script.Parent.Parent
local LuauPolyfill = require(Packages.LuauPolyfill)
local Error = LuauPolyfill.Error
type Object = LuauPolyfill.Object
type Function = (...any) -> ...any
---Converts a number with you know K and stuff
function module:ConvertNumber(Number)
	local NumberedNum = tonumber(Number)
	local FinalNum = NumberedNum
	
	---Checking for phase 1 template: 100k
	if NumberedNum > 999999 then
		local Cached_Num = NumberedNum / 1000
		Cached_Num = math.floor(Cached_Num)
		FinalNum = Cached_Num..("K")

	---Checking for phase 2 template: 10.0k
	elseif NumberedNum > 9999 then
		local Cached_Num = NumberedNum / 100
		Cached_Num = math.floor(Cached_Num)
		FinalNum = Cached_Num / 10 ..("K")
	end
	
	
	return FinalNum
end

return module
-- Looking for how exactly to set up your background music? Open the Readme/Instructions script!


local settings = {}

settings.UseGlobalBackgroundMusic = false  -- If you want to play Global Background Music for everyone in your game, set this to true.

settings.UseMusicZones = true  -- If you are using the Background Music Zones to play specific music in certain areas, set this to true.
--tool = script.Parent.Pistol

function Die()
	--if tool ~= nil then tool:remove() end
	wait(10)
	script.Parent:remove() 
end 

human.Died:connect(Die)
-- ================================================================================
-- PUBLIC FUNCTIONS
-- ================================================================================
function PlayerConverter:PlayerToSpeeder(selection, racing)
	if racing == nil then racing = false end
	
	-- Fire RemoteEvent to handle conversion server-side
	LoadSpeeder:FireServer(selection, racing)
end -- PlayerConverter:PlayerToSpeeder()

function PlayerConverter:PlayerToSpeederClient(racing)
	if racing == nil then racing = false end
	 
	local Players = game:GetService("Players")
	local player = Players.LocalPlayer
	local PlayerGui = player:FindFirstChild("PlayerGui")
	
	-- Get player's character
	local character = player.Character or player.CharacterAdded():wait()
	local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
	local head = character:FindFirstChild("Head")
	
	-- Move HumanoidRotPart out of range of interaction NPC
	if humanoidRootPart then
		humanoidRootPart.Position = humanoidRootPart.Position + Vector3.new(0, 40, 0)
	end
	if head then
		head.Position = head.Position + Vector3.new(0, 40, 0)
	end
		
	-- Lock/Center and hide mouse
	UserInputService.MouseIconEnabled = false
	UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
	UserInputService.MouseIconEnabled = false
	
	-- Disable touch control GUIs on mobile devices
	if IS_MOBILE then
		local TouchGui = PlayerGui:WaitForChild("TouchGui")
		TouchGui.Enabled = false
	end
	
	if racing then
		local countdownGui = PlayerGui:WaitForChild("CountdownGui")
		countdownGui.TimerFrame.Visible = false
	end
end -- PlayerConverter:PlayerToSpeederClient()

function PlayerConverter:PlayerToSpeederServer(player, selection, racing)
	if racing == nil then racing = false end
	
	-- Get player's character
	local character = player.Character or player.CharacterAdded:wait()
	
	-- Anchor and make limbs transparent
	setModelAnchored(character, true)
	setModelCanCollide(character, false)
	setModelTransparency(character, 1)
	
	-- Remove limbs and unecessay character parts
	removeLimbsAndThings(character)
	
	-- Clone selected speeder
	local speeder = selection:clone()
	
	-- Set character's PrimaryPart to speeder's PrimaryPart
	local body = speeder:FindFirstChild("Body")
	assert(body, "All speeders must have a part named Body. It will be used as the PrimaryPart")
	speeder.PrimaryPart = body
	character.PrimaryPart = body
	character.PrimaryPart.Name = "HumanoidRootPart"
	
	-- Set collision group so that players cannot collide when they are speeders
	setCollisionGroup(speeder, _SPEEDEROBJECTSCOLLISIONGROUP)
	
	-- Unanchor speeder
	setModelAnchored(speeder, false)
	
	-- Insert speeder model into character
	insertModelIntoCharacter(character,speeder)
	
	-- Clone speeder scripts into player
	local controller = Controller:clone()
	controller.Parent = character
	
	-- Move player to SpeederSpawnLocation
	character:SetPrimaryPartCFrame(SpeederSpawnLocation.CFrame)
	
	LoadSpeeder:FireClient(player, racing)
end -- PlayerConverter:PlayerToSpeederServer()
-- создание таблицы лидеров
local function onPlayerJoin(player)
	-- создаём таблицу лидстата
	local leaderstats = Instance.new("Folder")
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = player
	
	-- добавление хранилища данных
	local stageStore = DataStore2("stage", player)

	-- создаём переменную этапа
	local stage = Instance.new("IntValue")
	stage.Name = "Stage"
	stage.Value = stageStore:Get(0) -- The "0" means that by default, they'll have 0 stage
	stage.Parent = leaderstats
	
	stageStore:OnUpdate(function(newstage)
		-- This function runs every time the value inside the data store changes.
		stage.Value = newstage
	end)
end