----------------------/-/- Misc. -\-\----------------------


WinchEvent = script.Parent.WinchEventObject.Value
BedEvent = script.Parent.BedEventObject.Value
gui = script.Parent.Main

mouse = game.Players.LocalPlayer:GetMouse()
attachMode = false

mouse.Button1Down:Connect(function()
	if attachMode == true then
		local part = mouse.Target
		WinchEvent:FireServer("Attach", part)
		attachMode = false
		gui.Parent.CancelInfo.Visible = false
	end
end)

game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent)
	if inputObject.KeyCode == Enum.KeyCode.X then
		if attachMode == true then
			attachMode = false
			gui.Parent.CancelInfo.Visible = false
		end
	end
end)

