--script.Parent:WaitForChild("SeatWeld")
--wait(1)

script.Parent.ChildAdded:connect(function(child) 
	if child:IsA("Weld") then
		child.C0 = CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0) --// Reposition player
		if child.Part1.Name == "HumanoidRootPart" then
			--script.Parent.BodyForce.Force = Vector3.new(0,1500,0)
			for i,v in pairs(child.Part1.Parent:GetChildren()) do
				if v:IsA("Accessory") then
					v.Handle.Transparency = 1 ---change this to zero if you dont want hats to be removed [SS6]
					local _,_ = pcall(function() v.Handle.CustomPhysicalProperties = PhysicalProperties.new(0.01,0.3,0.5,1,1) end)
				end
				local _,_ = pcall(function() v.CustomPhysicalProperties = PhysicalProperties.new(0.01,0.3,0.5,1,1) end)
			end
		end
	end
end)

script.Parent.ChildRemoved:connect(function(child)
	if child:IsA("Weld") then
		if child.Part1.Name == "HumanoidRootPart" then
			--script.Parent.BodyForce.Force = Vector3.new(0,0,0)
			for i,v in pairs(child.Part1.Parent:GetChildren()) do
				if v:IsA("Accessory") then
					v.Handle.Transparency = 0
					local _,_ = pcall(function() v.Handle.CustomPhysicalProperties = PhysicalProperties.new(0.01,0.3,0.5,1,1) end)
				end
				local _,_ = pcall(function() v.CustomPhysicalProperties = PhysicalProperties.new(0.7,0.3,0.5,1,1) end)
			end
			local player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)
			if player and player.PlayerGui:FindFirstChild("Screen") then
				player.PlayerGui:FindFirstChild("Screen"):Destroy()
			end
		end
	end	
end)
