Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- Prunes any stories and test files that are included with the DevModule. These
-- are not needed at runtime.


local function prune(instance: Instance)
    for _, descendant in ipairs(instance:GetDescendants()) do
        local name = descendant.Name
        if name:match(".story$") or name:match(".spec$") then
            descendant:Destroy()
        end
    end
end

local function getPackageVersion(package: ModuleScript)
    local version: StringValue = package:FindFirstChild(PACKAGE_VERSION_NAME)

    assert(version and version:IsA("StringValue"), PACKAGE_VERSION_OBJECT_MISSING
        :format(package.Name, PACKAGE_VERSION_NAME, package:GetFullName()))
    assert(version.Value ~= "", PACKAGE_VERSION_EMPTY:format(package.Name, version:GetFullName()))

    return version.Value
end
--// GUI Variables


local PlayerGUI = Player:WaitForChild("PlayerGui")
local MainUI = PlayerGUI:WaitForChild("MainUI") 
local PetUI = MainUI.PetsFrame
local MultiDeleteFrame = PetUI.MultiDeleteFrame

function UpdatePetsInMultiDelete(num)
	local amountofPets = tonumber(num) or #petsInMultiDelete 
	if type(tonumber(amountofPets)) == "number" then
		MultiDeleteFrame.PetsSelected.Text = tostring(amountofPets).." Pets Selected"
	end
end

function MultiDeleteModule:AddPetToMultiDelete(pet)
	if pet ~= nil then
		if not table.find(petsInMultiDelete, pet) then
			table.insert(petsInMultiDelete, pet)
			UpdatePetsInMultiDelete()
		end
	end
end

function MultiDeleteModule:DeletePetInMultiDelete(pet)
	if pet ~= nil then
		local place = table.find(petsInMultiDelete, pet)
		if place then
			table.remove(petsInMultiDelete, tonumber(place))
			UpdatePetsInMultiDelete()
		end
	end
end

function MultiDeleteModule:ResetMultiDeleteTable()
	petsInMultiDelete = {}
end

function MultiDeleteModule:GetMutliDeletePets()
	return petsInMultiDelete
end

return MultiDeleteModule
-- Function to handle player falling


local function handlePlayerFalling(player, floorPosition, previousPosition)
	local fallDistance = (floorPosition - previousPosition).Magnitude
	if fallDistance > MAX_FALL_DISTANCE then
		local damage = calculateFallDamage(fallDistance)

		-- Apply damage to the player
		-- Replace this line with your own code to apply damage to the player
		player.Character.Humanoid.Health = player.Character.Humanoid.Health - damage
	end
end
-- Generated by https://roblox-ts.github.io v0.0.34
-- Compiled May 9, 2019, 6:07 PM Coordinated Universal Time



local _exports = {};
local Connection;
do
	Connection = {};
	Connection.__index = {
		Fire = function(self, data)
			if self.Connected then
				self.Function(data);
			end;
		end;
		Disconnect = function(self)
			self.Connected = false;
		end;
	};
	Connection.new = function(...)
		return Connection.constructor(setmetatable({}, Connection), ...);
	end;
	Connection.constructor = function(self, Function)
		self.Function = Function;
		self.Connected = true;
		return self;
	end;
end;
_exports.Connection = Connection;
return _exports;
--[=[
	Requires all the modules that are children of the given parent. This is an easy
	way to quickly load all controllers that might be in a folder.
	```lua
	Knit.AddControllers(somewhere.Controllers)
	```
]=]


function KnitClient.AddControllers(parent: Instance): { Controller }
	local addedControllers = {}
	for _, v in parent:GetChildren() do
		if not v:IsA("ModuleScript") then
			continue
		end
		table.insert(addedControllers, require(v))
	end
	return addedControllers
end
--Made by Luckymaxer



Debris = game:GetService("Debris")

ProjectileNames = {"MeshPart", "Arrow", "Projectile", "Effect", "Rail", "Laser", "Ray", "Bullet", "ParticlePart"}

Functions = {
	
	CreateConfiguration = (function(Configurations, Table)
		for i, v in pairs(Configurations:GetChildren()) do
			if string.find(v.ClassName, "Value") then
				Table[v.Name] = v:Clone()
			elseif v:IsA("Folder") or v:IsA("Configuration") then
				Table[v.Name] = Functions.CreateConfiguration(v, Table)
			end
		end
		return Table
	end),
	
	FindCharacterAncestor = (function(Object)
		if Object and Object ~= game:GetService("Workspace") then
			local Humanoid = Object:FindFirstChild("Humanoid")
			if Humanoid then
				return Object, Humanoid
			else
				return Functions.FindCharacterAncestor(Object.Parent)
			end
		end
		return nil
	end),

	CheckTableForString = (function(Table, String)
		for i, v in pairs(Table) do
			if string.lower(v) == string.lower(String) then
				return true
			end
		end
		return false
	end),
	
	CheckIntangible = (function(Hit)
		if Hit and Hit.Parent then
			if Functions.CheckTableForString(ProjectileNames, Hit.Name) then
				return true
			end
			local ObjectParent = Hit.Parent
			local Character = ObjectParent.Parent
			local Humanoid = Character:FindFirstChild("Humanoid")
			if Humanoid and Humanoid.Health > 0 and ObjectParent:IsA("Hat") then
				return true
			end
		end
		return false
	end),
	
	CastRay = (function(StartPos, Vec, Length, Ignore, DelayIfHit)
		local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Vec * Length), Ignore)
		if RayHit and Functions.CheckIntangible(RayHit) then
			if DelayIfHit then
				wait()
			end
			RayHit, RayPos, RayNormal = Functions.CastRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit)
		end
		return RayHit, RayPos, RayNormal
	end),
	
	IsTeamMate = (function(Player1, Player2)
		return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor)
	end),
	
	TagHumanoid = (function(humanoid, player)
		local Creator_Tag = Instance.new("ObjectValue")
		Creator_Tag.Name = "creator"
		Creator_Tag.Value = player
		Debris:AddItem(Creator_Tag, 2)
		Creator_Tag.Parent = humanoid
	end),
	
	UntagHumanoid = (function(humanoid)
		for i, v in pairs(humanoid:GetChildren()) do
			if v:IsA("ObjectValue") and v.Name == "creator" then
				v:Destroy()
			end
		end
	end),
	
	CheckTableForString = (function(Table, String)
		for i, v in pairs(Table) do
			if string.lower(v) == string.lower(String) then
				return true
			end
		end
		return false
	end),
	
	Clamp = (function(Number, Min, Max)
		return math.max(math.min(Max, Number), Min)
	end),
	
	GetPercentage = (function(Start, End, Number)
		return (((Number - Start) / (End - Start)) * 100)
	end),
	
	Round = (function(Number, RoundDecimal)
		local WholeNumber, Decimal = math.modf(Number)
		return ((Decimal >= RoundDecimal and math.ceil(Number)) or (Decimal < RoundDecimal and math.floor(Number)))
	end),
	
}

return Functions
-- https://developer.roblox.com/en-us/api-reference/class/DataStoreService





while true do
	local data = {}
	local tmp = game.Workspace.Servers:GetChildren()
	if tmp then -- получен список список серверов/объектов
		for a,b in pairs(tmp) do
			local server_code = b.Name
			local temp = b:GetChildren()
			local player_num = #temp
			local server_name= b.name.Value
			
			warn("------------------------")
			warn(server_code,player_num,server_name)
			if player_num < max_players then
				table.insert(data,{server_code,player_num,server_name})--Put new data in new table
			end
		end
		table.sort(data,function(a,b)
			return a[2] > b[2]
		end)
	end
-- A simple function to explode a specified part


function Explode(shell)
	local explosion = Instance.new("Explosion", workspace)
	explosion.Position = shell.Position
	explosion.BlastRadius = config.ExplosionRadius.Value
	shell:Destroy()
end

script.Parent.Throw.OnServerEvent:connect(function(player, mousePosition)
	if tool.Handle.Grenadee then
		tool.Handle.Grenadee:Play()
	end
	local handlePos = Vector3.new(tool.Handle.Position.X, 0, tool.Handle.Position.Z) -- remove Y from the equation, it's not needed
	local mousePos = Vector3.new(mousePosition.X, 0, mousePosition.Z) -- ditto
	local distance = (handlePos - mousePos).magnitude -- Get the distance between the handle and the mouse
	local altitude = mousePosition.Y - tool.Handle.Position.Y
	local angle = AngleOfReach(distance, altitude, config.GrenadeVelocity.Value) -- Calculate the angle
	
	tool.Handle.Transparency = 1
	local grenade = tool.Handle:Clone()
	grenade.Parent = workspace
	
	
	grenade.Transparency = 0
	grenade.CanCollide = true
	grenade.CFrame = tool.Handle.CFrame
	grenade.Velocity = (CFrame.new(grenade.Position, Vector3.new(mousePosition.X, grenade.Position.Y, mousePosition.Z)) * CFrame.Angles(angle, 0, 0)).lookVector * config.GrenadeVelocity.Value -- Throwing 'n stuff, it probably didn't need to be this long
	spawn(function()
		if config.ExplodeOnTouch.Value then
			grenade.Touched:connect(function(hit)
				if hit.Parent ~= tool.Parent and hit.CanCollide then -- Make sure what we're hitting is collidable
					Explode(grenade)
				end
			end)
		else	
			wait(config.FuseTime.Value)
			Explode(grenade)
		end
	end)
	wait(config.Cooldown.Value)
	tool.Handle.Transparency = 0
end)
--[[Weight and CG]]


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



local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local timerStarted = false
local UIS = game:GetService("UserInputService")
local Values = script.Parent:WaitForChild("Values")
local car = script.Parent.Car.Value
local DriveSeat = car:WaitForChild("DriveSeat")
local Started = car:WaitForChild("Started")
local Update = car:WaitForChild("Update")
local Tune = require(car:WaitForChild("A-Chassis Tune"))
local Model = script.Model.Value
local IsOn = Values.Parent:WaitForChild("IsOn")


IsOn.Changed:Connect(function()
	if IsOn.Value then
		Started:FireServer(Model, IsOn)
	else
		Started:FireServer(Model, false)
	end
end)

DriveSeat.ChildAdded:Connect(function()
	if Tune.AutoStart == true then
		Started:FireServer(Model, true)
	else
		Started:FireServer(Model, false)
	end
end)

DriveSeat.ChildRemoved:Connect(function()
	
	Started:FireServer(Model, false)
	
end)

Values.RPM.Changed:Connect(function()
	Update:FireServer(Model, "RPM", Values.RPM.Value, Tune.Redline)
end)

Values.Gear.Changed:Connect(function()
	
	Update:FireServer(Model, "Gear", Values.Gear.Value)
	
end)

local cs = coroutine.create(function()
	while wait() do
		if speedUnit == "KPH" then
			script.Speed.Value = math.floor(char:WaitForChild("HumanoidRootPart").Velocity.Magnitude)
			Update:FireServer(Model, "Speed", math.floor(script.Speed.Value * ((10/12) * 1.09728)))	
		elseif speedUnit == "MPH" then
			script.Speed.Value = math.floor(char:WaitForChild("HumanoidRootPart").Velocity.Magnitude)
			Update:FireServer(Model, "Speed", math.floor(script.Speed.Value * (10/12) * (60/88)))
		end	
	end
end)
coroutine.resume(cs)
-- goro7



local voteStates = game.ServerStorage.States.MapVote

voteStates.CurrentlyVoting.Changed:connect(function()
	
	-- Adjust visiblity
	local newVal = voteStates.CurrentlyVoting.Value
	script.Parent.Image.Visible = newVal
	script.Parent.CountLabel.Visible = newVal
	script.Parent.MapName.Visible = newVal
	script.Parent.Count.Visible = newVal
	
end)

voteStates.Map3.Changed:connect(function()
	
	-- Update map name and image
	local newMap = voteStates.Map3.Value
	script.Parent.Image.Image = newMap.ImageAsset.Value
	script.Parent.MapName.Text = newMap.Name
	
end)

voteStates.Count3.Changed:connect(function()
	
	-- Update map count
	script.Parent.Count.Text = voteStates.Count3.Value
	
end)
--[[Weld functions]]



	local JS = game:GetService("JointsService")
	local PGS_ON = workspace:PGSIsEnabled()
	
	function MakeWeld(x,y,type,s) 
		if type==nil then type="Weld" end
		local W=Instance.new(type,JS) 
		W.Part0=x W.Part1=y 
		W.C0=x.CFrame:inverse()*x.CFrame 
		W.C1=y.CFrame:inverse()*x.CFrame 
		if type=="Motor" and s~=nil then 
			W.MaxVelocity=s 
		end 
		return W	
	end
	
	function ModelWeld(a,b) 
		if a:IsA("BasePart") then 
			MakeWeld(b,a,"Weld") 
		elseif a:IsA("Model") then 
			for i,v in pairs(a:GetChildren()) do 
				ModelWeld(v,b) 
			end 
		end 
	end
	
	function UnAnchor(a) 
		if a:IsA("BasePart") and a.Name ~= "MainPart" then a.Anchored=false  end for i,v in pairs(a:GetChildren()) do UnAnchor(v) end 
	end
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-- STATE CHANGE HANDLERS



function onRunning(speed)
	checkingSPEED(speed)
	local speedThreshold = 0.5
	if speed > speedThreshold then
		local scale = 16.0
		playAnimation("walk", 0.2, Humanoid)
		setAnimationSpeed(speed / scale)
		pose = "Running"
	else
		if emoteNames[currentAnim] == nil and not currentlyPlayingEmote then
			playAnimation("idle", 0.2, Humanoid)
			pose = "Standing"
		end
	end
end

function onDied()
	pose = "Dead"
end

function onJumping()
	playAnimation("jump", 0.1, Humanoid)
	jumpAnimTime = jumpAnimDuration
	pose = "Jumping"
end

function onClimbing(speed)
	local scale = 5.0
	playAnimation("climb", 0.1, Humanoid)
	setAnimationSpeed(speed / scale)
	pose = "Climbing"
end

function onGettingUp()
	pose = "GettingUp"
end

function onFreeFall()
	if (jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	end
	pose = "FreeFall"
end

function onFallingDown()
	pose = "FallingDown"
end

function onSeated()
	pose = "Seated"
end

function onPlatformStanding()
	pose = "PlatformStanding"
end
--[[]	if mobile_is == false then
		mobile_is = true
		mobile_button = script.Parent.ParryButton
		mobile_button.Parent = plr.PlayerGui.PunchGui
	end

	mobile_button.MouseButton1Click:Connect(function()
		humanoid = plr.Character.Humanoid
		if humanoid.Parent.Parry.Value == false then
			humanoid.Parent.Parry.Value = true
			oldspeed = humanoid.WalkSpeed
			humanoid.WalkSpeed = 4
			pstart = humanoid:LoadAnimation(animation.Parry.pstart)
			pstart:Play()
			ppidle = humanoid:LoadAnimation(animation.Parry.pidle)
			ppidle:Play()
		else
			humanoid.Parent.Parry.Value = false
			humanoid.WalkSpeed = oldspeed
			ppidle:Stop()
			pstart:Stop()
		end
	end)]]


end)


script.Parent.Unequipped:Connect(function()
	attach.Parent = script.Parent
	motor6d:Remove()
	idle:Stop()
	equip:Stop()
	if humanoid.Parent.Parry.Value == true then
		humanoid.Parent.Parry.Value = false
		humanoid.WalkSpeed = oldspeed
		ppidle:Stop()
		pstart:Stop()
	end
end)

local i = 1
local deb = false

script.Parent.Activated:Connect(function()
	if humanoid.Parent.Parry.Value == false then
	if deb == false then
		deb = true
		if i == 1 then
			p1 = humanoid:LoadAnimation(animation.Punches.p1)
			p1:Play()
			i = 2
				wait(.2)

			Hitbox:HitStart() 
			attach.swing:Play()
			attach.swing.PlaybackSpeed = .8
			p1.Stopped:Wait()
			Hitbox:HitStop() 
			deb = false
			attach.swing:Stop()
		elseif i == 2 then
			p2 = humanoid:LoadAnimation(animation.Punches.p2)
			p2:Play()
			i = 3
				wait(.2)

			Hitbox:HitStart() 
			attach.swing:Play()
			attach.swing.PlaybackSpeed = 1.1
			p2.Stopped:Wait()
			Hitbox:HitStop() 
			deb = false
			attach.swing:Stop()
		elseif i ==3  then
			p3 = humanoid:LoadAnimation(animation.Punches.p3)
			p3:Play()
			i = 4
				wait(.2)

			Hitbox:HitStart() 
			attach.swing:Play()
			attach.swing.PlaybackSpeed = 1
			p3.Stopped:Wait()

			Hitbox:HitStop() 
			deb = false
			attach.swing:Stop()
		elseif i ==4  then
			p4 = humanoid:LoadAnimation(animation.Punches.p4)
			p4:Play()
			oldspeed = script.Parent.Parent.Humanoid.WalkSpeed
			humanoid.WalkSpeed -= 10
			i = 1
				wait(.4)
				humanoid.AutoRotate = false
			Hitbox:HitStart() 
			attach.swing.PlaybackSpeed = .8
				attach.swing:Play()
				wait(.3)
				game.ReplicatedStorage.CamShakeEvent:FireClient(plr)
				attach.ground:Play()
			p4.Stopped:Wait()
			Hitbox:HitStop() 
			humanoid.WalkSpeed = oldspeed
			deb = false
			attach.swing:Stop()
			end
			humanoid.AutoRotate = true
		end
	end
end)

game.ReplicatedStorage.Parry.OnServerEvent:Connect(function(plr,parent)
	humanoid = plr.Character.Humanoid
	if parent == script.Parent then
		if humanoid.Parent.Parry.Value == false then
			humanoid.Parent.Parry.Value = true
			oldspeed = humanoid.WalkSpeed
			humanoid.WalkSpeed = 4
			pstart = humanoid:LoadAnimation(animation.Parry.pstart)
			pstart:Play()
			ppidle = humanoid:LoadAnimation(animation.Parry.pidle)
			ppidle:Play()
		else
			humanoid.WalkSpeed = oldspeed
			ppidle:Stop()
			pstart:Stop()
			wait(1)
			humanoid.Parent.Parry.Value = false
		end
	end
end)
--------- CONFIGURATION -----------


local detectionDistance = 40 -- slime will wander until a player comes within this distance
local wanderSpeed = 1 -- the walk speed at which the slime will wander as long as no player is within detection distance
local wanderDistance = 5 -- how far the slime can wander in any one direction at a time
local chaseSpeed = 5 -- the walk speed at which the slime will chase players
local damage = 5 -- how much damage will be done to a humanoid each time the slime touches one
local damageDebounceDelay = .5 -- how many seconds after dealing damage before damage can be dealt again
-- Messy code but it works.. (Alternative to playeradded since that doesn't work.) ((Also only fires once per second so no big deal))


spawn(function()
	while task.wait(1) do
		for _ , v in pairs(workspace:GetDescendants()) do
			if v:IsA("Sound") and v.Name == "Running" then
				v.Volume = 0
			end
		end
	end
end)
--[[ zone_controller:header
## Functions

#### getZones
```lua
local zonesArray = ZoneController.getZones()
```

----
#### getCharacterRegion
```lua
local charRegion, regionCFrame, charSize = ZoneController.getCharacterRegion(player)
```

----
#### getTouchingZones
```lua
local touchingZonesArray, touchingPartsDictionary = ZoneController.getTouchingZones(player)
```

----
#### getHeightOfParts
```lua
local height, minY, maxY = ZoneController.getHeightOfParts(tableOfParts)
```

----
#### vectorIsBetweenYBounds
```lua
local bool = ZoneController.vectorIsBetweenYBounds(vector, tableOfParts)
```

----
#### verifyTouchingParts
```lua
local bool = ZoneController.verifyTouchingParts(vectors, tableOfParts)
```

----
--]]
-- Check if character is there


if script.Owner.Value.Character ~= nil then
	
	-- Find knife
	local knife = nil
	if script.Owner.Value.Backpack:FindFirstChild("Knife") then
		knife = script.Owner.Value.Backpack.Knife
	elseif script.Owner.Value.Character:FindFirstChild("Knife") then
		knife = script.Owner.Value.Character.Knife
	end
	if knife ~= nil then
		
		-- Make knife throw faster
		knife.KnifeScript.KnifeThrowSpeed.Value = knife.KnifeScript.KnifeThrowSpeed.Value * THROW_SPEED_CHANGE
		
	end
	
end
--[=[
	Connect a new handler to the event. Returns a connection object that can be disconnected.
	@param handler (... T) -> () -- Function handler called when `:Fire(...)` is called
	@return RBXScriptConnection
]=]


function Signal:Connect(handler)
	if not (type(handler) == "function") then
		error(("connect(%s)"):format(typeof(handler)), 2)
	end

	return self._bindableEvent.Event:Connect(function(key)
		-- note we could queue multiple events here, but we'll do this just as Roblox events expect
		-- to behave.

		local args = self._argMap[key]
		if args then
			handler(table.unpack(args, 1, args.n))
		else
			error("Missing arg data, probably due to reentrance.")
		end
	end)
end
-- Update the previous floor material, current floor material and sound data


humanoid:GetPropertyChangedSignal("FloorMaterial"):Connect(function()	
	getFloorMaterial()
	getSoundProperties()
	update()

	if humanoid.MoveDirection.Magnitude > 0 then 
		currentSound.Playing = true
	end
end)

updateWalkspeedRemote.OnServerEvent:Connect(function(player, walkspeed)
	player.Character.Humanoid.WalkSpeed = walkspeed
end)
--		child.C0 = CFrame.new(0,-0.6,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0) --// Reposition player


		if child.Part1.Name == "HumanoidRootPart" then
			player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)
			if player and (not player.PlayerGui:FindFirstChild("Screen")) then --// The part after the "and" prevents multiple GUI's to be copied over.
				GUI.CarSeat.Value = script.Parent --// Puts a reference of the seat in this ObjectValue, now you can use this ObjectValue's value to find the car directly.
				GUI:Clone().Parent = player.PlayerGui --// Compact version
				if script.Parent.L.Value == true then
					wait()
					script.Parent.Disabled = true
					wait()
					script.Parent.Disabled = false
				else
					script.Parent.Parent.Body.Dash.Screen.G.Enabled = true
					script.Parent.Parent.Body.Dash.Gear.G.Enabled = true
					script.Parent.Parent.Body.Dash.Speed.G.Enabled = true
					script.Parent.Parent.Body.Dash.DashSc.G.Cluster.Visible = true
					script.Parent.Occupied.Value = true
					script.Parent.Parent.Body.Dash.Screen.G.Blank.FE.TextColor3 = workspace.FilteringEnabled and Color3.new(0,1,0) or Color3.new(1,0,0)
					script.Parent.Parent.Body.Dash.Screen.G.Blank.PGS.TextColor3 = workspace:PGSIsEnabled() and Color3.new(0,1,0) or Color3.new(1,0,0)
				end
			end
		end
	end
end)

script.Parent.ChildRemoved:connect(function(child)
	if child:IsA("Weld") then
		if child.Part1.Name == "HumanoidRootPart" then
			game.Workspace.CurrentCamera.FieldOfView = 70
			player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)
			if player and player.PlayerGui:FindFirstChild("SS3") then
				player.PlayerGui:FindFirstChild("SS3"):Destroy()
				script.Parent.Parent.Body.Dash.Screen.G.Enabled = false
				script.Parent.Parent.Body.Dash.Gear.G.Enabled = false
				script.Parent.Parent.Body.Dash.Speed.G.Enabled = false
				script.Parent.Parent.Body.Dash.DashSc.G.Cluster.Visible = false
				script.Parent.Occupied.Value = false
			end
		end
	end	
end)
--[=[
	@return Streamable
	@param parent Model

	Constructs a streamable that watches for the PrimaryPart of the
	given `parent` Model.
]=]


function Streamable.primary(parent: Model)
	local self: StreamableWithInstance = {}
	setmetatable(self, Streamable)

	self._trove = Trove.new()
	self._shown = self._trove:Construct(Signal)
	self._shownTrove = Trove.new()
	self._trove:Add(self._shownTrove)

	self.Instance = parent.PrimaryPart

	local function OnPrimaryPartChanged()
		local primaryPart = parent.PrimaryPart
		self._shownTrove:Clean()
		self.Instance = primaryPart
		if primaryPart then
			self._shown:Fire(primaryPart, self._shownTrove)
		end
	end

	self._trove:Connect(parent:GetPropertyChangedSignal("PrimaryPart"), OnPrimaryPartChanged)
	if self.Instance then
		OnPrimaryPartChanged()
	end

	return self
end